metal/bsp-files/pxeboot_grub.cfg
Kristine Bujold 3f337d5edb Fix bug with PXE Boot Server
The UEFI grub config file used for PXE Boot Server containes a mixed
of menuentry  and submenu. A submenu opens a new context and global
variables cannot be used within them
https://bugs.launchpad.net/ubuntu/+source/grub2/+bug/1175127. This
was causing pxe_root to be empty for submenus selections. Moving
'1) UEFI Boot from hard drive' into a submenu fixes this problem and
also removes the need to save the root variable. This was previously
required when a user would select boot from hard drive and the hard
drive did not exist, root would no longer be set to the pxeboot
server and selecting the other menu entries would fail.

Remove the '1)' prefix in the 'Boot from hard drive' menu option in
both Legacy and UEFI boot as this is not used by other menues.

Closes-Bug: 1794863

Change-Id: I5bc62039bfb68477e9cd0166ce17877693037640
Signed-off-by: Kristine Bujold <kristine.bujold@windriver.com>
2018-10-01 14:20:41 -04:00

91 lines
5.5 KiB
INI

timeout=10
default=0
GRUB_HIDDEN_TIMEOUT=0
GRUB_TIMEOUT_STYLE='countdown'
submenu 'UEFI Boot from hard drive' {
insmod part_gpt
insmod chain
# The EFI bootloader is located in /boot/efi/EFI/centos/
# /boot/efi being the mount
# /dev/sda1 307016 9680 297336 4% /boot/efi
set root=(hd0,gpt1)
chainloader /EFI/centos/grubx64.efi
}
# Standard Controller menu
submenu 'UEFI Standard Controller' {
submenu 'Serial Console' {
menuentry 'STANDARD Security Boot Profile' {
linuxefi vmlinuz bootifonly=1 devfs=nomount inst.repo=xxxHTTP_URLxxx inst.ks=xxxHTTP_URLxxx/pxeboot_controller.cfg ksdevice=$net_default_mac BOOTIF=$net_default_mac boot_device=sda rootfs_device=sda biosdevname=0 inst.text serial console=ttyS0,115200n8 inst.gpt security_profile=standard user_namespace.enable=1
initrdefi initrd.img
}
menuentry 'EXTENDED Security Boot Profile' {
linuxefi vmlinuz bootifonly=1 devfs=nomount inst.repo=xxxHTTP_URLxxx inst.ks=xxxHTTP_URLxxx/pxeboot_controller.cfg ksdevice=$net_default_mac BOOTIF=$net_default_mac boot_device=sda rootfs_device=sda biosdevname=0 inst.text serial console=ttyS0,115200n8 inst.gpt security_profile=extended tboot=true user_namespace.enable=1
initrdefi initrd.img
}
}
submenu 'Graphical Console' {
menuentry 'STANDARD Security Boot Profile' {
linuxefi vmlinuz bootifonly=1 devfs=nomount inst.repo=xxxHTTP_URLxxx inst.ks=xxxHTTP_URLxxx/pxeboot_controller.cfg ksdevice=$net_default_mac BOOTIF=$net_default_mac boot_device=sda rootfs_device=sda biosdevname=0 inst.text console=tty0 inst.gpt security_profile=standard user_namespace.enable=1
initrdefi initrd.img
}
menuentry 'EXTENDED Security Boot Profile' {
linuxefi vmlinuz bootifonly=1 devfs=nomount inst.repo=xxxHTTP_URLxxx inst.ks=xxxHTTP_URLxxx/pxeboot_controller.cfg ksdevice=$net_default_mac BOOTIF=$net_default_mac boot_device=sda rootfs_device=sda biosdevname=0 inst.text console=tty0 inst.gpt security_profile=extended tboot=true user_namespace.enable=1
initrdefi initrd.img
}
}
}
# AIO Controller menu
submenu 'UEFI All-in-one Controller' {
submenu 'Serial Console' {
menuentry 'STANDARD Security Boot Profile' {
linuxefi vmlinuz bootifonly=1 devfs=nomount inst.repo=xxxHTTP_URLxxx inst.ks=xxxHTTP_URLxxx/pxeboot_smallsystem.cfg ksdevice=$net_default_mac BOOTIF=$net_default_mac boot_device=sda rootfs_device=sda biosdevname=0 inst.text serial console=ttyS0,115200n8 inst.gpt security_profile=standard user_namespace.enable=1
initrdefi initrd.img
}
menuentry 'EXTENDED Security Boot Profile' {
linuxefi vmlinuz bootifonly=1 devfs=nomount inst.repo=xxxHTTP_URLxxx inst.ks=xxxHTTP_URLxxx/pxeboot_smallsystem.cfg ksdevice=$net_default_mac BOOTIF=$net_default_mac boot_device=sda rootfs_device=sda biosdevname=0 inst.text serial console=ttyS0,115200n8 inst.gpt security_profile=extended tboot=true user_namespace.enable=1
initrdefi initrd.img
}
}
submenu 'Graphical Console' {
menuentry 'STANDARD Security Boot Profile' {
linuxefi vmlinuz bootifonly=1 devfs=nomount inst.repo=xxxHTTP_URLxxx inst.ks=xxxHTTP_URLxxx/pxeboot_smallsystem.cfg ksdevice=$net_default_mac BOOTIF=$net_default_mac boot_device=sda rootfs_device=sda biosdevname=0 inst.text console=tty0 inst.gpt security_profile=standard user_namespace.enable=1
initrdefi initrd.img
}
menuentry 'EXTENDED Security Boot Profile' {
linuxefi vmlinuz bootifonly=1 devfs=nomount inst.repo=xxxHTTP_URLxxx inst.ks=xxxHTTP_URLxxx/pxeboot_smallsystem.cfg ksdevice=$net_default_mac BOOTIF=$net_default_mac boot_device=sda rootfs_device=sda biosdevname=0 inst.text console=tty0 inst.gpt security_profile=extended tboot=true user_namespace.enable=1
initrdefi initrd.img
}
}
}
# AIO (lowlatency) Controller menu
submenu 'UEFI All-in-one (lowlatency) Controller' {
submenu 'Serial Console' {
menuentry 'STANDARD Security Boot Profile' {
linuxefi vmlinuz bootifonly=1 devfs=nomount inst.repo=xxxHTTP_URLxxx inst.ks=xxxHTTP_URLxxx/pxeboot_smallsystem_lowlatency.cfg ksdevice=$net_default_mac BOOTIF=$net_default_mac boot_device=sda rootfs_device=sda biosdevname=0 inst.text serial console=ttyS0,115200n8 inst.gpt security_profile=standard user_namespace.enable=1
initrdefi initrd.img
}
menuentry 'EXTENDED Security Boot Profile' {
linuxefi vmlinuz bootifonly=1 devfs=nomount inst.repo=xxxHTTP_URLxxx inst.ks=xxxHTTP_URLxxx/pxeboot_smallsystem_lowlatency.cfg ksdevice=$net_default_mac BOOTIF=$net_default_mac boot_device=sda rootfs_device=sda biosdevname=0 inst.text serial console=ttyS0,115200n8 inst.gpt security_profile=extended tboot=true user_namespace.enable=1
initrdefi initrd.img
}
}
submenu 'Graphical Console' {
menuentry 'STANDARD Security Boot Profile' {
linuxefi vmlinuz bootifonly=1 devfs=nomount inst.repo=xxxHTTP_URLxxx inst.ks=xxxHTTP_URLxxx/pxeboot_smallsystem_lowlatency.cfg ksdevice=$net_default_mac BOOTIF=$net_default_mac boot_device=sda rootfs_device=sda biosdevname=0 inst.text console=tty0 inst.gpt security_profile=standard user_namespace.enable=1
initrdefi initrd.img
}
menuentry 'EXTENDED Security Boot Profile' {
linuxefi vmlinuz bootifonly=1 devfs=nomount inst.repo=xxxHTTP_URLxxx inst.ks=xxxHTTP_URLxxx/pxeboot_smallsystem_lowlatency.cfg ksdevice=$net_default_mac BOOTIF=$net_default_mac boot_device=sda rootfs_device=sda biosdevname=0 inst.text console=tty0 inst.gpt security_profile=extended tboot=true user_namespace.enable=1
initrdefi initrd.img
}
}
}