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
-
ESET Discovers New Linux Malware
WolfsBane is an all-in-one malware that has hit the Linux operating system and includes a dropper, a launcher, and a backdoor.
-
New Linux Kernel Patch Allows Forcing a CPU Mitigation
Even when CPU mitigations can consume precious CPU cycles, it might not be a bad idea to allow users to enable them, even if your machine isn't vulnerable.
-
Red Hat Enterprise Linux 9.5 Released
Notify your friends, loved ones, and colleagues that the latest version of RHEL is available with plenty of enhancements.
-
Linux Sees Massive Performance Increase from a Single Line of Code
With one line of code, Intel was able to increase the performance of the Linux kernel by 4,000 percent.
-
Fedora KDE Approved as an Official Spin
If you prefer the Plasma desktop environment and the Fedora distribution, you're in luck because there's now an official spin that is listed on the same level as the Fedora Workstation edition.
-
New Steam Client Ups the Ante for Linux
The latest release from Steam has some pretty cool tricks up its sleeve.
-
Gnome OS Transitioning Toward a General-Purpose Distro
If you're looking for the perfectly vanilla take on the Gnome desktop, Gnome OS might be for you.
-
Fedora 41 Released with New Features
If you're a Fedora fan or just looking for a Linux distribution to help you migrate from Windows, Fedora 41 might be just the ticket.
-
AlmaLinux OS Kitten 10 Gives Power Users a Sneak Preview
If you're looking to kick the tires of AlmaLinux's upstream version, the developers have a purrfect solution.
-
Gnome 47.1 Released with a Few Fixes
The latest release of the Gnome desktop is all about fixing a few nagging issues and not about bringing new features into the mix.