Creating custom Ubuntu images
Roll Your Own
With a little planning, Cubic makes customizing Ubuntu ISOs simple and intuitive, saving you time on your post-install modifications.
You probably have folders full of scripts for post-install customizations for things like installing or removing packages; setting customized defaults, fonts, themes, and wallpapers; or copying files, folders, or settings from local storage. In larger organizations, these post-install customizations can include standard practices for IP address assignment, network interface specifics, network share preferences, boot config arguments, and more.
When it comes to installing the vanilla Ubuntu ISO [1] (desktop or server), your organization most likely performs these post-install customizations on dozens or even hundreds of devices, over and over again. While minor customizations based on an individual machine's or a particular machine's intended purpose are inevitable, the overarching changes to the default image are ripe for incorporating into a new custom image.
With Cubic [2], you can create a customized Ubuntu Live ISO image using Cubic's GUI wizard. Cubic takes the simplicity of a typical Ubuntu installation and combines it with all of the things that a user would normally do in the terminal or GUI post-installation. Cubic's strength lies in its ability to function as a cloning machine. With a little bit of initial planning, Cubic can you save you time when it comes to deploying machines, whether they're desktops or servers.
Why Customize?
With Cubic, the process of creating a custom Ubuntu ISO to meet your specific needs is made incredibly simple with a terminal-based app interface that should be familiar to anyone who regularly deals with the post-install blues. In fact, you can simply run those same scripts mentioned earlier to create the image itself. Then, when it comes time to execute on an upcoming deployment, you will have an all-in-one image ready to go.
While this custom image may take a bit of time to set up initially, it can save an enormous amount of time on the back end. Careful consideration on the front end to create a picture-perfect image (pun intended) can save hours of mind-numbing frustration later. In addition, you can save a fair amount of network bandwidth by having one image with all of the updates preinstalled, all the packages downloaded and included, and with nearly everything ready to go.
You may argue "sure, but I have a local network cache for my downloads so that isn't a concern." I urge you instead to consider not what you can do, but rather what can you not do if that cache is being repetitively pummeled with simple deb downloads from your internal network, while simultaneously heating up the house and sucking down the watts. Cubic offers a super easy way to work smarter and not harder, as the saying goes.
There is a downside to this convenience: Mistakes or configuration errors are then multiplied across your entire organization and network. Therefore, you must thoroughly test your installation image and ensure that it has been carefully considered. For example, opening firewall ports for one server may not be acceptable for another server with a different purpose. Again, work smarter, not harder.
Installation
Installing Cubic involves adding the PPA and using apt
as follows:
$ sudo apt-add-repository ppa:cubic-wizard/release $ sudo apt update $ sudo apt install cubic -y
Once installed, the program can be opened from a standard desktop install's GUI.
Getting Started
First, choose the project folder, which will act as a temp folder (in non-volatile memory stored on the hard disk) for your project files until the project is complete.
Next, you need to select the original disk image file that you will customize (Figure 1). In the same dialog, you also need to assign the custom image a unique release name based on role, creation date, etc. (as specified by your organization, if applicable).
After Cubic performs a quick tear-down of the original image (Figure 2), you'll be greeted with a simple chroot environment (Figure 3) where you can begin to make customizations. At this point, you can apply updates to the existing packages to create a more up-to-date image than what was originally downloaded, install and remove packages using apt
, add repositories and keys, set defaults, modify schemas (remember to recompile afterwards as needed, of course), and set global user specifics. The chroot terminal is where Cubic's magic happens.
In the chroot terminal, you can drag and drop files and folders into the Cubic window, adding them to the currently opened directory. Copy and paste also works here. If, for instance, you have a set of approved wallpapers for your organization that each user will receive, you can simply drag and drop that folder (along with its associated XML file) into the /usr/share/backgrounds
folder. At login, each user then will have access to those defaults out of the box. Similarly, commonly used templates may be added to the /etc/skel
directory so that each user is given the same default templates, which is especially handy for non-Office-based file formats. This step is where the bulk of the customization will take place.
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
-
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.
-
AlmaLinux 10.0 Beta Released
The AlmaLinux OS Foundation has announced the availability of AlmaLinux 10.0 Beta ("Purple Lion") for all supported devices with significant changes.
-
Gnome 47.2 Now Available
Gnome 47.2 is now available for general use but don't expect much in the way of newness, as this is all about improvements and bug fixes.
-
Latest Cinnamon Desktop Releases with a Bold New Look
Just in time for the holidays, the developer of the Cinnamon desktop has shipped a new release to help spice up your eggnog with new features and a new look.
-
Armbian 24.11 Released with Expanded Hardware Support
If you've been waiting for Armbian to support OrangePi 5 Max and Radxa ROCK 5B+, the wait is over.
-
SUSE Renames Several Products for Better Name Recognition
SUSE has been a very powerful player in the European market, but it knows it must branch out to gain serious traction. Will a name change do the trick?
-
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.