CUBIC
Build your own custom Ubuntu distro
Why settle for what the existing distributions have to offer? Michael Reed looks at Cubic, a tool for creating your own custom respin based on Ubuntu.
Credit: https://launchpad.net/cubic
OUR EXPERT
Michael Reed has been respinning Linux for so long that he spins it like a record, right round, baby. Right round, round, round.
QUICK TIP
When you modify an Ubuntu distribution that makes use of a live CD environment, using Cubic, you’re also modifying the live environment.
This means that Cubic is perfect for making a bootable ISO with some extra tools on it. All you need to do is select ‘Try Ubuntu’ when it starts up.
P art of the beauty of Linux is the freedom of deployment that distributions offer, but when installing it for yourself or others you’ll want to change things. So, why not make your own version, or ‘respin’? That’s what a tool called Cubic is for, and we’re going to look at how you use it to modify the standard Ubuntu installation ISO and bend it to your will in terms of content and aesthetics.
As for the difficulty? If you can install packages from the command line and boot from an ISO in a virtual machine, you should find it easy to get started with Cubic as the defaults were always usable in our experience. We’ll start with the simplest example of just adding some new packages and rebuilding the ISO. This modified ISO can be used as an installer or as a live desktop environment.
Once that’s working, we’ll show you how to customise it further by making LXDE the default desktop environment, customising that environment and adding some PPAs so that it really does feel like its your own personal spin on how Linux should look and work.
Install Cubic
Cubic expects to run under Ubuntu or Linux Mint or one of their derivatives. If you are running a different distribution, you can still use Cubic and follow this tutorial by running Ubuntu in a VM. Begin by installing from PPA. To do this, locate the Cubic page on Launchpad (https://launchpad.net/cubic) and follow the instructions by cutting and pasting the needed commands from that page. sudo apt-add-repository ppa:cubic-wizard/release adds the repository to your system. sudo apt update updates the system so that it can see contents of the Cubic PPA. sudo apt install --no-install-recommends cubic mn adds Cubic itself. Other than that, the installation should then take care of itself in terms of dependencies.
The next step is to obtain an up-to-date Ubuntu installation ISO to work with. We’ll use Ubuntu 21.04, but 20.04 LTS (Long Term Service) is a good choice as well. Launch Cubic in the normal way that you launch GUI apps or load it in a terminal window for extra progress information. When running, Cubic requires no super-user privileges, unlike some tools of this sort. The first page of the Cubic user interface enables you to specify the project directory. Cubic doesn’t run any tests for free space itself, and you’ll need quite a lot of space for the uncompressed ISO. The Ubuntu Desktop installation ISO may weigh in at around 2.7GB, but its actual content is about double that as it’s compressed using Squashfs. We’d recommend having at least 20GB free before you begin using Cubic.