3

This is the menuentry I currently have under my grub.cfg.

menuentry "Xubuntu 20.04 Live CD (64-bit AMD64)" {
    insmod part_gpt
    insmod exfat
    insmod search_fs_uuid
set iso_file=/iso/xubuntu-20.04-desktop-amd64.iso
search --no-floppy --set=root --fs-uuid 92AE-07D5

loopback loop ($root)$iso_file
linux (loop)/casper/vmlinuz boot=casper iso-scan/filename=$iso_file noprompt noeject
initrd (loop)/casper/initrd

}

I've checked the following article examples but no luck.

The issue that after I've chosen the menuentry. It finds the ISO just fine but later after it has echoed some starting dialogue it says it's unable to find the ISO.

This script works fine with Xubuntu 18.04.4 Live CD and Lubuntu Boot Recovery ISO in the same iso folder.

I've tried chainload a loopback of the ISO but after going through numerous search results I've found an article that says it isn't possible. Preferably, I like to keep all my grub ISOs in one folder instead of separate drive partitions.

Nova
  • 147
  • 4
  • 1
    I do not see rmmod tpm which is necessary when booting ISO files using grub 2.04 (found in Ubuntu 20.04). Please see: https://askubuntu.com/questions/1251729/20-04-booting-iso-from-grub-menu/1251782#1251782 – C.S.Cameron Jul 07 '20 at 02:36

1 Answers1

2

Booting ISO files Ubuntu 20.04

rmmod tpm is necessary for booting ISO files with Ubuntu 19.10 and later, (due to the use of GRUB 2.04.

You might also want to get rid of the Disk Check every boot and maybe speed things up by booting toram, (optional).

menuentry "Ubuntu 20.04 ISO" {
    rmmod tpm
    set root=(hd0,3)
    set isofile="/isos/ubuntu-20.04-desktop-amd64.iso"
        loopback loop $isofile
        linux (loop)/casper/vmlinuz boot=casper iso-scan/filename=$isofile persistent persistent-path=/ub2004-1/ fsck.mode=skip quiet splash toram -- 
        initrd (loop)/casper/initrd
}

persistent and persistent-path are only necessary if you want persistence.

See: 20.04 booting .iso from GRUB menu

C.S.Cameron
  • 19,519
  • I've added the rmmod tpm but it says the module doesn't exist. After running grub-install --version it says it's 2.02 but Xubuntu doesn't provide 2.04 for OS version 18.04 under the latest apt packages so I'm a bit stuck. – Nova Jul 07 '20 at 12:36
  • 2
    @Nova: Is your ISO on an exFAT partition? With UUID 92AE-07D5? exFAT has not worked for me, NTFS and ext4 have. Are you booting in BIOS or UEFI mode? – C.S.Cameron Jul 07 '20 at 13:27
  • 1
    exFAT is the partition containing the folder with my ISO images and I'm using UEFI. – Nova Jul 07 '20 at 14:06
  • Your question does not have the quotes around the set isofile = as C.S. Cameron posted. Is that a typo in your post or the issue? – oldfred Jul 07 '20 at 14:18
  • Thanks @oldfred, I was overlooking that, but about to suggest the OP copy and paste my menuentry. – C.S.Cameron Jul 07 '20 at 14:24
  • I've tried quoting but didn't work. It does find the ISO but later showing the boot logs it later no longer can find it. – Nova Jul 07 '20 at 15:24
  • 1
    I would try with another file system in the partition, where you have the iso file. I would recommend ext4, but it works with NTFS too. – sudodus Jul 07 '20 at 15:30
  • 1
    I got it to boot from ext4. However, I ran into a new issue. Once the desktop is up the icons and dropdown menus are glitched up were they look like stairs but the desktop toolbar looks okay. I added fsck.mode=skip quiet splash toram to the line but it then throws an error next time I tried booting without persistence. Something about ACPI and BIOS. Oddly the ISO seemed fine when I tried it in VirtualBox. Sorry about the constant problems. I never thought upgrading would have many issues. – Nova Jul 07 '20 at 17:06
  • 1
    I added nomodeset at the end of Linux entry line. It fixed the graphic issue. I should be able to install it now. Thanks for all your help. – Nova Jul 07 '20 at 17:49