1. On the Mac OS X box, which will act as our tftp server:
    1. Execute sudo chown username:staff /private/tftpboot, substituting your username.</li>
    2. In /private/tftpboot/, download the Debian netboot installer files (pxelinux.0, initrd.gz, and linux) from a Debian mirror (like this one) and create two files, pxelinux.cfg/default and boot.txt. Move the files around to get the following directory structure:

      /private/tftpboot/
      |-- boot.txt
      |-- debian
      |   `-- etch
      |       `-- i386
      |           |-- initrd.gz
      |           `-- linux
      |-- pxelinux.0
      `-- pxelinux.cfg
          `-- default
      

      The netinst files you want can be found on any Debian mirror at /debian/dists/lenny/main/installer-i386/current/images/netboot/debian-installer/i386/.

    3. Enter the following into pxelinux.cfg/default: DISPLAY boot.txt

      DEFAULT lenny_i386_install
              
      LABEL lenny_i386_install
              kernel debian/lenny/i386/linux
              append vga=normal initrd=debian/lenny/i386/initrd.gz  --
              
      PROMPT 1
      TIMEOUT 0
      
    4. Enter the following into boot.txt (optional): - Boot Menu - =============

      lenny_i386_install
      
    5. Download and install TftpServer. Open it, click “Fix working path permissions” and then “Start TFTP”.</li>
  2. On your Tomato-based router, enter the following into the Dnsmasq box in Advanced > DHCP/DNS: dhcp-boot=pxelinux.0,, where `` and `` are the name and IP address of the OS X tftp server.
  3. Boot the soon-to-be-Linux box via PXE (you may have to play around with the BIOS boot order). You should see the contents of boot.txt. From there, go ahead and install Debian like you normally would. No wasted CDs!

This basic setup can be scaled up to multiple, different Linux distributions simply by adding the appropriate files to the directory structure and appropriate entries to pxelinux.cfg/default and boot.txt.

Credits: Many thanks to Steve and falko for their great howtos.

Published on 30 September 2009 and tagged as
Browse articles... Browse tags...