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
-
Valve and Arch Linux Announce Collaboration
Valve and Arch have come together for two projects that will have a serious impact on the Linux distribution.
-
Hacker Successfully Runs Linux on a CPU from the Early ‘70s
From the office of "Look what I can do," Dmitry Grinberg was able to get Linux running on a processor that was created in 1971.
-
OSI and LPI Form Strategic Alliance
With a goal of strengthening Linux and open source communities, this new alliance aims to nurture the growth of more highly skilled professionals.
-
Fedora 41 Beta Available with Some Interesting Additions
If you're a Fedora fan, you'll be excited to hear the beta version of the latest release is now available for testing and includes plenty of updates.
-
AlmaLinux Unveils New Hardware Certification Process
The AlmaLinux Hardware Certification Program run by the Certification Special Interest Group (SIG) aims to ensure seamless compatibility between AlmaLinux and a wide range of hardware configurations.
-
Wind River Introduces eLxr Pro Linux Solution
eLxr Pro offers an end-to-end Linux solution backed by expert commercial support.
-
Juno Tab 3 Launches with Ubuntu 24.04
Anyone looking for a full-blown Linux tablet need look no further. Juno has released the Tab 3.
-
New KDE Slimbook Plasma Available for Preorder
Powered by an AMD Ryzen CPU, the latest KDE Slimbook laptop is powerful enough for local AI tasks.
-
Rhino Linux Announces Latest "Quick Update"
If you prefer your Linux distribution to be of the rolling type, Rhino Linux delivers a beautiful and reliable experience.
-
Plasma Desktop Will Soon Ask for Donations
The next iteration of Plasma has reached the soft feature freeze for the 6.2 version and includes a feature that could be divisive.