- How to Create Custom Linux Mint or Ubuntu ISO
- Cubic: The easiest way to create custom ISO images
- Key Features of Cubic:
- Installation of Cubic in Ubuntu-based distributions
- How to use Cubic to create custom ISO Images
- 1. Adding/Creating a project directory
- 2. Choose the original ISO image
- 3. Working with chroot environment
- Removing packages
- Update existing packages
- Adding background images
- Adding Linux Kernel 6.0
- 4. Select packages to be removed from a minimal and normal install
- 5. Select boot Kernel
- 6. Choose the ISO compression type
- 7. Testing ISO file with in-build QEMU Emulator
- How to solve “please Use apt-cdrom to make this CD-ROM recognized by APT”
- Final Words
- Introduction
- Why would I want to do this?
- Creating an iso image from a non-music CD or DVD
- GUI (Ubuntu 20.04.1 LTS, Focal Fossa)
- Command line
- Creating an iso image from a music CD or DVD
- Listening the audio tracks of an iso image from a music CD
How to Create Custom Linux Mint or Ubuntu ISO
It’s the things to do after installing Linux Mint that could feel tiresome.
And if you have to do the same on more than one system, it gets frustrating.
Imagine having several computers in your home, lab, or institution. And all of them need to have similar configurations and applications.
Now imagine this. You download Linux (Mint), make a live USB and install it on all the systems. And then you have to do the same configuration and install the same set of applications on all of them.
What if I tell you there was a way to save your time from doing these repetitive tasks? How about creating a modified ISO and put this customized Linux Mint on the live USB? This way it installs the same customized Linux distro on all the systems.
There is a handy GUI tool called Cubic that allows you to pre-configure your installs in the easiest way possible.
Let me walk you through its features and how you can use it to customize Linux Mint 21 ISO.
Do note that Cubic should work with other distributions like Ubuntu, Fedora etc. I have tested it with Mint but you may try and follow the steps for other distros.
Cubic: The easiest way to create custom ISO images
Cubic (Custom Ubuntu ISO Creator) is a GUI tool made to customize Ubuntu-based distros.
It lends you to the chroot environment of ISO where you will be making significant changes, and it also allows you to decide on packages separately for minimal and normal installation.
But before jumping to the procedure, let’s have a look at some features of Cubic.
Key Features of Cubic:
- Easy to use GUI.
- Allows you to select packages for minimal and normal installation separately.
- It has three tabs for specific reasons:
- Kernel Tab: If you went with installing multiple kernels, you can specify the boot kernel from here.
- Preseed Tab: From here, you can create, edit and remove preseed files. Using preseed files, you can skip the questions that are generally asked during installation, as preseed files will automate the process!
- Boot Tab: If you are interested in changing boot parameters, this is the place from where you can tweak how the modified ISO will boot.
- Offers various types of compression formats to compress modified ISO files.
- Comes with QEMU (open source machine emulator and virtualize) to test modified ISOs.
Seems too promising, right? So let’s go ahead with the installation process.
Installation of Cubic in Ubuntu-based distributions
Cubic is not available in the default repository of Ubuntu so you’d need to add PPA to install the software not available in the default repo:
sudo apt-add-repository ppa:cubic-wizard/release
Now, let’s update the repository and install Cubic:
sudo apt update && sudo apt install cubic
So now, let’s move forward to how you can use Cubic to customize ISO.
How to use Cubic to create custom ISO Images
For this guide, I’m going to use Linux Mint 21 ISO. To make this guide more relevant, I’m going to perform the following operations:
- Removal of unnecessary packages, making it a minimal ISO of Linux Mint.
- Update remaining packages to the latest version.
- Add new background images.
- Install the latest Linux Kernel (6.0).
You can make your own modification based on your liking.
1. Adding/Creating a project directory
When you open Cubic, it will ask you to choose the project directory. That is nothing but where you want all the files related to creating custom ISO images.
Here, I made a new sub-directory inside my HOME directory. Make sure to have a separate directory for every Cubic project you make. Once you’re done selecting the project directory, click on the Next button.
2. Choose the original ISO image
Here, you have to choose the original ISO image that you want to work with.
As you can see, I went with Linux Mint 21, and it fetched all the other information automatically.
3. Working with chroot environment
Once you select the ISO, it will extract the ISO image and you will enter into a chroot environment.
This will behave as a regular terminal and also this is the place where I’m going to perform most of the operations related to customizations.
Removing packages
It’s all up to you how many packages you want to remove or you may also skip the package removal section. To remove a package, you don’t have to use the sudo that you generally use as removal of packages needs superuser privileges.
So let’s suppose you want to remove thunderbird; then the following command should get the job done:
But as I told you earlier, I’m going for a minimal desktop, I’ll be removing most of the additional GUI apps including Libreoffice. And if you want to do the same:
apt purge drawing gnome-calculator hexchat hypnotix libreoffice* onboard redshift redshift-gtk rhythmbox sticky thingy thunderbird warpinator webapp-manager
Update existing packages
If you want to have the most recent packages in your next Ubuntu install, this is the step you should consider following:
sudo apt update && sudo apt upgrade
Adding background images
First, let’s change the current working directory to /usr/share/backgrounds:
As Cubic allows users to copy files by drag and drop in the current working directory (/usr/share/backgrounds in our case), I’m going to use copy my wallpapers (which I have locally downloaded).
This must be it if you want to change the background from the file manager but if you want them to be listed in the change background dialog, you’ll have to add each one in an XML file located at /usr/share/gnome-background-properties.
Adding Linux Kernel 6.0
In this section, I’m going to download the .deb package of kernel headers and modules and then will install them using the dpkg command.
Use the given 4 commands one by one and it will download kernel modules and headers:
wget https://kernel.ubuntu.com/~kernel-ppa/mainline/v6.0/amd64/linux-headers-6.0.0-060000_6.0.0-060000.202210022231_all.deb
wget https://kernel.ubuntu.com/~kernel-ppa/mainline/v6.0/amd64/linux-headers-6.0.0-060000-generic_6.0.0-060000.202210022231_amd64.deb
wget https://kernel.ubuntu.com/~kernel-ppa/mainline/v6.0/amd64/linux-image-unsigned-6.0.0-060000-generic_6.0.0-060000.202210022231_amd64.deb
wget https://kernel.ubuntu.com/~kernel-ppa/mainline/v6.0/amd64/linux-modules-6.0.0-060000-generic_6.0.0-060000.202210022231_amd64.deb
Once you are done with downloads, you can use the dpkg command to install them:
4. Select packages to be removed from a minimal and normal install
With Cubic, you can even specify the list of software for both minimal and normal installation.
This is the place where you can be creative as you will be having 2 lists of software that you can use for different purposes.
For example, you can use the normal install option for desktop usage and the minimal install should be used for more minimal setups such as for servers.
Since I’ve already removed packages, there is not much left for me to do in this section.
5. Select boot Kernel
This section will bring the list of Linux kernels you have.
If you are wondering why it is showing 3 options, let me tell you how:
- 5.15.0-41 came pre-installed.
- 5.15.0-52 was installed when I updated existing packages.
- 6.0 was installed manually by me.
I’m going with Linux kernel 6.0 here!
6. Choose the ISO compression type
This is the last step in the configuration where you have to choose the compression algorithm.
You don’t have to have knowledge of every compression type as it has already given the graph by which you can choose the amount of compression.
And I’m going with the default one gzip option.
Once you’re done choosing compression type, click on the Generate button and your ISO will be created!
7. Testing ISO file with in-build QEMU Emulator
Once the Cubic is done with building the ISO that you instructed, It allows you to test the ISO file. To test the file, you have to click on the Test bottom located at the top left corner:
And I came across a problem while I tried updating repositories saying: Please use apt-cdrom to make this CD-ROM recognized by APT.
How to solve “please Use apt-cdrom to make this CD-ROM recognized by APT”
To solve this issue, you just have to disable the installation disk (CD-ROM) from software resources.
Open software resources in Linux Mint and if you’re using Ubuntu, you’ll have to use the Software and Updates tool.
Once you disable CD-ROM, it should work as any general ISO you download from the official page!
That was a quick one. Right?
Final Words
This was my take on how you can easily create custom Ubuntu or other Linux distros’ ISO images using Cubic with its practical usage.
If this is something you could use, give it a try. Let me know in the comments if you are stuck, and I’ll try my best to help you.
Introduction
For an introductory explanation of ISO images and burning them see IsoImage.This page details how to create an ISO (.iso) file from a CD or DVD.
Why would I want to do this?
- Creating images of discs that you copy frequently. This means that you can make copies in the future without the source disc — see BurningIsoHowto.
- Creating images of discs you use frequently so that you do not have to have the disc in the drive to access them — see MountIso.
Creating an iso image from a non-music CD or DVD
GUI (Ubuntu 20.04.1 LTS, Focal Fossa)
- Insert the CD or DVD.
- Wait for the disk icon to display in the Dock. Your CD or DVD has now been mounted and can be read by Ubuntu.
- Click the «Show Applications» icon in the Dock to display a Search box.
- In the Search box, type «disks», then click the Disks application to open it.
- In Disks, click the «CD/DVD Drive» entry on the left to display the CD or DVD volume. (Don’t touch anything else in Disks unless you know what you’re doing.)
- Click the menu icon in the top-right, then click «Create Disk Image. » to display the Create Disk Image dialog, as shown in this screenshot: create-file-rename.png
- Enter a name for the .iso file and choose where you want to save the file.
- Click «Start Creating. » to start creating the .iso image of the CD or DVD. Then wait until the progress indicator in Disks shows that the image creation is completed.
You can check your new .iso file by double-clicking it to mount it, then browsing it as you would if it were a CD or DVD.
Command line
dd if=/dev/cdrom of=file.iso (assuming /dev/cdrom is where the CD is mounted, and file.iso is the name you want to give the ISO, in the current directory)
Creating an iso image from a music CD or DVD
- Insert the CD or DVD.
- Wait for Sound Juicer to pop-up with the songs on the disc
- Close Sound Juicer
- Click «Places» > «Computer» (the menu at the top of your screen)
- Right-click the icon of the CD
- Select «Copy Disc. «
- Alongside «Copy disc to:», change the drop-down to read «File image»
- Click «Write»
- Choose where you want to save the file
- Click OK
The icon of the CD can also be found on the Desktop after the disc has been inserted. This icon can also be used for steps 5 — 10.
Listening the audio tracks of an iso image from a music CD
CreateIsoFromCDorDVD (последним исправлял пользователь lauracowen 2020-11-16 15:29:42)
The material on this wiki is available under a free license, see Copyright / License for details
You can contribute to this wiki, see Wiki Guide for details