How to Install Ubuntu-Based OS on Internal Hard Drive Without a Flash Drive Using Another Drive [duplicate]
Solution 1:
While I still use boot stanza like those in the link in guiverc comment, just used this for jammy.
I never would remember to run sudo update-grub after changing an ISO or adding one. So I use a configfile entry to load a text file with boot stanzas that is in my ISO folder.
Entry in grub that I never change:
menuentry 'Live ISOs in data drive' {
search --set=root --label data --hint hd1,gpt4
configfile /ISO/livecdimage.cfg
}
I also found using label works better as my hd1 was changing to hd2 when rebooting with a flash drive or my external SSD connected. Used to have to edit stanza as I booted. But forget to edit stanza and found using label it still found it correctly.
Also found that newer versions of ISO have both grub & a loopback entry. So tried booting with the loopback entry. It worked.
This is one of many boot stanzas in my livecdimage.cfg which is just a text file, that is in my /mnt/data/ISO folder with all my ISO. The /mnt/data is only seen once booted in my system. When not booted or not mounted it is just /ISO.
menuentry "Kubuntu 22.04 Jammy amd64 loopback.cfg" {
iso_path=/ISO/jammy-desktop-amd64.iso
export iso_path
loopback loop $iso_path
set root=(loop)
configfile /boot/grub/loopback.cfg
}