1

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?

Mr. T
  • 181
  • 2
    Does this help: https://askubuntu.com/a/1251782/43926 – C.S.Cameron May 13 '23 at 01:06
  • @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. – Mr. T May 13 '23 at 06:56
  • 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. – C.S.Cameron May 13 '23 at 11:33
  • @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. – Mr. T May 13 '23 at 22:40

0 Answers0