with GRUB2 I would like to boot several ISOs directly from harddisk.
My main drive with Fedora is a Kingston SA2000M8500G detected as /dev/nvme0n1 but strangely displayed by GRUB2 as (hd1). The data drive is a Seagate ST1000DM010-2EP102 detected as /dev/sda and displayed by GRUB2 as (hd0). The ISO files are then located on (hd0.gpt1) in “/iso/file_xy.iso”.
Then I put in the file /etc/grub.d/40_custom the following code:
menuentry "Fedora 34 with XFCE" {
insmod part_gpt
insmod linux
set isofile="/iso/Fedora-Xfce-Live-x86_64-34-1.2.iso"
export $isofile
loopback loop (hd0,gpt1)$isofile
linux (loop)/isolinux/vmlinuz root=live rd.live.image quiet iso-scan/filename=$isofile
initrd (loop)/isolinux/initrd.img
}
This leads to the GRUB2 error “our of memory”, followed by the 2 persisting errors (errors that showed up by previous mistakes aswell) “no server” and “load kernel first”. Previous mistakes that lead to the errors “unknown filesystem” and “invalid filename” could be fixed by trying settings from various websites, but now I am stuck. Most search results were dated from 2011 to 2014 and I assume the syntax in GRUB2 changed. Either way, it would be great if somebody could help me to get this started.
That was partialy successful. The “not found” and “unknown filesystem” typed errors are gone. But the 2 errors that were always present in line 2 and 3 persist: