Score:1

How to make Live USB install ISO of itself for Grub menu?

gb flag

I am making a custom Ubuntu (22.04) distribution and Live USB using Cubic. After installation, I would like to make the original live USB iso be installed on the hard drive and bootable from the Grub menu (similar in concept to a recovery partition). I think I have figured out how to make Grub have this menu entry and boot from the iso file, but I am having trouble figuring out how to make the installer copy the iso into the /boot folder (where Grub points to). I realize I could just manually copy it into there after installation, but that does not solve the problem for other users.

Of course, I could create the iso then make another version of it in Cubic which has the iso in the /boot directory, but this means making the iso twice and seems like a weird workaround.

What method would you suggest for making this happen?

C.S.Cameron avatar
cn flag
Does this help: https://askubuntu.com/a/1251782/43926
Mr. T avatar
gb flag
@C.S.Cameron I have that part figured out (how to edit Grub config to make it boot from an iso), the place where I am stuck is having the Ubuntu installer place that ISO in a place that Grub will be able to access it. And how to configure cubic to enable that.
C.S.Cameron avatar
cn flag
The ISO can be placed on either an NTFS partition or on an ext4 partition. If placed on an NTFS partition you may have problems shutting down Ubuntu. Ubuntu will use the first **writable** or **casper-rw** file or partition it runs into when booting. Ubuntu will find a persistence file using `persistent-path` in GRUB. See: https://askubuntu.com/q/850319/43926 for what it is worth. If you get it working please answer your own question here. I will follow this question.
Mr. T avatar
gb flag
@C.S.Cameron yes I am aware I can do this manually, what I don't know how to do is how to configure cubic and the installer to place this iso on the drive after installation.
I sit in a Tesla and translated this thread with Ai:

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.