Penguin

Note: this page was previously way outdated. Now it is merely incomplete, inconsistent and untested. Uh, yeah.

How to install Linux by booting it from TFTP

  • The client should have a PXE boot-ROM. If it doesn't, it might still be possible to do this – read the notes at the PXE page about booting PXE off a FloppyDisk. Otherwise, EtherBoot is very widely supported, but the install process for EtherBoot is slightly different and not documented here.

    Set up the client's BIOS to boot from the LAN. How to do this depends on your BIOS and NIC.

  • Then, of course, you need a TFTP server:

    1. Install the TFTP Packages, such as tftpd-hpa or atftpd on Debian.
    2. Create a directory for the tftpboot files. /tftpboot is the standard location.

      See the PXELINUX homepage for which files to copy here.

    3. Edit /etc/inetd.conf and change the tftpd line to something like this:

      tftp dgram udp wait root /root /usr/sbin/in.tftpd in.tftpd -vvv -p -u nobody -s /tftpboot

      Then restart inetd(8): killall -HUP inetd

  • As with any network-based boot, you will also need a DHCP server:

    1. Edit /etc/dhcpd.conf. Here is a sample:

      option domain-name "example.com";
      option domain-name-servers ns1.example.com;
      option subnet-mask 255.255.255.0;
      default-lease-time 600;
      max-lease-time 7200;
      
      subnet 192.168.1.0 netmask 255.255.255.0 {
          range 192.168.1.200 192.168.1.253;
          option routers 192.168.1.1;
      }
      
      host clientname {
          hardware ethernet 01:23:45:67:89:AB;
          fixed-address 192.168.1.90;
          filename "bpbatch.P";
          option option-135 "debian";
      }

      Then restart dhcpd(8)?: /etc/init.d/dhcp restart

  • Finally, you need to share the install media somehow. Set up an NFS, FTP or HTTP server, depending on your preferences. This is left as an exercise for the reader. :)

Now boot the client and you should get the OS installer.

If you can't use the network to continue with a TFTP install…

…then you probably didn’t supply the Kernel with a DeviceDriver for your NIC. The PXE ROM can happily download your Kernel and InitialRamDisk, but once it gives control over to the Kernel, the Kernel needs to know about your network card. In that case, just pick a different kernel image with a wider range of drivers compiled in. (Remember, this is only to boot the install. Once that comes up, you can always install whichever other Kernel you like.) Or else you can build your own boot Kernel.

See also


Part of CategoryHowto, CategoryNetworking