How to Create Custom Live CD image using Cubic on Ubuntu

We have the possibility to discover Ubuntu systems with the live mode which simulates the system as if it was installed. The system even not installed has some basic packages that you can use directly. But you can need to use some other tools which are not presents, so you will need to install it. It means that you might want to make your own customized Ubuntu to use in your business, or for your personal needs, or make your own ultimate rescue Ubuntu for performing rescue and recovery tasks. You can create your custom live image of Ubuntu 18.04 by using Cubic tool.

What is Cubic?

Cubic for Custom Ubuntu ISO Creator is a GUI application to create a customized bootable Ubuntu Live CD (ISO) image. Cubic integrates a command-line chroot environment that can be used for customization, such as installing new packages, adding additional files (background images, etc) and folders during the process.

To start the process with cubic you will need to create a directory for the project. During this process, cubic creates a squashfs-root folder that weighs a bit too much when you choose to don't delete the iso project at the end in order to be able to modify it later. It's just approximatively 4 Go so make sure to have at least 7 Go free space on the partition/disk which will store the project.

1) Install and launch cubic

You can install cubic on Ubuntu 18.04 to create your customized image of your Ubuntu. It is not present by default in the repositories so you need to add the ppa and update the sources

2) Customize your live CD

When cubic starts, you will need to choose a directory for your new project. It is the directory where your files will be saved. You should notice that you can have multiple customization projects but each project should be into its own directory. In our case, it is the isoproject folder

Cubic will create a custom live cd from an Ubuntu installation cd that you will use and not a live cd of your system. You will see some information on the new project page will be automatically filled out for you. On the "Original Iso" section,the information that you see is relative to the original ISO image and can not be changed, just select the ISO path but you can edit some information on the "Custom iso" section

On the next page, you can see the compressed Linux file system will be extracted from the ISO source to the custom ISO project’s directory

Now cubic will show you the chroot environment where you can install personalize your ISO by installing some packages

Now you can start downloading new packages. You can face the DNS lookups which may not work in the chroot environment so the custom live cd doesn't have some valid network files to access on the internet. You can try the ping command on a domain name. You can try an update. You will that it can not resolve the domain name.

# ping www.google.com

# apt update

You can see that the file /etc/resolv.conf points to /run/systemd/resolve/stub-resolv.conf which does not exist.

You can see that we don't have a result while listing any file that the name starts with st in /run/systemd/resolve/ folder

On the next page you can choose the default kernel to use when booting the custom live iso. you can always come back to the terminal environment of the project for additional customizations

On the next page, you will be asked to select the packages that you want to remove from your live image.The packages with a check mark next to them are flagged to be automatically removed. Those packages will be automatically removed after the custom Ubuntu OS will be installed using the custom live image. Be careful when selecting the packages to remove, because additional dependent packages may also be removed, and these will not be indicated in the list. So you can just accept the recommended defaults on this page.

For example I don't need some packages language because I will never use it so I will mark them to be removed.

Now, the live image creation process will start. It will take some time depending on your system’s specifications. When the image creation process will be completed, click Finish. Cubic will also generate an MD5 checksum file that can be used to verify your customized iso file.

After you can see that the process is completed

If you want to modify the newly created custom live image in the future, uncheck the option which will appear saying “Delete all project files, except the generated disk image and the corresponding MD5 checksum file”

Now you can try your custom live cd. To be sure that your customization worked fine, check the packages that we have installed such as apache. You know that it not installed by default

Conclusion

You can need to customize an ISO cd depending on your needs. You can use a disk burning program such as Brasero to burn a copy of the new live ISO or, you can use a USB boot program such as Startup Disk Creator to create a bootable USB. To create a new live image for different Ubuntu versions, you can use a different project directory.

Alain Francois12:05 am

About Alain Francois

IT Linux administrator passionate of free and open source software, I work on Linux Systems since some years on installations and deployments of certain solutions. I like to share my experiences with a wider audience by training and conferences.

Related Posts

This article I am trying to explain how to deal with " Input/output error " when you initiate any commands in Linux. I have pointed some examples that reports similar error. # du -bash: /usr/bin/du: Input/output error #mkdir sampledir mkdir: [...]

PHP-FPM is also known as PHP FastCGI Process Manager. It is an advancement of PHP FastCGI implementation with more useful features for handling heavy-loaded servers and websites. Some of those features are listed below: New Features Advanced process managament capability with [...]

Firefox is the most popular web browser among Linux users. In this article we are going to cover topics like Firefox installation, uninstall and update. We will also discuss what kind of problems we can get during mentioned processes. Depending [...]