Similar to above. Hard drive boot has several issues.
I boot ISO from my hard drive or SSD. I typically have two drives & create a separate partition just for ISO. I then boot ISO from one drive to install into another drive.
I find I now have to add the rmmod tpm
, but typically have to unmount the /isodrive and change mount of ESP so it does not overwrite my main working install.
2.04 Out of memory error loop mount
https://bugs.launchpad.net/ubuntu/+source/grub2/+bug/1851311
sudo umount -lrf /isodevice
So it does not overwrite my ESP, I unmount ESP while on the screen where we add name & password. I later have to edit fstab as it still has original ESP. I check mount, unmount ESP & mount another ESP like my sdb or an external flash drive.
Ubuntu Installer uses wrong bootloader location for USB/sdb UEFI installs
https://bugs.launchpad.net/ubuntu/+source/ubiquity/+bug/1173457
mount
sudo umount /target/boot/efi
sudo mount /dev/sdc1 /target/boot/efi
My ISO boot of Groovy, I now use labels so this is from the partition on my SSD and a test install of Groovy on sdb drive from sda:
menuentry "Ubuntu 20.10 Groovy amd64" {
set isofile="/groovy-desktop-amd64.iso"
insmod part_gpt
rmmod tpm
search --set=root --label iso_ssd --hint hd0,gpt5
loopback loop (${root})$isofile
linux (loop)/casper/vmlinuz boot=casper iso-scan/filename=$isofile toram
initrd (loop)/casper/initrd
}
Similarly this is from partition on HDD. This was a new install for Focal to my SSD which now is my main working install. I still have 18.04 on SSD.
menuentry "Ubuntu 20.04 Focal amd64" {
set isofile="/ubuntu-20.04-desktop-amd64.iso"
insmod part_gpt
rmmod tpm
loopback loop (hd1,6)$isofile
linux (loop)/casper/vmlinuz boot=casper iso-scan/filename=$isofile toram
initrd (loop)/casper/initrd
}
Found using labels to mount drive, partition avoids the issue of drive changing if rebooting with another USB drive plugged in & drive changing from hd1 to hd2.
How to add a GRUB2 menu entry for booting installed Ubuntu on a USB drive?
rmmod tpm
anywhere above the first menuentry in grub.cfg. Alternately mkusb with #1 USB-Pack-EFI can be used to make a 20.04 USB that uses GRUB 2.02.