6 Add Debian Lenny x86_64 Netboot
Now let's add further distributions and architectures to our PXE server (you don't want to run one PXE server per distribution/architecture, do you?). Or current directory structure looks like this:
/var/lib/tftpboot
|
+debian-installer
|
+i386
What I want is this instead which is more clearly arranged:
/var/lib/tftpboot
|
+centos
| |
| +5.3
| |
| +i386
| |
| +x86_64
|
+debian
| |
| +lenny
| |
| +i386
| |
| +x86_64
|
|
|
+fedora
| |
| +10
| |
| +i386
| |
| +x86_64
|
+mandriva
| |
| +2009.1
| |
| +i386
| |
| +x86_64
|
+suse
| |
| +11.1
| |
| +i386
| |
| +x86_64
|
+ubuntu
|
+jaunty
|
+i386
|
+x86_64
So first we move the current debian-installer directory (which contains Debian Lenny i386) to debian/lenny/:
mv /var/lib/tftpboot/debian-installer /var/lib/tftpboot/lenny
mkdir /var/lib/tftpboot/debian
mv /var/lib/tftpboot/lenny /var/lib/tftpboot/debian/
Then we download the netboot files for Debian Lenny x86_64 and move them to /var/lib/tftpboot/debian/lenny/x86_64/ like this (Debian and Ubuntu use the term amd64 instead of x86_64 for their 64-bit versions - please keep this in mind for our further operations!):
mkdir /var/lib/tftpboot/debian/lenny/x86_64
cd /tmp
lftp -c "open http://ftp.de.debian.org/debian/dists/lenny/main/installer-amd64/current/images/; mirror netboot/"
cd /tmp/netboot/debian-installer/
mv amd64/* /var/lib/tftpboot/debian/lenny/x86_64
(You can download the files from any other Debian mirror as well. Use one that is close to you.)
Then delete the /tmp/netboot directory:
cd /tmp/
rm -fr netboot/
Now that we have two different architectures for Debian Lenny on our PXE server, we need to modify the file /var/lib/tftpboot/pxelinux.cfg/default so that the PXE clients select from all available architectures. Debian Lenny's default /var/lib/tftpboot/pxelinux.cfg/default uses included files (see chapter 4) which doesn't help us much in finding out how we have to modify that file so that it can offer multiple architectures/distributions. Fortunately the files /var/lib/tftpboot/debian/lenny/i386/boot-screens/adtxt.cfg, /var/lib/tftpboot/debian/lenny/i386/boot-screens/txt.cfg, /var/lib/tftpboot/debian/lenny/x86_64/boot-screens/adtxt.cfg, and /var/lib/tftpboot/debian/lenny/x86_64/boot-screens/txt.cfg are more meaningful - let's take a look:
cat /var/lib/tftpboot/debian/lenny/i386/boot-screens/adtxt.cfg
label expert
menu label ^Expert install
kernel debian-installer/i386/linux
append priority=low vga=normal initrd=debian-installer/i386/initrd.gz --
label rescue
menu label ^Rescue mode
kernel debian-installer/i386/linux
append vga=normal initrd=debian-installer/i386/initrd.gz rescue/enable=true -- quiet
label auto
menu label ^Automated install
kernel debian-installer/i386/linux
append auto=true priority=critical vga=normal initrd=debian-installer/i386/initrd.gz -- quiet
|
cat /var/lib/tftpboot/debian/lenny/i386/boot-screens/txt.cfg
default install
label install
menu label ^Install
menu default
kernel debian-installer/i386/linux
append vga=normal initrd=debian-installer/i386/initrd.gz -- quiet
|
cat /var/lib/tftpboot/debian/lenny/x86_64/boot-screens/adtxt.cfg
label expert
menu label ^Expert install
kernel debian-installer/amd64/linux
append priority=low vga=normal initrd=debian-installer/amd64/initrd.gz --
label rescue
menu label ^Rescue mode
kernel debian-installer/amd64/linux
append vga=normal initrd=debian-installer/amd64/initrd.gz rescue/enable=true -- quiet
label auto
menu label ^Automated install
kernel debian-installer/amd64/linux
append auto=true priority=critical vga=normal initrd=debian-installer/amd64/initrd.gz -- quiet
|
cat /var/lib/tftpboot/debian/lenny/x86_64/boot-screens/txt.cfg
default install
label install
menu label ^Install
menu default
kernel debian-installer/amd64/linux
append vga=normal initrd=debian-installer/amd64/initrd.gz -- quiet
|
As you see, these files contain all valid installation options (install, expert, etc.) for Debian Lenny, each in its own label stanza. All paths in this file are relative to the /var/lib/tftpboot directory.
Of course, we should use unique names for the various installation options - if there are two installation options named install, one for Debian Lenny i386 and the other one for Debian Lenny x86_64, then nobody know which option to choose.
Therefore we modify /var/lib/tftpboot/pxelinux.cfg/default as follows (it's made up mostly of the previous four files, but I've changed the names of the installation options and also the paths!):
vi /var/lib/tftpboot/pxelinux.cfg/default
DISPLAY boot.txt
default lenny_i386_install
label lenny_i386_install
menu label ^Install
menu default
kernel debian/lenny/i386/linux
append vga=normal initrd=debian/lenny/i386/initrd.gz -- quiet
label lenny_i386_expert
menu label ^Expert install
kernel debian/lenny/i386/linux
append priority=low vga=normal initrd=debian/lenny/i386/initrd.gz --
label lenny_i386_rescue
menu label ^Rescue mode
kernel debian/lenny/i386/linux
append vga=normal initrd=debian/lenny/i386/initrd.gz rescue/enable=true -- quiet
label lenny_i386_auto
menu label ^Automated install
kernel debian/lenny/i386/linux
append auto=true priority=critical vga=normal initrd=debian/lenny/i386/initrd.gz -- quiet
label lenny_amd64_install
menu label ^Install
menu default
kernel debian/lenny/x86_64/linux
append vga=normal initrd=debian/lenny/x86_64/initrd.gz -- quiet
label lenny_amd64_expert
menu label ^Expert install
kernel debian/lenny/x86_64/linux
append priority=low vga=normal initrd=debian/lenny/x86_64/initrd.gz --
label lenny_amd64_rescue
menu label ^Rescue mode
kernel debian/lenny/x86_64/linux
append vga=normal initrd=debian/lenny/x86_64/initrd.gz rescue/enable=true -- quiet
label lenny_amd64_auto
menu label ^Automated install
kernel debian/lenny/x86_64/linux
append auto=true priority=critical vga=normal initrd=debian/lenny/x86_64/initrd.gz -- quiet
prompt 1
timeout 0
|
(Make sure you set prompt to 1!)
Now create the file /var/lib/tftpboot/boot.txt which is a simple text file that lists all available installation methods. The contents of the file will be displayed on the monitor when you boot a client computer over the network, thus the user of the client computer can see all installation methods and choose the one he likes.
vi /var/lib/tftpboot/boot.txt
Available Boot Options: ======================= lenny_i386_install lenny_amd64_install lenny_i386_expert lenny_amd64_expert lenny_i386_rescue lenny_amd64_rescue lenny_i386_auto lenny_amd64_auto |
7 Add Ubuntu 9.04 Netboot (i386 and x86_64)
Next we download the Ubuntu 9.04 netboot files and put them in /var/lib/tftpboot/ubuntu/jaunty like this:
i386:
mkdir -p /var/lib/tftpboot/ubuntu/jaunty
cd /tmp
lftp -c "open http://archive.ubuntu.com/ubuntu/dists/jaunty/main/installer-i386/current/images/; mirror netboot/"
cd netboot/
mv ubuntu-installer/i386 /var/lib/tftpboot/ubuntu/jaunty
cd /tmp/
rm -fr netboot/
x86_64:
mkdir -p /var/lib/tftpboot/ubuntu/jaunty/x86_64
cd /tmp
lftp -c "open http://archive.ubuntu.com/ubuntu/dists/jaunty/main/installer-amd64/current/images/; mirror netboot/"
cd /tmp/netboot/ubuntu-installer/
mv amd64/* /var/lib/tftpboot/ubuntu/jaunty/x86_64
cd /tmp/
rm -fr netboot/
(You can download the files from any other Ubuntu mirror as well. Use one that is close to you.)
We need to modify /var/lib/tftpboot/pxelinux.cfg/default again. To get an idea what to add, take a look at the four files /var/lib/tftpboot/ubuntu/jaunty/i386/boot-screens/adtext.cfg, /var/lib/tftpboot/ubuntu/jaunty/i386/boot-screens/text.cfg, /var/lib/tftpboot/ubuntu/jaunty/x86_64/boot-screens/adtext.cfg, and /var/lib/tftpboot/ubuntu/jaunty/x86_64/boot-screens/text.cfg:
cat /var/lib/tftpboot/ubuntu/jaunty/i386/boot-screens/adtext.cfg
label expert
menu label ^Expert install
kernel ubuntu-installer/i386/linux
append priority=low vga=normal initrd=ubuntu-installer/i386/initrd.gz --
label cli-expert
menu label Command-^line expert install
kernel ubuntu-installer/i386/linux
append tasks=standard pkgsel/language-pack-patterns= pkgsel/install-language-support=false priority=low vga=normal initrd=ubuntu-installer/i386/initrd.gz --
label rescue
menu label ^Rescue mode
kernel ubuntu-installer/i386/linux
append vga=normal initrd=ubuntu-installer/i386/initrd.gz rescue/enable=true -- quiet
|
cat /var/lib/tftpboot/ubuntu/jaunty/i386/boot-screens/text.cfg
default install
label install
menu label ^Install
menu default
kernel ubuntu-installer/i386/linux
append vga=normal initrd=ubuntu-installer/i386/initrd.gz -- quiet
label cli
menu label ^Command-line install
kernel ubuntu-installer/i386/linux
append tasks=standard pkgsel/language-pack-patterns= pkgsel/install-language-support=false vga=normal initrd=ubuntu-installer/i386/initrd.gz -- quiet
|
cat /var/lib/tftpboot/ubuntu/jaunty/x86_64/boot-screens/adtext.cfg
label expert
menu label ^Expert install
kernel ubuntu-installer/amd64/linux
append priority=low vga=normal initrd=ubuntu-installer/amd64/initrd.gz --
label cli-expert
menu label Command-^line expert install
kernel ubuntu-installer/amd64/linux
append tasks=standard pkgsel/language-pack-patterns= pkgsel/install-language-support=false priority=low vga=normal initrd=ubuntu-installer/amd64/initrd.gz --
label rescue
menu label ^Rescue mode
kernel ubuntu-installer/amd64/linux
append vga=normal initrd=ubuntu-installer/amd64/initrd.gz rescue/enable=true -- quiet
|
cat /var/lib/tftpboot/ubuntu/jaunty/x86_64/boot-screens/text.cfg
default install
label install
menu label ^Install
menu default
kernel ubuntu-installer/amd64/linux
append vga=normal initrd=ubuntu-installer/amd64/initrd.gz -- quiet
label cli
menu label ^Command-line install
kernel ubuntu-installer/amd64/linux
append tasks=standard pkgsel/language-pack-patterns= pkgsel/install-language-support=false vga=normal initrd=ubuntu-installer/amd64/initrd.gz -- quiet
|
We can now add Ubuntu 9.04 to /var/lib/tftpboot/pxelinux.cfg/default. My complete file looks as follows:
vi /var/lib/tftpboot/pxelinux.cfg/default
DISPLAY boot.txt
default lenny_i386_install
label lenny_i386_install
menu label ^Install
menu default
kernel debian/lenny/i386/linux
append vga=normal initrd=debian/lenny/i386/initrd.gz -- quiet
label lenny_i386_expert
menu label ^Expert install
kernel debian/lenny/i386/linux
append priority=low vga=normal initrd=debian/lenny/i386/initrd.gz --
label lenny_i386_rescue
menu label ^Rescue mode
kernel debian/lenny/i386/linux
append vga=normal initrd=debian/lenny/i386/initrd.gz rescue/enable=true -- quiet
label lenny_i386_auto
menu label ^Automated install
kernel debian/lenny/i386/linux
append auto=true priority=critical vga=normal initrd=debian/lenny/i386/initrd.gz -- quiet
label lenny_amd64_install
menu label ^Install
menu default
kernel debian/lenny/x86_64/linux
append vga=normal initrd=debian/lenny/x86_64/initrd.gz -- quiet
label lenny_amd64_expert
menu label ^Expert install
kernel debian/lenny/x86_64/linux
append priority=low vga=normal initrd=debian/lenny/x86_64/initrd.gz --
label lenny_amd64_rescue
menu label ^Rescue mode
kernel debian/lenny/x86_64/linux
append vga=normal initrd=debian/lenny/x86_64/initrd.gz rescue/enable=true -- quiet
label lenny_amd64_auto
menu label ^Automated install
kernel debian/lenny/x86_64/linux
append auto=true priority=critical vga=normal initrd=debian/lenny/x86_64/initrd.gz -- quiet
label jaunty_i386_install
menu label ^Install
menu default
kernel ubuntu/jaunty/i386/linux
append vga=normal initrd=ubuntu/jaunty/i386/initrd.gz -- quiet
label jaunty_i386_cli
menu label ^Command-line install
kernel ubuntu/jaunty/i386/linux
append tasks=standard pkgsel/language-pack-patterns= pkgsel/install-language-support=false vga=normal initrd=ubuntu/jaunty/i386/initrd.gz -- quiet
label jaunty_i386_expert
menu label ^Expert install
kernel ubuntu/jaunty/i386/linux
append priority=low vga=normal initrd=ubuntu/jaunty/i386/initrd.gz --
label jaunty_i386_cli-expert
menu label Command-^line expert install
kernel ubuntu/jaunty/i386/linux
append tasks=standard pkgsel/language-pack-patterns= pkgsel/install-language-support=false priority=low vga=normal initrd=ubuntu/jaunty/i386/initrd.gz --
label jaunty_i386_rescue
menu label ^Rescue mode
kernel ubuntu/jaunty/i386/linux
append vga=normal initrd=ubuntu/jaunty/i386/initrd.gz rescue/enable=true -- quiet
label jaunty_amd64_install
menu label ^Install
menu default
kernel ubuntu/jaunty/x86_64/linux
append vga=normal initrd=ubuntu/jaunty/x86_64/initrd.gz -- quiet
label jaunty_amd64_cli
menu label ^Command-line install
kernel ubuntu/jaunty/x86_64/linux
append tasks=standard pkgsel/language-pack-patterns= pkgsel/install-language-support=false vga=normal initrd=ubuntu/jaunty/x86_64/initrd.gz -- quiet
label jaunty_amd64_expert
menu label ^Expert install
kernel ubuntu/jaunty/x86_64/linux
append priority=low vga=normal initrd=ubuntu/jaunty/x86_64/initrd.gz --
label jaunty_amd64_cli-expert
menu label Command-^line expert install
kernel ubuntu/jaunty/x86_64/linux
append tasks=standard pkgsel/language-pack-patterns= pkgsel/install-language-support=false priority=low vga=normal initrd=ubuntu/jaunty/x86_64/initrd.gz --
label jaunty_amd64_rescue
menu label ^Rescue mode
kernel ubuntu/jaunty/x86_64/linux
append vga=normal initrd=ubuntu/jaunty/x86_64/initrd.gz rescue/enable=true -- quiet
prompt 1
timeout 0
|
Add the new installation options to /var/lib/tftpboot/boot.txt:
vi /var/lib/tftpboot/boot.txt
Available Boot Options: ======================= lenny_i386_install lenny_amd64_install lenny_i386_expert lenny_amd64_expert lenny_i386_rescue lenny_amd64_rescue lenny_i386_auto lenny_amd64_auto jaunty_i386_install jaunty_amd64_install jaunty_i386_cli jaunty_amd64_cli jaunty_i386_expert jaunty_amd64_expert jaunty_i386_cli-expert jaunty_amd64_cli-expert jaunty_i386_rescue jaunty_amd64_rescue |