In the next article we are going to take a look at Cubic. The name of this app is an acronym for Custom Ubuntu ISO Creator. This comes as a graphical user interface application to create a bootable Ubuntu Live image (ISO) customized.
Cubic is actively developing and offers many options for easily create an Ubuntu live image. It has a built-in command line chroot environment from where we can perform all customizations, such as installing new packages, Kernels, adding more background wallpapers, adding files and folders.
This program is used to create Ubuntu live images, but I think it can be used with other Ubuntu flavors and derivatives, such as Linux Mint. Cubic will not create a live DVD of our system. Instead, just create a custom live image from an Ubuntu ISO.
Table of Contents
Install Cubic on Ubuntu
The Cubic developer, to facilitate the installation process, has created a PPA. To install Cubic on our Ubuntu system, we will have to execute the following commands one by one in the terminal (Ctrl + Alt + T):
sudo apt-add-repository ppa:cubic-wizard/release sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 6494C6D6997C215E
At this point, we can install this program using the following script.
sudo apt update && sudo apt install cubic
You can see more about the installation of this program in the following link.
Create a custom Ubuntu Live ISO using Cubic
Once installed, we are going to start Cubic from the application menu or the dock.
Choose directory for the project
This will be the directory where the files of our project will be saved. Choose the path where you will store your Ubuntu installation ISO image. Cubic will automatically fill in all the details of your custom OS. We can change the details if that is what we want.
Once the filesystem has been extracted, we will access the chroot environment automatically. From here we can install any additional packages, add background images, add software source repository list, add latest kernel to our ISO and all other customizations.
In addition, we will have the possibility to update the list of software sources. After modifying the list of sources we cannot forget to update the list of sources.
We will also be able to add files or folders to the project. We can copy the files / folders by right clicking on them and choosing to copy or use CTRL + C. To paste we will only have to click with the right button on the Terminal (inside the Cubic window). We will only have to choose Paste file (s) and finally click Copy.
We can add our own wallpapers. To do so, we will have to go to the directory / usr / share / backgrounds /:
Once in it, we only have drag / drop the images into the Cubic window. Or copy the images and right click on the Cubic window. We will have to choose the option Paste file (s). What's more, we will have to add the new wallpapers in an XML file in / usr / share / gnome-background-properties, so you can choose in the dialog box. In this folder we will already find some files that can serve as a guide.
Choose the kernel version
On the next screen we will have to choose the kernel version to use when booting the new ISO. If you have installed additional kernels, they will also be listed in this section.
Remove packages after installation
The next section will allow us to select the packages that we want to remove from our live image. The selected packages will be removed automatically after the Ubuntu operating system has been installed using custom image. Here you have to be careful when choosing packages to remove, it is possible to remove a package that depends on another package without knowing it.
Now, the live image creation process will begin. It will take a while depending on the specifications of your system.
Once the image creation process is complete, we just have to click Finish. Cubic will display the details of the newly created custom image.
If you want to modify the new custom image created live in the future, we will have to uncheck the option that says «Delete all project files except the generated disk image and the corresponding MD5 checksum file«. Cubic will leave the custom image in the project's working directory and we will be able to make changes in the future. We won't have to start all over again.
Note for Ubuntu 17.10 users:
On Ubuntu 17.10 system, DNS lookup may not work in the chroot environment (although I have to say that it worked correctly for me). If you are creating a custom Ubuntu 17.10 live image, you should point to the correct resolve.conf file:
ln -sr /run/systemd/resolve/resolv.conf /run/systemd/resolve/stub-resolv.conf
To verify that DNS resolution works, run these commands:
cat /etc/resolv.conf ping google.com
To eliminate this program, we will only have to open the terminal (Ctrl + Alt + T) and write in it:
sudo apt-add-repository -r ppa:cubic-wizard/release sudo apt remove cubic && sudo apt autoremove