I loaded a few ISO files which I can try out by the application “Boxes 3.30.2-1.1” (in principle). I would like to construct a corresponding boot menu for the software “GRUB 2.02-35.1”.
Example:
…
menuentry 'Knoppix 8.2 (aus einer Ext3-Partition)' --class Debian --class Linux --class ISO {
insmod part_msdos
insmod ext2
ISO='/ISO/KNOPPIX_V8.2-2018-05-10-DE.iso'
search -f --set --no-floppy $ISO
loopback xyz $ISO
linux (xyz)/boot/isolinux/isolinux.bin findiso=${ISO} ${GRUB_CMDLINE_LINUX_DEFAULT} ${GRUB_CMDLINE_LINUX} lang=de ${EXTRA}
initrd (xyz)/boot/isolinux/minirt.gz
}
menuentry 'GParted 0.32.0-1 (aus der SSHD-Boot-Partition)' --class Debian --class Linux --class ISO {
insmod part_msdos
insmod ext2
ISO=/ISO/gparted-live-0.32.0-1-amd64.iso
search -f --set --no-floppy $ISO
loopback xyz $ISO
linux (xyz)/syslinux/isolinux.bin boot=live config union=aufs noswap noprompt ip=frommedia findiso=/boot$ISO toram=filesystem.squashfs lang=de keyboard=de
}
…
I know that similar specifications worked for a while. But I wonder about the message “error: invalid magic number” now after I selected one of these boot menu entries.
Which places should be adjusted for the desired functionality?
I would like to continue with the usual “boot menus” which can be provided also by such ISO files.
Do you know more appropriate specifications for the GRUB configuration script?
Way back when I looked at booting ISO files in GRUB2,
You not only had to create the menu entry, you also had to mount the ISO in GRUB.
No big deal, but it’s something that has to be done, and it’s not mounted the same way you mount in a running full OS.