Loading...

HOWTO: PXE boot menu to both Debian 5.0 (Lenny) and 4.0 (Etch) network installs

The purpose of this article is to outline how to configure Debian's network install system to allow you to PXE boot into a menu which will allow you to choose to install either Debian 4.0 or 5.0.

Netboot Menu

Contents

  1. Summary of netboot configuration
  2. Changes to debian-installer to create the custom menu
  3. Update procedure when new netboot.tar.gz is released
  4. (Optional if you maintain local Debian mirror) Symlinks in debian mirror to allow etch install 

 

1. Summary of netboot configuration

We're assuming here that you already have a working etch netboot configuration and we just want to modify that such that you can choose from a boot menu "Install 5.0" and it loads the installer from tftpboot/debian-installer or "Install 4.0" and it loads the installer from tftpboot/debian-installer-etch.

So this article expects:

1. a dhcpd.conf which is configured to serve up pxelinux.0 via TFTP:

<snip>
 pool {
        range dynamic-bootp   172.31.0.100 172.31.0.200;
        if substring (option vendor-class-identifier, 0, 9) = "PXEClient" {
            filename "pxelinux.0";
        }
    }
<snip>

2. a tftpd server installed and configured to /var/lib/tftpboot.  I use atftpd (aptitude install atftpd) with the following configuration:

# cat /etc/default/atftpd
USE_INETD=false
OPTIONS="--daemon --port 69 --tftpd-timeout 300 --retry-timeout 5     --mcast-port 1758 --mcast-addr 239.239.239.0-255 --mcast-ttl 1 --maxthread 100 --verbose=5  /var/lib/tftpboot"

 

2. Changes to debian-installer to create the custom menu

In /var/lib/tftpboot, the debian-installer directory from the etch distribution must be moved into debian-installer-etch and lenny's debian-installer to debian-installer:

  • Download the etch netboot.tar.gz and extract it to /var/lib/tftpboot, then rename it from debian-installer to debian-installer-etch:
# cd /var/lib/tftpboot
# tar xzf netboot.tar.gz
# mv debian-installer debian-installer-etch
# rm netboot.tar.gz
# cd /var/lib/tftpboot
# tar xzf netboot.tar.gz
# rm netboot.tar.gz

Make a copy of debian-installer (lenny) to tftpboot/menu and modified as follows to provide the custom menu:

# cd /var/lib/tftpboot
# cp -a debian-installer menu

 

In /var/lib/tftpboot/menu/i386/boot-screens, copy txt.cfg to etch.cfg and edit as follows:

label install4
        menu label ^Install 4.0 (Etch)
        kernel debian-installer-etch/i386/linux
        append vga=normal initrd=debian-installer-etch/i386/initrd.gz -- quiet

 

Edit menu/i386/boot-screens/txt.cfg to change name from “Install” to “Install 5.0 (Lenny)”:

default install
label install
        menu label ^Install 5.0 (Lenny)
        menu default
        kernel debian-installer/i386/linux
        append vga=normal initrd=debian-installer/i386/initrd.gz -- quiet

 

Edit menu/i386/boot-screens/menu.cfg to point to edited version of txt.cfg as above and to include etch.cfg:

menu hshift 13
menu width 49

menu title Installer boot menu
include debian-installer/i386/boot-screens/stdmenu.cfg
include menu/i386/boot-screens/txt.cfg
include menu/i386/boot-screens/etch.cfg
include debian-installer/i386/boot-screens/amdtxt.cfg
include debian-installer/i386/boot-screens/gtk.cfg
<snip>

 

Edit syslinux.cfg (tftpboot/pxelinux.cfg/default -> ../boot-screens/syslinux.cfg ie. tftpboot/menu/i386/boot-screens/syslinux.cfg) to point to edited menu.cfg:

# D-I config version 1.0
include menu/i386/boot-screens/menu.cfg
default debian-installer/i386/boot-screens/vesamenu.c32
prompt 0
timeout 0

 

All but the edited files can be removed from /var/lib/tftpboot/menu/i386/boot-screens:

etch.cfg  menu.cfg  syslinux.cfg  txt.cfg

 

3. Update procedure when new netboot.tar.gz is released

To retain the menu and also keep up to date, as updates become available for Lenny’s installer, we will download them from a Debian mirror and apply as follows: 

# cd /var/lib/tftpboot
# wget ftp.is.co.za/debian/dists/lenny/main/installer-i386/current/images/netboot/netboot.tar.gz
# rm -r debian-installer
# tar xzf netboot.tar.gz
# unlink pxelinux.0
# unlink pxelinux.cfg
# cp debian-installer/i386/pxelinux.0 menu/i386/
# ln -s menu/i386/pxelinux.cfg
# ln -s menu/i386/pxelinux.0
 

4. Symlinks in debian mirror to allow etch install

Your local Debian mirror will have previously had the dists/etch folder symlink'd to "stable".  Now that lenny is stable, you will be linking lenny to stable and in order to use an etch installer off the same mirror, you will need to create an "oldstable" symlink to etch:

dists # ls -l
total 0
drwxr-xr-x 5 www-data www-data 208 2009-02-17 01:31 etch
drwxr-xr-x 5 www-data www-data 208 2009-02-17 01:31 lenny
lrwxrwxrwx 1 root     root       4 2009-02-17 19:44 oldstable -> etch
lrwxrwxrwx 1 root     root       5 2009-02-17 19:08 stable -> lenny

Etch Install

Lenny Install

Tags:

Comming from Microsoft land

Comming from Microsoft land I'm not a Linux expert yet..
Does this approach deserve the try?
http://www.vercot.com/~serva/DebianPXE1.html
it seems easier but I couldn't find any reference...

Plz help

thats really a good information. Thank you very much. I hope it helps me and other ppl too. :)

Akif

Plants of the desert

It works...

Thanks Warwick! For a beginner, I must say your guide really helped a lot. Thank you so much once again. Cheers, Patty

very interesting

Thanks for the article.

ok. lets try this here in sao paulo - brazil

ok i am try this because standard options from install debian lenny 5.00 not worked too good.

Post new comment

  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <b> <ul> <ol> <li> <dl> <dt> <dd> <p> <div> <img> <h2> <pre> <h6> <table> <tr> <td> <col> <tbody> <h3> <h4>
  • Lines and paragraphs break automatically.
  • Twitter-style @usersnames are linked to their Twitter account pages.
  • Twitter-style #hashtags are linked to search.twitter.com.

More information about formatting options

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
Image CAPTCHA
Enter the characters shown in the image.