![]() |
VOOZH | about |
We’re so glad you’re here. You can expect all the best TNS content to arrive Monday through Friday to keep you on top of the news and at the top of your game.
Check your inbox for a confirmation email where you can adjust your preferences and even join additional groups.
Follow TNS on your favorite social media networks.
Become a TNS follower on LinkedIn.
Check out the latest featured and trending stories while you wait for your first TNS newsletter.
Have you ever wanted to build your own custom Linux distribution? You might have a specific need for a distribution that includes specific apps, files, and customizations so you can then turn around and install it on any number of machines on your business or home network.
It might sound like a challenging task, but there’s a GUI tool for Ubuntu (and Ubuntu-based distributions) that makes it much easier.
That app is called Cubic.
Cubic makes it easy to navigate the ISO customization steps (with the help of a GUI and an integrated virtual command line environment) to customize the Linux filesystem. With Cubic you can create new distributions or customize existing ones.
Cubic can be used on Ubuntu 18.04.5 and newer or Debian 11 Bullseye and newer. With Cubic, you can customize the following live ISO images:
How do you use Cubic? Let me show you.
To make this work, you’ll need a running instance of a Ubuntu-based distribution, plenty of local storage (or an attached USB drive), and a user with sudo privileges. You’ll also need to download the ISO image for the distribution you want to customize. Do note that some distributions do not work well with Cubic. During my testing, I created ISOs from an elementaryOS image and one for Debian. The end result was an ISO image from elementaryOS that wouldn’t boot but one based on Debian that worked fine, so your mileage may vary.
That’s it. Let’s get to work.
The first thing you have to do is install Cubic. To do that, log into your Ubuntu-based distribution, open a terminal app, and first add the necessary repository with the command:
sudo apt-add-repository ppa:cubic-wizard/release
Update apt with the command:
sudo apt-get update
Finally, install Cubic with:
sudo apt-get install --no-install-recommends cubic -y
Once the app is installed, you can open it from your desktop menu.
When you first open Cubic, you’ll need to select a project directory by clicking the small folder icon to the right of the drop-down (Figure 1).
Once you’ve selected a project directory, click Next.
In the resulting window (Figure 2), you must first select the original ISO image to be used. Click the folder icon associated with Filename and then locate the ISO you downloaded. This will automatically fill in most of the other bits of information. If something fails to autofill, you can’t fill it in manually, so it’ll remain blank.
Click Next.
Cubic will then analyze the disk image, copy files from the original image to the project folder, and extract the uncompressed Linux file system. When that completes, click Customize, which will land you in the terminal-based virtual environment (Figure 3).
You can now use the command line you’ll use for customization. Yes, that means you’ll need to use the command line. You can use the apt or flatpak package managers to install (or remove) anything you need for the distribution. For example, you might want to install LibreOffice, GIMP, Slack, Snapd, and whatever apps you need like so:
apt-get install libreoffice gimp snapd
One thing you cannot do is use Flatpak or Snap to install apps because they cannot connect to the system bus.
You could even replace the kernel for, say, a real-time or HWE kernel for better hardware recognition and less latency, or enable zRAM for better performance.
Maybe you want to create specific users for the ISO with the command:
adduser USERNAME
Where USERNAME is the name of the user to be added.
The tasks you can undertake from the virtual terminal is impressive. You can read more about this on the official Cubic Terminal Page Wiki.
Once you’ve finished with the customizations, click Next. The virtual environment will close and Cubic will then land on a page where you can remove any applications to shrink the size of the ISO it creates. You can go through the list (Figure 4) and select whatever apps you don’t need.
Make sure to not select anything the system relies on to run. For this, you only want to remove user-facing applications.
When you complete that, click Next. In the resulting window (Figure 5), you can select the kernel you want to use.
Click Next and then, in the resulting window (Figure 6), select your compression level and then click Generate.
And now… we wait. This process can take some time (depending on the original ISO and the customizations you’ve made). When the generation completes, click Finish.
Once the generation completes, you receive a summary and can click Close. Your new custom ISO image will be found in the project directory you selected at the beginning of the process. You can burn that image to a USB drive or share it with other people, who can then install the distribution at will.
And that, my friends, is you how can create a custom Linux distribution based on Ubuntu or Debian. Enjoy this awesome tool.