During bootup, I enter the grub2 command-line by pressing c on the Grub menu.
When I type the following command...
loopback loop (hd0,gpt2)/ubuntu-19.10-desktop-amd64.iso
...grub hangs, there is no more output or activity on the terminal, and eventually the laptop fans spin up because the laptop gets hot.
The path (hd0,gpt2)/ubuntu-19.10-desktop-amd64.iso
is valid on my system.
I get the same result, regardless of which ISO I use, and I have verified the checksums of the ISOs.
I am experiencing this in Ubuntu 19.10 and did not have this issue in prior Ubuntu releases. The version of grub2-common
I have is 2.04-1ubuntu12.
How can I get the loopback
grub command to work? (For example, do I need to load specific modules or enter other commands prior to executing loopback
?)
(Also, please add a comment if you also experience this issue on 19.10; I'd like to determine if this is specific to my install, or if this is a larger issue?)
(Please note, this question is related to another question about booting to an ISO on disk I have posted, but I beileve they are sufficiently different to warrant a separate post).
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...Remember to update grub after making the change.
Grub.cfg for loop mounting ISOs
Grub.cfg example that works for me.
I just edited the grub.cfg that I copied from the ISO.
There are many reasons a persistent USB might not boot including:
Bad MD5SUM / Corrupt ISO file
Incorrect path to ISO in grub
Incorrect root partition
Casper-rw partition not ext file system
Incorrect persistent-path, (if used), in grub
Casper-rw partition reused from previous version
Casper-rw file full
Modified or corrupted ISO9660 partition
Incorrect file type for vmlinuz and initrd (.efi and .lz)
Grub menuentry not suiting OS
USB removed before ISO file is completely copied
Problems with BIOS or UEFI boot partitions or files.
USB not set as first hard drive in grub
Bad flash drive
Bad USB socket
Not enough RAM
Incompatible computer CPU
Incompatible computer GPU
Please let me know of any reasons I have missed.
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.
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:
.
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?
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:
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...
I also could not loopback iso.
I mounted iso and copied all files and directories to (hd0,gpt7).
Then rebooted PC and typed like below on grub command line.
set root=(hd0,gpt7)
linux /kernel
initrd /initrd.img
boot
It worked!
Even thou I could not loopback iso, I could same thing as booting from iso.