From 923080ae55d31ad5292558a8aa7a638e7a88f60c Mon Sep 17 00:00:00 2001 From: Neal Gompa Date: Jul 02 2023 07:35:34 +0000 Subject: components/liveinstall: Add custom GRUB configuration template The standard template embedded in kiwi is seemingly problematic for correctly booting the live environment, so we'll use something closer to what official Fedora/CentOS images use instead. --- diff --git a/components/liveinstall.xml b/components/liveinstall.xml index 8332eb1..1aec369 100644 --- a/components/liveinstall.xml +++ b/components/liveinstall.xml @@ -5,7 +5,9 @@ - + + + diff --git a/grub.cfg.iso-template b/grub.cfg.iso-template new file mode 100644 index 0000000..a6b71a0 --- /dev/null +++ b/grub.cfg.iso-template @@ -0,0 +1,44 @@ +# Inspired by the config used for official live media + +set default=${default_boot} + +if [ "$$grub_platform" == "efi" ]; then + function load_video { + insmod efi_gop + insmod efi_uga + insmod video_bochs + insmod video_cirrus + insmod all_video + } + set basicgfx="nomodeset" +else + function load_video { + insmod all_video + } + set basicgfx="nomodeset vga=791" +fi + +load_video +set gfxpayload=keep +insmod gzio +insmod part_gpt +insmod ext2 + +terminal_input console +terminal_output ${terminal_setup} + +set timeout=${boot_timeout} +set timeout_style=${boot_timeout_style} + +search ${search_params} + +menuentry "Start ${title}" --class fedora --class gnu-linux --class gnu --class os { + linux ($$root)${bootpath}/${kernel_file} rd.live.image ${boot_options} + initrd ($$root)${bootpath}/${initrd_file} +} +submenu "Troubleshooting -->" { + menuentry "Start ${title} in basic graphics mode" --class fedora --class gnu-linux --class gnu --class os { + linux ($$root)${bootpath}/${kernel_file} rd.live.image ${boot_options} $${basicgfx} + initrd ($$root)${bootpath}/${initrd_file} + } +}