1

Ubuntu 20.04 iso installation using 40_custom, is failed in the grub 2.06 of ubuntu 22.04 LTS desktop.

I add the following code to below of 40_custom.

menuentry "Ubuntu 20.04.05 ISO" {
   isofile="/home/<username>/ubuntu-20.04.5-desktop-amd64.iso"
   loopback loop (hd0,gpt4)$isofile
   linux (loop)/casper/vmlinuz boot=casper iso-scan/filename=$isofile noprompt noeject
   initrd (loop)/casper/initrd
}

(hd0,gpt4) is ubuntu 22.04 LTS. And grub version is 2.06.

The following error occurs.

error : out of memory.

kernel panic not syncing vfs unable to mount root fs on unknown block 0 0

the partition is constructed as follows.

Disk /dev/nvme0n1: 
Disk model: Samsung SSD                      
Units: 
Sector size (logical/physical): 
I/O size (minimum/optimal): 
Disklabel type: gpt
Disk identifier:

Device Type /dev/nvme0n1p1 EFI System /dev/nvme0n1p2 Microsoft reserved /dev/nvme0n1p3 Microsoft basic data /dev/nvme0n1p4 Microsoft basic data /dev/nvme0n1p5 Windows recovery environmet /dev/nvme0n1p6 Linux file system

The window 10 was installed, then, ubuntu 22.04 is installed.

Solution :

When ubuntu 20.04 iso file is used, the rmmod tpm must be added as follows.

menuentry "Ubuntu 20.04.05 ISO" {
   rmmod tpm
   isofile="/home/<username>/ubuntu-20.04.5-desktop-amd64.iso"
   loopback loop (hd0,gpt4)$isofile
   linux (loop)/casper/vmlinuz boot=casper iso-scan/filename=$isofile noprompt noeject
   initrd (loop)/casper/initrd
}
3088 K
  • 69
  • Your Linux system is in partition 6, but you are using partition 4 in gpt4? – oldfred Dec 08 '22 at 17:11
  • @oldfred partition 6 is the empty space for the ubuntu 20.04 installation. The ubuntu 22.04 is installed in partition 4. It is the root of grub 2.06. There was no matter, even though the type is Microsoft basic data. – 3088 K Dec 09 '22 at 01:19
  • Ubuntu can only install in Linux formats like ext4, and cannot install in Windows formats. Unless you are using Windows WSL which is not quite standard. – oldfred Dec 09 '22 at 04:52
  • @oldfred This is just a type name. The gpt4 format is ext4. I am not using Window WSL. – 3088 K Dec 09 '22 at 04:56
  • Some hints for booting ISO files that work for me with both 20.04 and 22.04: https://askubuntu.com/questions/1269462/bios-uefi-template-image-for-booting-iso-files – C.S.Cameron Dec 09 '22 at 05:09
  • 1
    Or see https://askubuntu.com/a/1251782/43926 for GRUB 2.04 Workaround, (which should also work for 2.06. – C.S.Cameron Dec 09 '22 at 05:18
  • 1
    @C.S.Cameron Thank you! The problem is solved. – 3088 K Dec 09 '22 at 06:29

0 Answers0