How to Create Custom Linux Mint or Ubuntu ISO

Installing Linux Mint is not a big deal.

It’s the things to do after installing Linux Mint that could feel tiresome.

And if you have to do the same on more than one system, it gets frustrating.

Imagine having several computers in your home, lab, or institution. And all of them need to have similar configurations and applications.

Now imagine this. You download Linux (Mint), make a live USB and install it on all the systems. And then you have to do the same configuration and install the same set of applications on all of them.

What if I tell you there was a way to save your time from doing these repetitive tasks? How about creating a modified ISO and put this customized Linux Mint on the live USB? This way it installs the same customized Linux distro on all the systems.

There is a handy GUI tool called Cubic that allows you to pre-configure your installs in the easiest way possible.

Let me walk you through its features and how you can use it to customize Linux Mint 21 ISO.

Do note that Cubic should work with other distributions like Ubuntu, Fedora etc. I have tested it with Mint but you may try and follow the steps for other distros.

Cubic: The easiest way to create custom ISO images

custom iso creator

Cubic (Custom Ubuntu ISO Creator) is a GUI tool made to customize Ubuntu-based distros.

It lends you to the chroot environment of ISO where you will be making significant changes, and it also allows you to decide on packages separately for minimal and normal installation.

But before jumping to the procedure, let’s have a look at some features of Cubic.

Key Features of Cubic:

  • Easy to use GUI.
  • Allows you to select packages for minimal and normal installation separately.
  • It has three tabs for specific reasons:
    1. Kernel Tab: If you went with installing multiple kernels, you can specify the boot kernel from here.
    2. Preseed Tab: From here, you can create, edit and remove preseed files. Using preseed files, you can skip the questions that are generally asked during installation, as preseed files will automate the process!
    3. Boot Tab: If you are interested in changing boot parameters, this is the place from where you can tweak how the modified ISO will boot.
  • Offers various types of compression formats to compress modified ISO files.
  • Comes with QEMU (open source machine emulator and virtualize) to test modified ISOs.

Seems too promising, right? So let’s go ahead with the installation process.

Installation of Cubic in Ubuntu-based distributions

Cubic is not available in the default repository of Ubuntu so you’d need to add PPA to install the software not available in the default repo:

sudo apt-add-repository ppa:cubic-wizard/release

Now, let’s update the repository and install Cubic:

sudo apt update && sudo apt install cubic

And that’s it!

So now, let’s move forward to how you can use Cubic to customize ISO.

How to use Cubic to create custom ISO Images

For this guide, I’m going to use Linux Mint 21 ISO. To make this guide more relevant, I’m going to perform the following operations:

  • Removal of unnecessary packages, making it a minimal ISO of Linux Mint.
  • Update remaining packages to the latest version.
  • Add new background images.
  • Install the latest Linux Kernel (6.0).

You can make your own modification based on your liking.

1. Adding/Creating a project directory

select project directory in cubic

When you open Cubic, it will ask you to choose the project directory. That is nothing but where you want all the files related to creating custom ISO images.

Here, I made a new sub-directory inside my HOME directory. Make sure to have a separate directory for every Cubic project you make. Once you’re done selecting the project directory, click on the Next button.

2. Choose the original ISO image

Here, you have to choose the original ISO image that you want to work with.

choose original iso

As you can see, I went with Linux Mint 21, and it fetched all the other information automatically.

3. Working with chroot environment

Once you select the ISO, it will extract the ISO image and you will enter into a chroot environment.

screenshot from 2022 10 21 14 13 26

This will behave as a regular terminal and also this is the place where I’m going to perform most of the operations related to customizations.

Removing packages

It’s all up to you how many packages you want to remove or you may also skip the package removal section. To remove a package, you don’t have to use the sudo that you generally use as removal of packages needs superuser privileges.

So let’s suppose you want to remove thunderbird; then the following command should get the job done:

apt purge thunderbird

But as I told you earlier, I’m going for a minimal desktop, I’ll be removing most of the additional GUI apps including Libreoffice. And if you want to do the same:

apt purge drawing gnome-calculator hexchat hypnotix libreoffice* onboard redshift redshift-gtk rhythmbox sticky thingy thunderbird warpinator webapp-manager
removing packages

Yep, it’s that easy!

Update existing packages

If you want to have the most recent packages in your next Ubuntu install, this is the step you should consider following:

sudo apt update && sudo apt upgrade
updating to the most recent packages

Adding background images

First, let’s change the current working directory to /usr/share/backgrounds:

cd /usr/share/backgrounds

As Cubic allows users to copy files by drag and drop in the current working directory (/usr/share/backgrounds in our case), I’m going to use copy my wallpapers (which I have locally downloaded).

copying imaegs by drag and drop

This must be it if you want to change the background from the file manager but if you want them to be listed in the change background dialog, you’ll have to add each one in an XML file located at /usr/share/gnome-background-properties.

Adding Linux Kernel 6.0

In this section, I’m going to download the .deb package of kernel headers and modules and then will install them using the dpkg command.

Use the given 4 commands one by one and it will download kernel modules and headers:

wget https://kernel.ubuntu.com/~kernel-ppa/mainline/v6.0/amd64/linux-headers-6.0.0-060000_6.0.0-060000.202210022231_all.deb
wget https://kernel.ubuntu.com/~kernel-ppa/mainline/v6.0/amd64/linux-headers-6.0.0-060000-generic_6.0.0-060000.202210022231_amd64.deb
wget https://kernel.ubuntu.com/~kernel-ppa/mainline/v6.0/amd64/linux-image-unsigned-6.0.0-060000-generic_6.0.0-060000.202210022231_amd64.deb
wget https://kernel.ubuntu.com/~kernel-ppa/mainline/v6.0/amd64/linux-modules-6.0.0-060000-generic_6.0.0-060000.202210022231_amd64.deb

Once you are done with downloads, you can use the dpkg command to install them:

dpkg -i *.deb
installing linux kernel 6.0 in ubuntu

4. Select packages to be removed from a minimal and normal install

With Cubic, you can even specify the list of software for both minimal and normal installation.

select packages for minimal and normal install

This is the place where you can be creative as you will be having 2 lists of software that you can use for different purposes.

For example, you can use the normal install option for desktop usage and the minimal install should be used for more minimal setups such as for servers.

Since I’ve already removed packages, there is not much left for me to do in this section.

5. Select boot Kernel

This section will bring the list of Linux kernels you have.

choose boot kernel

If you are wondering why it is showing 3 options, let me tell you how:

  • 5.15.0-41 came pre-installed.
  • 5.15.0-52 was installed when I updated existing packages.
  • 6.0 was installed manually by me.

I’m going with Linux kernel 6.0 here!

6. Choose the ISO compression type

This is the last step in the configuration where you have to choose the compression algorithm.

choose iso compression algorithm

You don’t have to have knowledge of every compression type as it has already given the graph by which you can choose the amount of compression.

And I’m going with the default one gzip option.

Once you’re done choosing compression type, click on the Generate button and your ISO will be created!

7. Testing ISO file with in-build QEMU Emulator

Once the Cubic is done with building the ISO that you instructed, It allows you to test the ISO file. To test the file, you have to click on the Test bottom located at the top left corner:

click on the test button to start qemu emulator

And it launched QEMU:

running qemu

And I came across a problem while I tried updating repositories saying: Please use apt-cdrom to make this CD-ROM recognized by APT.

How to solve “please Use apt-cdrom to make this CD-ROM recognized by APT”

please use apt cdrom to make this cd rom recognized by apt

To solve this issue, you just have to disable the installation disk (CD-ROM) from software resources.

Open software resources in Linux Mint and if you’re using Ubuntu, you’ll have to use the Software and Updates tool.

disable cd rom

Once you disable CD-ROM, it should work as any general ISO you download from the official page!

all the repositories are working fine as expected

That was a quick one. Right?

Final Words

This was my take on how you can easily create custom Ubuntu or other Linux distros’ ISO images using Cubic with its practical usage.

If this is something you could use, give it a try. Let me know in the comments if you are stuck, and I’ll try my best to help you.

Similar Posts

  • I recommend you fellas that obtain ubuntu server iso, remove everything related server administration and add your own components. No plymouth, only old fashion grub screen. I added xfce latest version and a few programs that i used often like uget, vlc player, telegram etc.

  • Years ago there was a much much much much better tool for remixing ISOs and it was called Remastersys.

    Much more powerful and much easier to use.

    Sad that 12 years later we still don’t have anything as good or better.

  • Hello, These links say Cubic is compatible for XFCE 4.12+ UBUNTU 18.04.2/18.04.5 and above i686/amd64,
    https://github.com/PJ-Singh-001/Cubic
    https://build.opensuse.org/project/show/home:tangerine:xubuntu18.04-xfce-4.12
    https://software.opensuse.org/download.html?project=home%3Atangerine%3Axubuntu16.04-xfce-4.12&package=cubic
    https://software.opensuse.org/download.html?project=home%3Atangerine%3Axubuntu18.04-xfce-4.12&package=cubic

    Distributions that can be modified only if they are compatible for XFCE:

    Xubuntu 18.04 and above
    Mint XFCE: Tricia 19.3 (Bionic) Una 20.3 (Focal) Vanessa 21 (Jammy)
    Lite XFCE 4.8 (Bionic) 5.8 (Focal) 6.0 (Jammy)
    APODIO 13-1.2.7 Focal

    There is iso-snapshot for Debian, pre-installation XFCE (I don’t know if there is any other) Xenial-Bionic-Focal or CUBIC for Jammy.
    iso-snapshot is compatible for Stretch Buster and Bullseye, they would be a good duo if they also work on Ubuntu-based ones. If anyone tries, they can write.
    Cubic, I think, only deletes the contents of the UBUNTU iso, there is no app addition, right ?
    Just for Debian, Cubic-like application for deletion and insertion would be good.
    Great guide, thank you.