PXE interactive menu - multi level
Revision as of 15:45, 4 June 2014 by WikiFreak (talk | contribs) (Created page with "This part will describe how to make a multi-level NetBoot menu. You need to have complete the following steps: * NetBoot server * Diskless netboot|Diskless server / w...")
This part will describe how to make a multi-level NetBoot menu.
You need to have complete the following steps:
Contents
Start situation
If you've done the previous part you should have something like:
/tftpboot/
|
|
|_____ pxelinux.0 NetBoot PXE root file
|
|
|_____ rescue/ Ubuntu 14.04 installation disk
|
|______ pxelinux.0 -Symlink-
|
|______ pxelinux.cfg/ -Symlink-
|
|______ ubuntu-installer/
|
|______ version.info
|
|
|_____ pxelinux.cfg/ PXE NetBoot configuration folder
|
|______ default NetBoot menu
|
|______ vesamenu.c32
|
|______ splash.png
|
|
|_____ images/
|
|______ wheezy/ Debian 7.x [wheezy] - ready to use
|
|______ trusty/ Ubuntu 14.04 [trusty] - ready to use
Move all distribution to the same root
For the multi-level menu to work, everything must share the same root!
So, we must move the "/rescue/ubuntu-installer" to "/ubuntu-installer"
cd /tftpboot
mv rescue/ubuntu-installer/ .
rm -Rf rescue/
Now, you should have:
/tftpboot/
|
|
|_____ pxelinux.0 NetBoot PXE root file
|
|
|_____ pxelinux.cfg/ PXE NetBoot configuration folder
|
|______ default NetBoot menu
|
|______ vesamenu.c32
|
|______ splash.png
|
|
|_____ ubuntu-installer/ Ubuntu 14.04 installation disk
|
|
|_____ images/
|
|______ wheezy/ Debian 7.x [wheezy] - ready to use
|
|______ trusty/ Ubuntu 14.04 [trusty] - ready to use
Edit the PXE NetBoot file:
vim /tftpboot/pxelinux.cfg/default
Put:
#### GENERIC OPTIONS #####
# Enable text menu
#DEFAULT pxelinux.cfg/menu.c32
# Enable graphical menu
DEFAULT pxelinux.cfg/vesamenu.c32
# Prompt for user input? (0 = choose from menu, 1 = you can type anything)
PROMPT 0
# Allow or not the user to left the menu (1 = user is locked to the menu)
NOESCAPE 1
# Time before using default option
TIMEOUT 50
#### Menu settings #####
MENU TITLE my super netboot menu
# Setup background image (the resolution is $WIDTH $HEIGHT and must match the given picture)
MENU RESOLUTION 640 480
MENU BACKGROUND pxelinux.cfg/splash.png
# Setup text properties
MENU WIDTH 80
MENU ROWS 14
MENU MARGIN 10
#### Distributions #####
# Debian wheezy
LABEL wheezy
MENU LABEL Debian 7.x [wheezy]
MENU DEFAULT
# Kernel and boot files
KERNEL images/wheezy/vmlinuz
APPEND initrd=images/wheezy/initrd.img root=/dev/nfs nfsroot=192.168.2.2:/nfs/wheezy
# Ubuntu 14.04
LABEL trusty
MENU LABEL Ubuntu 14.04 [trusty]
# Kernel and boot files
KERNEL images/trusty/vmlinuz
APPEND initrd=images/trusty/initrd.img root=/dev/nfs nfsroot=192.168.2.2:/nfs/trusty
# Ubuntu 14.04
LABEL trusty
MENU LABEL Xubuntu 14.04 - LIVE CD
# Kernel and boot files
KERNEL images/trusty/vmlinuz
APPEND initrd=images/trusty/initrd.img root=/dev/nfs nfsroot=192.168.2.2:/nfs/xubuntu
Note all the "MENU" commands + PROMPT 0
References
More about the menu configuration: https://eldon.me/?p=54