0

In attempt to boot ISO from SuperGrub2 Ubuntu-derivatives will fail to load the vmlinuz or initrd.lz from casper. All files are accessible on grub but fail to load on memory.

I have used the following command on SuperGrub shell

set isofile=/User/<userprofile>/Downloads/ubuntu.iso
loopback loop (hd0,gpt3)$isofile
linux (loop)/casper/vmlinuz boot=casper iso-scan/filename=$isofile

And immediately the shell throw this error:

error: out of range
you need to load kernel first
David DE
  • 2,316

1 Answers1

0

I used grml-rescueboot to generate a menu entry and I modified it based on the ISO file place in my hard disk:

# super_grub2_disk
menuentry &quot;super_grub2_disk&quot; --class recovery{
        insmod part_msdos
        insmod ntfs
        set root='hd0,msdos3'
        iso_path=&quot;/super_grub2_disk_hybrid_2.04s1.iso&quot;
        export iso_path
        kernelopts=&quot;   &quot;
        export kernelopts
        # support booting recent GRUB versions on UEFI systems
        rmmod tpm
        loopback loop &quot;/super_grub2_disk_hybrid_2.04s1.iso&quot;
        set root=(loop)
        configfile /boot/grub/loopback.cfg
}

If you want to add Ubuntu 23 or 24 ISO file, use like this menu entry:

menuentry "Try or Install ubuntu-23.04-desktop-amd64" {

loopback loop /ubuntu-23.04-desktop-amd64.iso linux (loop)/casper/vmlinuz boot=casper layerfs-path=minimal.standard.live.squashfs iso-scan/filename=/ubuntu-23.04-desktop-amd64.iso quiet splash locale=en_US bootkbd=us console-setup/layoutcode=us noeject -- initrd (loop)/casper/initrd }

You can see some menu entries related to ISO files in this answer: https://askubuntu.com/a/1474729/1698042

Talaat Etman
  • 1,340