Open probonopd opened 6 years ago
Just removing the hardcoded "Live" is not enough, as openSUSE then gets stalled with
dracut: PANIC: No or empty root= argument
Which brings me to the architectural point that rather than supplying the kernel boot arguments from files within this repository (that someone must always keep up to date), why not parse them out of the ISO.
find . -name grub.cfg
./boot/grub2/grub.cfg
./EFI/BOOT/grub.cfg
should give us a start. Indeed, looking at ./boot/grub2/grub.cfg
we see
# kiwi generated one time grub2 config file
set btrfs_relative_path="y"
export btrfs_relative_path
search --file --set=root /boot/0xb28746e3
set default=0
set timeout=10
if [ -n "$extra_cmdline" ]; then
submenu "Bootable snapshot $snapshot_num" {
menuentry "If OK, run 'snapper rollback' and reboot." { true; }
}
fi
set linux=linux
set initrd=initrd
if [ "${grub_cpu}" = "x86_64" -o "${grub_cpu}" = "i386" ];then
if [ "${grub_platform}" = "efi" ]; then
set linux=linuxefi
set initrd=initrdefi
fi
fi
if [ "${grub_platform}" = "efi" ]; then
echo "Please press 't' to show the boot menu on this console"
fi
set gfxmode=800x600
insmod all_video
insmod gfxterm
terminal_output gfxterm
set font=($root)/boot/x86_64/loader/unicode.pf2
set ascii_font=grub2/themes/openSUSE/ascii.pf2
set sans_bold_14_font=grub2/themes/openSUSE/DejaVuSans-Bold14.pf2
set sans_10_font=grub2/themes/openSUSE/DejaVuSans10.pf2
set sans_12_font=grub2/themes/openSUSE/DejaVuSans12.pf2
if [ -f ${font} ];then
loadfont ${font}
fi
if [ -f ($root)/boot/${ascii_font} ];then
loadfont ($root)/boot/${ascii_font}
fi
if [ -f ($root)/boot/${sans_bold_14_font} ];then
loadfont ($root)/boot/${sans_bold_14_font}
fi
if [ -f ($root)/boot/${sans_10_font} ];then
loadfont ($root)/boot/${sans_10_font}
fi
if [ -f ($root)/boot/${sans_12_font} ];then
loadfont ($root)/boot/${sans_12_font}
fi
if [ -f ($root)/boot/grub2/themes/openSUSE/theme.txt ];then
set theme=($root)/boot/grub2/themes/openSUSE/theme.txt
fi
menuentry "openSUSE_Tumbleweed_Rescue_CD" --class os --unrestricted {
set gfxpayload=keep
echo Loading kernel...
$linux ($root)/boot/x86_64/loader/linux ${extra_cmdline} splash=silent quiet root=live:CDLABEL=openSUSE_Tumbleweed_Rescue_CD rd.live.image rd.live.overlay.persistent rd.live.overlay.cowfs=ext4
echo Loading initrd...
$initrd ($root)/boot/x86_64/loader/initrd
}
menuentry "Failsafe -- openSUSE_Tumbleweed_Rescue_CD" --class os --unrestricted {
set gfxpayload=keep
echo Loading kernel...
$linux ($root)/boot/x86_64/loader/linux ${extra_cmdline} splash=silent quiet ide=nodma apm=off noresume edd=off powersaved=off nohz=off highres=off processor.max+cstate=1 nomodeset x11failsafe root=live:CDLABEL=openSUSE_Tumbleweed_Rescue_CD rd.live.image rd.live.overlay.persistent rd.live.overlay.cowfs=ext4
echo Loading initrd...
$initrd ($root)/boot/x86_64/loader/initrd
}
menuentry "Mediacheck" --class os --unrestricted {
set gfxpayload=keep
echo Loading kernel...
$linux ($root)/boot/x86_64/loader/linux mediacheck=1 plymouth.enable=0 splash=silent quiet root=live:CDLABEL=openSUSE_Tumbleweed_Rescue_CD rd.live.image rd.live.overlay.persistent rd.live.overlay.cowfs=ext4
echo Loading initrd...
$initrd ($root)/boot/x86_64/loader/initrd
}
menuentry "Boot from Hard Disk" --class os --unrestricted {
search --set=root --label EFI
chainloader (${root})/EFI/BOOT/bootx64.efi
}
if [ -f "/.snapshots/grub-snapshot.cfg" ]; then
source "/.snapshots/grub-snapshot.cfg"
fi
if [ "${grub_platform}" = "efi" ]; then
hiddenentry "Text mode" --hotkey "t" {
set textmode=true
terminal_output console
}
fi
I think we shoud write some code (e.g., C code for GRUB or a GRUB module) that would just boot this and modify the lines that need to be modified on-the-fly.
You shoud check out grub-iso-multiboot. They use a patched GRUB to accept an extra parameter (linux_extra
) and a script that automatically scans all known ISO files.
Does not find
openSUSE-Tumbleweed-Rescue-CD-x86_64-Current.iso
.It contains a
/LiveOS/squashfs.img
.The issue may be caused due to "Live" being hardcoded here:
https://github.com/aguslr/multibootusb/blob/51b811d72e25fe4883d05870b3138e7b2033f152/mbusb.d/opensuse.d/live-generic.cfg#L1