Create Your Own Linux Installation

Jarret B

Well-Known Member
Staff member
May 22, 2017
Reaction score
Some of you may want to have an installation media for installing Linux to multiple systems. Sometimes though, the pre-loaded apps may not be your favorite ones to use. In a business environment, you may need to remove a lot of apps that aren't wanted in the workplace.

Installing the Operating System (OS) on multiple systems, updating the system, removing specific apps and loading other apps could take quite a while to accomplish. You can streamline the process by creating your ISO file to use for installation. I have heard people look at the installation process of a Linux distro and say, 'I wish we could….'. Well, now I hope you can.


Before you start, you will need a system with quite a bit of free space. You will also need to have the ISO installation file for your distro (I will be using ‘ubuntu-20.04.1-desktop-amd64.iso’).

NOTE: The drive you use for extracting the ISO file onto will need to be EXT2, EXT3 or EXT4. It cannot be FAT32 or NTFS. There are incompatible filenames which will not work on the FAT32 or NTFS filesystem

Be sure to update your system before installing the needed software package.

The program we will be using is the ‘Custom Ubuntu ISO Creator’ (Cubic).

To perform the installation, perform the following steps:

sudo apt-add-repository ppa:cubic-wizard/release
sudo apt-key adv --keyserver --recv-keys B7579F80E494ED3406A59DF9081525E2B4F1283B
sudo apt install cubic

After the installation completes, then you need to get the ISO file ready. Copy the Linux distro ISO file to the ‘Downloads’ folder. Create a folder to use for extracting files. I created a folder called ‘Cubic’ in my Home folder. Now you should be ready to begin.

Creating the Custom ISO File

Open the ‘Cubic’ application and you should see a window similar to Figure 1.

Figure 01.jpg


Here is where you select the folder you will use to extract all the files used for creating a custom ISO. Press the little folder icon to the right of the empty text box then find and select the proper folder. Click 'Next' on the upper right side of the window.

The next screen, seen in Figure 2, lets you select your ISO file to use as your base image. Press the folder icon at the end of the 'Filename' line on the left side of the screen. Find and select the ISO you placed in the 'Downloads' folder. All information should be extracted from the file and filled in for you, as shown in the Figure. Make changes you need in the fields on the right side. As you can see in Figure 2, I added my initials, 'JB', in places so the new file will be different from the original. Press 'Next' when done making changes.

Figure 02.jpg


The next step, shown in Figure 3, is to extract the necessary files from the base ISO file you selected.

Figure 03.jpg


If you should have issues with the extraction, then make sure you check that the ISO file for corruption.

After extraction of the files from the ISO, a Terminal appears like Figure 4 to add and remove apps as needed.

Figure 04.jpg


Before continuing any further, you must perform the next command:

apt-add-repository universe

NOTE: Be aware that you have a Root prompt (#) in the Terminal so you will not need to use ‘sudo’.

By adding the Repository, you will be able to add other Repositories and be able to download programs.

Let’s assume you are performing the ISO creation in the morning and will be rolling out the image to multiple systems in the afternoon, or even the next day. You can save some time by performing an update and upgrade of system files on the ISO image. In this case, your first command may be:

apt upgrade

NOTE: Performing an upgrade can save a lot of time later. Even if the installer is a few weeks old, when you perform an upgrade after an install, it won’t take as long.

Since you already added a Repository, an ‘apt update’ will be performed so you only need to upgrade.

After this, you can now add/remove applications as you need. I will go through a few to give examples.

apt install htop
apt purge thunderbird
sudo add-apt-repository ppa:linuxuprising/shutter
apt install shutter

You can drag-and-drop a file onto the Terminal screen. I will do this with a file named ‘Background.jpg’. I am prompted about the file and I select ‘Copy’. It will, by default, place the file into ‘/root’. From the prompt. I can enter the command ‘mv /root/Background.jpg /usr/share/backgrounds/Background.jpg’.

I can then set the default wallpaper with the command ‘gsettings set org.gnome.desktop.background picture-uri file:////usr/share/backgrounds/Background.jpg’.

NOTE: You can set the name according to your file instead of ‘Background.jpg’.

You can copy over other files as you need in the same way. If needed, you can copy your wallpaper image over the top of the default image used by the system. The command ‘gsettings get org.gnome.desktop.background picture-uri’ will list the default wallpaper file name.

Once you have performed all the changes you require, press the 'Next ' button on the upper right side.

The next screen, Figure 5, will determine the customizations made and prepare the options necessary to continue.

Figure 05.jpg


Once it is done, you should see a screen similar to Figure 6. Here, you can select the packages to be removed from the installation. Once done, select ‘Next’.

Figure 06.jpg


Now, as in Figure 7, you are asked to choose a Kernel version. The Kernel being used, in this question, is for the Ubuntu Installation. Do not confuse this version with the version being used by the Ubuntu OS itself.

Figure 07.jpg


You will notice three tabs at the top of the window on this screen. ‘ISO Kernel’ is the current tab. You can also select ‘Preseed’ and ‘ISO Boot’. The options for the ‘Preseed’ tab are shown in Figure 8 while the options for ‘ISO Boot’ are shown in Figure 9.

Figure 08.jpg


Figure 09.jpg


Notice on the 'ISO Boot' that changes can be made to the GRUB Menu. You can change many things on these three tabs. Be careful about what you do change.

Click 'Next' to continue.

Figure 10 allows you to change the compression method. You can see that some options will create a larger ISO file, but finish faster. Others will create a smaller ISO file, but take more time to complete. Usually, the default of 'gzip' is just fine to use for your ISO creation.

Figure 10.jpg


The next screen in the process is Figure 11. The screen shows the creation of the ISO file and every step it takes to generate it. Depending on your system, this step could take a while.

Figure 11.jpg


Click 'Finish' when the steps complete. You are now on the last screen of the process, Figure 12. You should see a summary of what has been created. The location of the completed ISO file is important to note. You can check the box at the bottom of the screen to delete all the unnecessary files created during the process, which is a good idea.

Figure 12.jpg


You now have a customized ISO image created to install the Linux distro you have created to your personal needs.


The process can take a bit of time overall. If you plan on making your customized distro file, I suggest you practice performing the steps a few times. Once you have created an ISO file, you could, if needed, install it as a virtual system to test it.

The process of creating your custom installation may appeal to quite a few people. Even if you may not have a need, try it out. You may be surprised at the inventiveness you can place into this process. Since you can change everything, you can take a basic image and change the Desktop Manager, File Manager, applications, etc. If you must reinstall your system quite often, this process can save you time.

Have fun with it!

I know this is a silly question but will this work as well for Kubuntu. Will sudo apt-key adv --keyserver --recv-keys or should I change it to sudo apt-key adv --keyserver --recv-keys . Still learning so want to make sure.
  • Like
Reactions: Rob
One question, Since cubic is an Ubuntu tool, and instructions are for Ubuntu too, shouldn't the title be "Create your own, custom Ubuntu ISO"? Just saying. Good post by the way.

Members online

Latest posts