From Bits Wiki
⇒ By Andy Smith | Last updated: Tue, 16 Aug 2011 13:46:29 +0000 by Andys
Introduction
This describes how to use tftpd-hpa and dhcp3-server under Debian Squeeze to PXE boot a squeeze install.
This is based on the article on Debian Administration here, and updated to use squeeze instead of etch.
Guide
Install TFTPd
| Example: Install the tftpd-hpa package
|
apt-get install tftpd-hpa
|
Install DHCPd
| Example: Install the dhcp3-server package
|
apt-get install dhcp3-server
|
Configure DHCPd for PXE boot
- Either add the following to an existing
subnet declaration in /etc/dhcp3/dhcpd.conf:-
Example: PXE boot additions to dhcpd.conf
|
filename "pxelinux.0";
next-server 192.168.51.1;
|
- ...or create a
subnet declaration for your network if you didn't previously have DHCPd set up:-
Example: Example subnet declaration for dhcpd.conf
|
subnet 192.168.51.0 netmask 255.255.255.0 {
range 192.168.51.64 192.168.51.80;
filename "pxelinux.0";
next-server 192.168.51.1;
option routers 192.168.51.1;
}
|
- Note: The
next-server option points to our TFTPd server.
Setting up the PXE boot environment
- Create the required directories under </code>/srv/tftpboot</code>:-
| Example: Create the required directories
|
mkdir -v /srv/tftpboot/pxelinux.cfg
mkdir -pv /srv/tftpboot/debian/squeeze/i386
|
- Create the
/srv/tftpboot/pxelinux.cfg/default file:-
Example: Create the pxelinux.cfg/default file
|
DISPLAY boot.txt
DEFAULT squeeze_i386_install
LABEL squeeze_i386_install
kernel debian/squeeze/i386/linux
append vga=normal initrd=debian/squeeze/i386/initrd.gz --
LABEL squeeze_i386_linux
kernel debian/squeeze/i386/linux
append vga=normal initrd=debian/squeeze/i386/initrd.gz --
LABEL squeeze_i386_expert
kernel debian/squeeze/i386/linux
append priority=low vga=normal initrd=debian/squeeze/i386/initrd.gz --
LABEL squeeze_i386_rescue
kernel debian/squeeze/i386/linux
append vga=normal initrd=debian/squeeze/i386/initrd.gz rescue/enable=true --
PROMPT 1
TIMEOUT 0
|
- Create
/srv/tftpboot/pxelinux.cfg/boot.txt:-
Example: Create boot.txt
|
- Boot Menu -
=============
squeeze_i386_install
squeeze_i386_linux
squeeze_i386_expert
squeeze_i386_rescue
|
- Download the installer components:-
Finishing steps
- Make sure TFTPd and DHCPd are both running:-
Example: (Re)start tftpd-hpa and dhcp3-server
|
service tftpd-hpa restart
service dhcp3-server restart
|