Grub command `loopback loop...` does not work on Ubuntu 19.10

Solution 1:

There is a workaround to Ubuntu Bug #1851331...

Disable the TPM module by adding rmmod tpm as the 1st command in your grub config file.

For example, here is my /etc/grub.d/40_custom file...

#!/bin/sh
exec tail -n +3 $0
# This file provides an easy way to add custom menu entries.  Simply type the
# menu entries you want to add after this comment.  Be careful not to change
# the 'exec tail' line above.

menuentry "Install" {
    rmmod tpm
    set isofile="/ubuntu.iso"
    loopback loop (hd0,2)$isofile
    linux (loop)/casper/vmlinuz boot=casper iso-scan/filename=$isofile noprompt noeject
    initrd (loop)/casper/initrd
}

Remember to update grub after making the change.

sudo update-grub

Solution 2:

Similar issue I think: I use live Ubuntu as the base for my "Swiss Army" flash drives and external SSDs. I've been able to loop and boot a variety of Linux and other ISOs for some time.

If I use 19.04 for my base "install" - actually just files copied to flash - I can boot ISOs. If I use 19.10 I get a black screen hang. Three-fingered-salute will reboot the test laptop but actual booting of the ISO doesn't seem to proceed.

Example of what I've been doing: http://www.beezmo.com/geezblog/?p=1955

Sample stanza that works if 19.04 is the base but not if 19.10 is:

menuentry "Ubuntu 16.10 64-bit Desktop ISO" {
    set isofile="/bootable/iso/ubuntu-16.10-desktop-amd64.iso"
    loopback loop $isofile
    linux (loop)/casper/vmlinuz.efi boot=casper iso-scan/filename=$isofile noeject noprompt splash --
    initrd (loop)/casper/initrd.lz 
}

I'd stick with 19.04 but since 17.x if I enable persistence snapd burns all my CPU cycles and is unusable. 19.10 seems to have fixed that.

[edit to add] New here and haven't found my way around the editor. Sorry about the formatting :(

[further edit to add] And I guess this should have been a comment, not an "answer". I'll catch on eventually...

Solution 3:

mkusb simple ISO booter

If your ISO booter is still not working, here is a method that only takes a few minutes

  • Create a Persistent Drive using mkusb using all defaults.

  • Open GParted and delete the ISO9660 partition 4 and expand the casper-rw partition 5 into its space.

GParted Mods

  • Create a folder named isos in usbdata partition 1 and add an ISO.

  • Edit /boot/grub/grub.cfg in usbboot partition 2 overwriting the existing menuentries with:

.

menuentry "ubuntu-19.10-desktop-amd64.iso" {
    set root=(hd0,1)
    set isofile="/isos/ubuntu-19.10-desktop-amd64.iso"
        loopback loop $isofile
        linux (loop)/casper/vmlinuz boot=casper iso-scan/filename=$isofile persistent splash --
        initrd (loop)/casper/initrd
}

If you use 18.04 when making your mkusb foundation then the drive should use grub 2.02 to boot the 19.10 ISO. See sudodus comments How to downgrade grub from 2.04 to 2.02 on ubuntu 19.04?