Wanna see this logo while booting your 2.6 kernel? Click here!

22.05.2008 13:03

Installing Debian via PXE


Today I found my old Fujitsu Siemens Lifebook B in the cellar and wanted to play a bit with it. It's very small and handy (might be useful for certain tasks) and due to the recent hype on eeePCs, I need something small too ;) The specs for this notebook aren't very cool, but the display is a bit larger than the eeePCs display and it has a touchscreen which is also very handy when properly configured.
The main problem with installing operating systems onto this device is that there's neither a CD-Rom drive nor a floppy drive available and due to the age of this system, it's not possible to boot from USB drives, so I chose to install Debian via PXE on this device.

There are plenty of howtos on the web about configuring a PXE/Bootp/DHCP combination to make this work but I always need to write such things down on my own for easier reference in the future, so here's the way to go:

  1. Install a DHCP Server

    I chose "dhcp3-server" from Debian, so
    apt-get install dhcp3-server
    will do the trick. After installation, you need to configure it to allow booting from it. Besides the usual dhcp server configuration, you need to add the following configuration options:
      allow booting;
      allow bootp;
      class "pxeclients" {
        match if substring(option vendor-class-identifier, 0, 9) = "PXEClient";
        next-server 192.168.0.254;
        filename "/pxelinux.0";
      }
    
    (Assuming that 192.168.0.254 is the IP address of the host the TFTP server will reside and that pxelinux.0 is the pxe bootfile name of choice).

  2. Install the TFTP Server

    I chose "tftpd-hpa" because it seems to have special features wrt PXE configurations, so
    apt-get install tftpd-hpa
    will install the software for you. Change "RUN_DAEMON" in /etc/default/tftpd-hpa from "No" to "Yes" and start this service using `/etc/init.d/tftpd-hpa start`.

  3. Download the netboot files

    Download the latest netboot.tar.gz from http://ftp.nl.debian.org/debian/dists/etch/main/installer-i386/current/images/netboot/ into your tftpboot directory (for tftpd-hpa, it's usually set to /var/lib/tftpboot):
    cd /var/lib/tftpboot
    wget http://ftp.nl.debian.org/debian/dists/etch/main/installer-i386/current/images/netboot/netboot.tar.gz
    tar xf netboot.tar.gz

Make sure all the necessary services are started (dhcpd and tftpd) and try to bot your target system via PXE boot.

I hope I don't have forgotten some vital parts for this configuration and if so, feel free to leave a comment here.