Difference between revisions of "PXE interactive menu - multi level"
(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...") |
|||
(4 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
+ | [[Category:Linux]] | ||
+ | |||
This part will describe how to make a multi-level NetBoot menu. | This part will describe how to make a multi-level NetBoot menu. | ||
Line 141: | Line 143: | ||
− | #### Distributions ##### | + | #### Distributions - ready to be use ##### |
# Debian wheezy | # Debian wheezy | ||
LABEL wheezy | LABEL wheezy | ||
Line 148: | Line 150: | ||
# Kernel and boot files | # Kernel and boot files | ||
KERNEL images/wheezy/vmlinuz | KERNEL images/wheezy/vmlinuz | ||
− | APPEND initrd=images/wheezy/initrd.img root=/dev/nfs nfsroot= | + | APPEND initrd=images/wheezy/initrd.img root=/dev/nfs nfsroot=172.16.50.2:/nfs/wheezy |
# Ubuntu 14.04 | # Ubuntu 14.04 | ||
Line 155: | Line 157: | ||
# Kernel and boot files | # Kernel and boot files | ||
KERNEL images/trusty/vmlinuz | KERNEL images/trusty/vmlinuz | ||
− | APPEND initrd=images/trusty/initrd.img root=/dev/nfs nfsroot= | + | APPEND initrd=images/trusty/initrd.img root=/dev/nfs nfsroot=172.16.50.2:/nfs/trusty |
+ | |||
+ | MENU END | ||
+ | |||
− | # | + | #### Rescue ##### |
− | LABEL | + | MENU BEGIN rescue |
− | + | LABEL previous | |
− | + | MENU LABEL previous menu | |
− | + | MENU exit | |
− | + | MENU separator | |
+ | MENU include ubuntu-installer/amd64/boot-screens/menu.cfg | ||
+ | MENU END | ||
</syntaxhighlight> | </syntaxhighlight> | ||
− | Note all the "MENU" commands | + | You must always use "MENU END" before starting a new menu. |
+ | |||
+ | |||
+ | The Label is used to go back to the previous screen. It something you should always do! | ||
+ | |||
+ | |||
+ | |||
+ | Note all the new "MENU" commands: | ||
+ | * EXIT | ||
+ | * SEPARATOR | ||
+ | * INCLUDE => to import the sub-menu file | ||
Line 174: | Line 191: | ||
=References= | =References= | ||
− | More about the menu configuration: https://eldon.me/?p=54 | + | More about the menu configuration: |
+ | * https://eldon.me/?p=54 | ||
+ | * https://help.ubuntu.com/community/PXEInstallMultiDistro |
Latest revision as of 17:07, 10 June 2014
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 - ready to be use #####
# 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=172.16.50.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=172.16.50.2:/nfs/trusty
MENU END
#### Rescue #####
MENU BEGIN rescue
LABEL previous
MENU LABEL previous menu
MENU exit
MENU separator
MENU include ubuntu-installer/amd64/boot-screens/menu.cfg
MENU END
You must always use "MENU END" before starting a new menu.
The Label is used to go back to the previous screen. It something you should always do!
Note all the new "MENU" commands:
- EXIT
- SEPARATOR
- INCLUDE => to import the sub-menu file
References
More about the menu configuration: