how to make Customized Ubuntu Ubuntu 20.04.3 LTS instalation image?

Issue: Creating ubunut instalation image with preinstalled software and configuration Optimal solution: A bootable ISO that can be mounted on USB device which then would install the Ubunut with just One YES/NO answer

Is there a way to create a custom Ubuntu instalation image which would contain special software packages to be installed? For example Ubuntu_custom.iso when used to install would then have below software preinstalled on the system:

software:

Atom
Python 3.10
Git
etc

Configuration:

Location: NewYork
UserName:Test1
Password:Test2

and have other exotic features such as having squid-deb-proxy-client installed ?


Yes this is possible, I use software called Cubic to achieve this.

The basic process is this:

  1. Open default Ubuntu ISO in Cubic
  2. Modify the filesystem and install any applications you need e.g. atom, Python etc.
  3. Create a Pre-seeding file to automate installation. Inside this file you can specify the locale, timezone, language and user accounts to be created.
  4. Edit the launch parameters of Grub to boot the installer using the pre-seeding file, info on that here. I don't think the guide is particularly great at jump starting this process so as an example here's what my entry in grub.cfg looks like:
menuentry "Install with Preeseeding File" {
    set root=(hd0)
    set gfxpayload=keep
    linux   /casper/vmlinuz boot=casper file=/cdrom/preseed/mirror.seed auto=true priority=critical debian-installer/locale=en_GB keyboard-configuration/layoutcode=gb ubiquity/reboot=true languagechooser/language-name=English countrychooser/shortlist=GB localechooser/supported-locales=en_GB.UTF-8 automatic-ubiquity  quiet splash ---
    initrd  /casper/initrd.lz
}

This probably won't work for you because it reference some things specific on my device but I hope it serves as a decent example.

Pre-seeding is complex, the full official guide is here. The plan is to use the template and modify it to your needs.

Some other answers with useful information that will help:

  • How to use Cubic to create a custom Ubuntu live CD image?

Some pictures of Cubic: Editing terminal

Adding and customising preseeding file.

Editing grub.cfg boot parameters to use preseeding file.