From 457e800c940136425663b14e8e5c154ced184b63 Mon Sep 17 00:00:00 2001 From: Lyndon Brown Date: Tue, 24 Mar 2020 22:19:16 +0000 Subject: [PATCH] grub2|loopback: move advanced installer entries under own submenu this takes a step forward in moving towards the same updated layout as with syslinux; here we get: - - Start installer - Advanced install options... - - Advanced options... - Memory Diagnostic Tool (memtest86[+]) note that this only affects the default menu. custom configs are not affected by this change. further steps to complete the move to the updated layout will follow later. "Advanced options..." should perhaps be renamed later. Gbp-Dch: Short --- scripts/build/binary_loopback_cfg | 5 +++++ share/bootloaders/grub-pc/grub.cfg | 9 ++++++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/scripts/build/binary_loopback_cfg b/scripts/build/binary_loopback_cfg index 35a926237..ac5d0d90e 100755 --- a/scripts/build/binary_loopback_cfg +++ b/scripts/build/binary_loopback_cfg @@ -233,6 +233,8 @@ fi # Assembling debian-installer configuration if [ "${LB_DEBIAN_INSTALLER}" != "none" ] then + ENABLE_INSTALL_MENU="true" + KERNEL_DI="/install/vmlinuz" INITRD_DI="/install/initrd.gz" APPEND_DI="vga=normal ${LB_BOOTAPPEND_INSTALL} --- quiet" @@ -262,6 +264,8 @@ then Grub_install_entry "Automatic install in text mode" "auto" "${KERNEL_DI}" "${INITRD_DI}" "auto=true priority=critical ${APPEND_DI}" "a" Grub_install_entry "Rescue system in text mode" "rescue" "${KERNEL_DI}" "${INITRD_DI}" "rescue/enable=true ${APPEND_DI}" "r" fi +else + ENABLE_INSTALL_MENU="false" fi # Assembling memtest configuration @@ -296,6 +300,7 @@ sed -i \ -e "s|@LB_BOOTAPPEND_INSTALL@|${LB_BOOTAPPEND_INSTALL}|" \ -e "s|@LB_BOOTAPPEND_LIVE_FAILSAFE@|${LB_BOOTAPPEND_LIVE_FAILSAFE}|" \ -e "s|@LB_BOOTAPPEND_LIVE@|${LB_BOOTAPPEND_LIVE}|" \ + -e "s|@ENABLE_INSTALL_MENU@|${ENABLE_INSTALL_MENU}|" \ -e "s|LINUX_LIVE|$(escape_for_sed "${LINUX_LIVE}")|" \ -e "s|LINUX_INSTALL|$(escape_for_sed "${LINUX_INSTALL}")|" \ -e "s|LINUX_ADVANCED_INSTALL|$(escape_for_sed "${LINUX_ADVANCED_INSTALL}")|" \ diff --git a/share/bootloaders/grub-pc/grub.cfg b/share/bootloaders/grub-pc/grub.cfg index d4a51e96f..8690b097b 100644 --- a/share/bootloaders/grub-pc/grub.cfg +++ b/share/bootloaders/grub-pc/grub.cfg @@ -45,13 +45,20 @@ play 960 440 1 0 4 440 1 # } # Installer (if any) +if @ENABLE_INSTALL_MENU@; then + @LINUX_INSTALL@ -submenu 'Advanced options...' --hotkey=a { +submenu 'Advanced install options...' { # More installer entries (if any) @LINUX_ADVANCED_INSTALL@ +} +fi + +submenu 'Advanced options...' --hotkey=a { + # Memtest (if any) @MEMTEST@