Creating custom ISO images
DIY Imager
If you are looking to customize your Linux distribution, we show you three graphical front ends for creating bootable ISO images.
Specialized Linux distributions exist for virtually any imaginable use case. However, much like the typical all-rounders for daily use, these distributions often come with many superfluous applications. These apps consume disk space and – if they happen to run in the background – CPU resources as well. Some users want a lean basic system without additional software, which they can customize with the programs they actually need. This article looks at graphical front ends that give users a DIY Linux image quickly without too much overhead.
Strategies
Customizable Linux distributions are usually based on a conventional ISO image. Ideally, the image will already contain a graphical user interface or offer a simple approach to installing a graphical desktop at the prompt. You also need an integrated package manager. A customizable system image often comes with a choice of multiple kernel versions. Standard applications like LibreOffice, Firefox, Gimp, or VLC may be missing, but they can be installed via the package manager if necessary. To be able to use a system like this on several computers later, you need the ability to create ISO images of the system by deploying a handy tool, one that is easy to use and not just for Linux gurus.
Approach
There are two approaches to generating a custom ISO image of a distribution. The first approach involves working with a live system. You first install and run the desired distribution on your computer and remove all unwanted applications. To this trunk system, you then add all the applications you actually need for your individual Linux system. Then, using a tool for generating ISO images gleaned from the running system, you create an image into which you bundle the entire running system, including the newly installed additional applications.
The second approach uses an existing ISO image obtained from the Internet (without prior installation) as the basis for a custom system. The tool generates the individual system from the standard image by loading it and temporarily unpacking it for editing. It then creates the custom image from the image you modified.
Depending on whether you want your custom Linux derivative to boot from optical media or a removable USB, you may need different tools to generate the ISO image. If possible, chose a tool that lets you generate hybrid images (i.e., ones that can boot from optical or flash media as needed).
Cubic
The Custom Ubuntu ISO Creator, or Cubic [1] for short, can be used on Ubuntu, Debian, and their derivatives to create individual ISO images. You can pick up the software from a separate repository. To add the archive to your package management system, first open a terminal and update your system. Then include the Cubic repo in your running system and install the software (Listing 1). After that, you can launch the tool from the system menu to open a virtually empty window (Figure 1).
Listing 1
Cubic Setup
$ sudo apt-add-repository ppa:cubic-wizard/release $ sudo apt update $ sudo apt install --no-install-recommends cubic
When you get there, start by selecting a project directory where the data for the ISO image to be generated will be stored. To do this, click on the folder icon bottom right next to the empty path display, and then select the desired directory in the file manager. You can apply the path by clicking the green Select button top right in the file manager. Then, in the main window, click Next top right.
In the next dialog box, you define the source and the target images. Cubic does not generate the new image from a running system, but from an existing ISO image. You can use any image file. Ideally, you will want to use an image that is as lightweight as possible.
After selecting the source image, Cubic fills out most of the fields in the dialog automatically. It checks the boxes to the left of each completely and correctly filled out field. If problems occur, or Cubic cannot determine certain data from the source image, it places a question mark after the respective field. You can ignore optional information such as the release URL and leave the related fields empty.
After clicking Next, Cubic analyzes the source image. If problems occur (e.g., the image is not an Ubuntu or Debian derivative), the program displays an error message. For successfully identified images, Cubic opens and extracts the data. You then click Customize at the top right of the window to enter a virtual terminal, with Cubic executing a chroot
.
You can now work with the extracted ISO image at the prompt (Figure 2). Because you are working as the admin in the virtual terminal, you can enter commands directly without prefixing sudo
. As a first step, you should update the ISO image by typing:
apt update && apt upgrade
Depending on the image's age, this can generate a considerable download volume.
After updating the system, use
apt purge APPLICATION
to remove any unwanted applications included in the standardized ISO image. Vice versa, use
apt install APPLICATION
to add any desired applications to the custom ISO image.
If you do not know exactly which applications the source ISO includes, you can also install the new applications first after completing the update and then press Next in the top right corner of the terminal. Cubic then analyzes the updated image and directs you to a window with a list of available applications (Figure 3). In the window, check the boxes of the listed applications that you want to delete. Typical candidates include, for example, the many additional packages for localizing LibreOffice.
Now, switch to the next dialog where you can choose between different kernels for the new image. In the following and final dialog, you need to specify the compression for the new filesystem. You have a choice of several methods here, with Cubic displaying their compression efficiency and the relative size of the resulting image in a graph (Figure 4). Choose the desired compression method by pressing the radio button to the left of the option.
Then click Generate to start creating the new ISO image. Cubic goes through several steps, which it displays individually and documents with progress bars. Depending on the size of the image to be created and your computer's resources, this can take some time. After successfully completing each step, Cubic will show you some data about the new image in an overview window.
For an initial test, open a Qemu virtual machine (VM) by clicking the green Test button at top left; Cubic will start the new live system in the VM. After closing the VM, you are taken back to the last dialog in Cubic and can exit the application by pressing Close. This completes the process of generating the new image.
Buy this article as PDF
(incl. VAT)
Buy Linux Magazine
Subscribe to our Linux Newsletters
Find Linux and Open Source Jobs
Subscribe to our ADMIN Newsletters
Support Our Work
Linux Magazine content is made possible with support from readers like you. Please consider contributing when you’ve found an article to be beneficial.
News
-
Wine 10 Includes Plenty to Excite Users
With its latest release, Wine has the usual crop of bug fixes and improvements, along with some exciting new features.
-
Linux Kernel 6.13 Offers Improvements for AMD/Apple Users
The latest Linux kernel is now available, and it includes plenty of improvements, especially for those who use AMD or Apple-based systems.
-
Gnome 48 Debuts New Audio Player
To date, the audio player found within the Gnome desktop has been meh at best, but with the upcoming release that all changes.
-
Plasma 6.3 Ready for Public Beta Testing
Plasma 6.3 will ship with KDE Gear 24.12.1 and KDE Frameworks 6.10, along with some new and exciting features.
-
Budgie 10.10 Scheduled for Q1 2025 with a Surprising Desktop Update
If Budgie is your desktop environment of choice, 2025 is going to be a great year for you.
-
Firefox 134 Offers Improvements for Linux Version
Fans of Linux and Firefox rejoice, as there's a new version available that includes some handy updates.
-
Serpent OS Arrives with a New Alpha Release
After months of silence, Ikey Doherty has released a new alpha for his Serpent OS.
-
HashiCorp Cofounder Unveils Ghostty, a Linux Terminal App
Ghostty is a new Linux terminal app that's fast, feature-rich, and offers a platform-native GUI while remaining cross-platform.
-
Fedora Asahi Remix 41 Available for Apple Silicon
If you have an Apple Silicon Mac and you're hoping to install Fedora, you're in luck because the latest release supports the M1 and M2 chips.
-
Systemd Fixes Bug While Facing New Challenger in GNU Shepherd
The systemd developers have fixed a really nasty bug amid the release of the new GNU Shepherd init system.