• Increase font size
  • Default font size
  • Decrease font size
The great thing about a computer notebook is that no matter how much you stuff into it, it doesn't get bigger or heavier.
Home Geek stuff Linux Install debian with PXE boot

Install debian with PXE boot

Installing a new OS may be difficult on machines with no CD/DVD (like Portégé 2000 from toshiba or Asus's EeePc). Hopefully those PC supports boot over network. It is called PXE (Preboot Execution Environment). To boot a computer with PXE you'll need a machine with a DHCP server and a TFTP server.

Here is a simple way to setup a PXE boot server.

Install TFTP server

The TFTP server will be used to transfer OS images to the client machine.

~$ apt-get install tftpd-hpa

You don't have to start the TFTP server. On debian, the 69 UDP port is handled by inetd. Any connection received on this port with start a in.tftpd process. Because we're not going to use the TFTP server very often we'll keep that behavior.

Updating DHCP

It is now necessary to edit the DHCP server configuration to add the TFTP server address to each IP attribution. If you don't have a DHCP server you can install dnsmasq, available on both Debian and OpenWRT. Edit the /etc/dnsmasq.conf file to add these lines:

# pxe boot options

Here I installed the TFTP server on a host named "architect" with the IP "". Don't forget to restart the dnsmasq server to apply your changes:

~$ /etc/init.d/dnsmasq restart

Boot system creation

Create a file /var/lib/tftpboot/pxelinux.cfg/default. It will hold boot configuration used by all machines booting with PXE. You can setup a specific configuration for some machines using their MAC address: replace the "default" file with the hexadecimal representation of the machine MAC address (exemple: "001E8CC84372").

~$ mkdir /var/lib/tftpboot/pxelinux.cfg
~$ cat > /var/lib/tftpboot/pxelinux.cfg/default << EOF
DISPLAY boot.txt
DEFAULT etch_i386_install

LABEL etch_i386_install
kernel debian/etch/i386/linux
append vga=normal initrd=debian/etch/i386/initrd.gz  --
LABEL etch_i386_rescue
kernel debian/etch/i386/linux
append vga=normal initrd=debian/etch/i386/initrd.gz  rescue/enable=true --



This configuration will display the boot.txt file at startup to let user choose a startup option.

~$ cat > /var/lib/tftpboot/boot.txt << EOF
== PXE Boot Menu ==


Now we just have to add the files needed for system startup into the folder debian/etc/i386 as described in the configuration file.

~$ cd /var/lib/tftpboot
~$ wget
~$ mkdir -p /var/lib/tftpboot/debian/etch/i386
~$ cd /var/lib/tftpboot/debian/etch/i386
~$ wget
~$ wget

Allright! To test it you can now boot a machine using PXE: if everything runs OK you just have to type "etch_i386_install" after the boot menu shows up to start a new debian installation.


Add New Search
Write comment
[b] [i] [u] [url] [quote] [code] [img] 
Please input the anti-spam code that you can read in the image.

3.26 Copyright (C) 2008 / Copyright (C) 2007 Alain Georgette / Copyright (C) 2006 Frantisek Hliva. All rights reserved."