Score:1

How can I install .iso file by using 40_custom of the second ubuntu, in the dual boot environment (first window 10, second ubuntu)?

au flag

How can I install .iso file by using 40_custom of the second ubuntu, in the dual boot environment (first window 10, second ubuntu)?

The disk environment in Ubuntu is 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 environme
/dev/nvme0n1p6   Linux filesystem

I left out the information such as disk size, start, end and sectors.

nvme0n1p3 is window. nvme0n1p4 is ubuntu.

For iso mount, I created an empty partition in the window 10.

The follow is the 40_custom I modified.

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
}

I think I must specify the exact location in loopback loop (hd0,5), but I don't know how.

I find the location. In my system, nvme0n1p1 is same as (h0,gpt1).

Finally, the system could find the iso file.

ps.

The following error occur, when I enter the additional option.

error: file "<filepath>" not found. 
error: no server is specified. 
error: you need to load the kernel first. 

Conclusion :

The problem is solved for this post.

I'll leave this post as the correct answer for those who, like me, misunderstood the location of the file. (In the loopback loop line, (hd0,gpt4) is the partition of the file.)

Another problem(kernel panic) :

error: out of memory

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

This seems to be a version compatibility issue between the ubuntu 22.04 kernel and ubuntu 20.04.

I think this is out of this post. So, I will address this kernel panic issue in another post.

cc flag
That's fine, provided you're not mounting a separate /home. In that case, you would specify from the top of the partition, not the root fs.
3088 K avatar
au flag
@ubfan1 But, when I reboot, the iso install manu is not found. There are only options such as ubuntu, ubutu advance, window, and UEFI formware setting.
oldfred avatar
cn flag
I am not seeing your Linux partition? Getting path (& drive) correct is one of the bigger issues as it is seen before system boots in grub so its default paths, not mounted after boot paths. https://askubuntu.com/questions/1269462/bios-uefi-template-image-for-booting-iso-files & https://help.ubuntu.com/community/Grub2/ISOBoot & https://help.ubuntu.com/community/Grub2/ISOBoot/Examples
cc flag
Did you run sudo update-grub after modifying the 40_custom file?
3088 K avatar
au flag
@ubfan1 Yes, currently the install option can be found. 3 error occur. file "<filepath>" not found. no server is specified. you need to load the kernel first. I think the root path is not correct. I add "set root=(hd0,4)", but it is not worked. After then, I add "set isofile="/dev/nvme0n1p4/home/<username>/<iso_file_name>", but it is not worked, too.
cc flag
I assume you used your real username in place of <username>, but partitions start at 1, so the iso should be on (hd0,4)... not 5.
3088 K avatar
au flag
@ ubfan1 uhmm.. Let me summarize the process. I first made new partition nvme0n1p6. And set the "loopback loop (hd0,6)$isofile". It is worked. The iso file location is in nvme0n1p4 (same as (hd0,4)). I edit the post.
3088 K avatar
au flag
@ ubfan1 thank you for your comment. I was misunderstanding the file location. the file location problem is resolved. But now a new error has occurred. "error: out of memory" "kernel panic not syncing vfs unable to mount root fs on unknown block 0 0". This seems to be a version compatibility issue between the ubuntu 22.04 kernel and ubuntu 20.04. Since this issue is out of the current post, I'll make a differnt post.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.