2

I'm working on a project to customize an ubuntu desktop iso to add/remove packages and eventually have it boot to RAM. Here is my overall idea.

  • Create a custom OS that can be flashed into a USB and used to boot a target machine
  • Once booted, run a script that creates a persistent partition in my hard disk and copy the iso to the partition
  • Every single boot after running the script, shall use the image in the partition and boot to RAM.
  • While booting, installation should happen automatically.

Background

I was able to achieve the above mentioned functionality in Debian stretch and I thought it will be fairly straightforward and tried to reuse the scripts for Ubuntu. No surprise, I was wrong. Then I started to reach out online. Learnt and tried the following steps.

What I'm looking for?

  • I understood how to customize Ubuntu by unpacking it, changing root and installing packages - I'm capable of accomplishing this.
  • Run through installation unattended by modifying preseed file - No issues
  • During every boot, the OS present in the a hard disk persistent partition must be copied to RAM - Tried a lot, no avail. Also, this may be related to grub.cfg and isolinux/txt.cfg. Not sure.

I'm sure, I'm doing something blatantly wrong. Please forgive me if I come across as a dumb person. I may not be using jargons appropriately. Also, I can improve this question and give more information based on what you are asking. I had to start somewhere! Thank you

Edits

Based on the comments, I tried the following. Please note, I'm using cubic.

  • Boot options directory looks like the following:

enter image description here

  • Unedited boot/grub/grub.cfg looks like the following:

enter image description here

  • My modification:

enter image description here

  • Unmodified isolinux/txt.cfg looks like the following and I erased all contents inside:

enter image description here

  • Unfortunately, this was my output:

enter image description here

I'm super confused as to what files to modify. I'm not able to understand when the isolinux is used and when grub.cfg is used. Do I have to modify both the same way ? Can someone help me out on this please ?

  • Just boot the iso stored on SSD from grub. – WinEunuuchs2Unix Dec 30 '20 at 13:26
  • Could you please elaborate ? Thanks – venkisagunner Dec 30 '20 at 13:28
  • I'm on my phone but you can google it. – WinEunuuchs2Unix Dec 30 '20 at 13:29
  • Everything you could want to know about booting an ISO from GRUB2: https://askubuntu.com/questions/1269462/bios-uefi-template-image-for-booting-iso-files – C.S.Cameron Dec 30 '20 at 14:09
  • I had experience with building custom Ubuntu ISO's for 16.04 version (the ones released in 2016) I used that ISO for 4 years. I bought a new computer. When it was time for building a new ISO for myself, I've encountered several problems with using Ubuntu again (including repositories problems, which should be an essential part of it) In my opinion, Ubuntu-based distros are not up to par in terms of care anymore. I would recommend using MX Linux because it's based off Debian 10 Buster. Now I understand why people compliment Debian so much. Can't go wrong with Debian really. – Winampah Mar 14 '21 at 19:05

0 Answers0