Adding multiple Linux OSes to PXE boot…

In a followup to this post, I figured out how to add other versions of Debian to my PXE boot server. I followed two guides for doing so (PXE install on Debian Lenny, and Ubuntu Help’s Multi-Distro PXE Install Guide).

  1. After getting the single-distro (Debian Sid) working, I renamed the debian-installer directory (in /srv/tftp) to ‘sid’, created the ‘debian’ directory, and moved the ‘sid’ directory into ‘debian’:
    
    cd /srv/tftp
    mv debian-installer sid
    mkdir debian
    mv sid debian/
    
    
  2. Next, I needed to edit /srv/tftp/debian/sid/amd64/boot-screens/menu.cfg, and replace all instances of ‘debian-installer’ with ‘debian/sid’. I used vim to do it, but this simple sed command should also have done the trick:
    
    sed -i 's,debian-installer,debian/sid,g' /srv/tftp/debian/sid/amd64/boot-screens/menu.cfg
    
    

    Note that I will repeat this process for each Linux distro and arch added.

  3. I then added my next distro, Debian Wheezy amd64:
    
    cp -R /var/spool/mirror/dists/wheezy/main/installer-amd64/current/images/netboot/debian-installer/* /srv/tftp/debian/wheezy
    
    

    I made the same change as (2) above, changing ‘debian-installer’ in menu.cfg to ‘debian/wheezy’.

  4. Next I modified /srv/tftp/pxelinux.cfg/default:
    
    default pxelinux.cfg/vesamenu.c32
    prompt 0
    timeout 0
    ontimeout BootLocal
    noescape 1
    
    label BootLocal
            localboot 0
            text help
            Boot to local hard disk
            endtext
    
    menu begin Debian
    menu title Debian
            label Previous
            text help
            Return to previous menu
            endtext
            menu exit
            menu separator
            menu include debian/menu.cfg
    menu end
    
    
  5. I copied the syslinux file vesamenu.c32 to the pxelinux.cfg/ directory,

    cp /var/spool/mirror/dists/sid/main/installer-amd64/current/images/netboot/debian-installer/amd64/boot-screens/vesamenu.c32 /srv/tftp/pxelinux.cfg/

  6. Next, I created the file /srv/tftp/debian/menu.cfg
    
    menu background debian/splash.png
    menu begin Sid (amd64)
    menu title Sid (amd64)
            label Previous
            text help
            Return to previous menu
            endtext
            menu exit
            menu separator
            menu include debian/sid/amd64/boot-screens/menu.cfg
    menu end
    
    menu begin Sid (i386)
    menu title Sid (i386)
            label Previous
            text help
            Return to previous menu
            endtext
            menu exit
            menu separator
            menu include debian/sid/i386/boot-screens/menu.cfg
    menu end
    
    menu begin Wheezy (amd64)
    menu title Wheezy (amd64)
            label Previous
            text help
            Return to previous menu
            endtext
            menu exit
            menu separator
            menu include debian/wheezy/amd64/boot-screens/menu.cfg
    menu end
    
    
    
  7. I copied sid’s dists/sid/main/installer-amd64/current/images/netboot/debian-installer/amd64/boot-screens/splash.png to /srv/tftp/splash.png. That way, each distro family can have its own splash image!

After that, I added the other Sid distro (i386), following the same procedure. Here are some screenshots of the process (taken from my hosting workstation):

Next steps:

  • Add a foreign distro to the mix (e.g. Fedora 18, Arch)
  • Figure out how to boot and install a Windows image from this setup (probably very difficult).
    • Start with an old copy of Windows XP
    • Then go with Windows 7 (if I even have an ISO for it).

1 thought on “Adding multiple Linux OSes to PXE boot…”

Leave a Reply