Linux is a word that dims many non-computer geeks almost immediately. However, Linux desktop offerings are now pretty much in line with big names like Windows and macOS.
With decades of collaboration and support from organizations like Canonical, you can download something like Ubuntu Linux today and do almost anything you can with Windows. And all this without the need for a computer science degree. Modern desktop Linux distributions look good, perform well, and are suitable for casual users.
However, they have one huge difference from commercial operating systems – open source licensing.
This means we have full access to all the inner workings of Linux. You don’t have to pay to use it and you can customize it the way you like. This is great for power users who enjoy messing around with nut and bolts, but what if you just want to keep your own customized custom Linux installation?
In fact, you can create a fresh Linux installation, customize it the way you want, and then turn it into a live boot installation. This is very useful for several reasons. First of all, this means that you will have no downtime if you have to reinstall the operating system.
All your settings and software will already be waiting right from the start. It also makes it easier to create custom installations for distribution. Let’s say you need to install Linux in a computer lab full of computers and then install educational packages. Using a dedicated distribution tool means you only need to do this setup once and then just install as usual.
One of the simplest tools is called the Linux Live Kit, and we’ll look at exactly how you can change an existing Linux installation back to your own distribution.
Set up the device
To use the Linux Live Kit, you need a Linux installation for setup. While you can go ahead and do it with the basic installation, this is not the most practical approach if you want to create your own distributions for something other than the main computer.
So what we’re going to do is install Ubuntu Linux on a VirtualBox virtual machine. This gives us a clean, controlled installation environment. This also means that you can create your own Linux distributions from a Windows machine if you like. Finally, this is a good way to test your newly created distribution to make sure it works correctly.
We are going to use the following components:
- Windows 10
- Ubuntu 18 LTS
Remember, the process works exactly the same if you are using the Linux Live Kit on a Linux installation that runs normally on a computer, not a virtual machine.
The first thing to do is install Linux. Obviously, if you want to use an existing installation, you can skip this step.
To install Linux the usual way, you just need to boot from the installation DVD or USB. Since we are using VirtualBox, we just need to create a new virtual machine and then point it to the Ubuntu disk image we downloaded. Here are the steps you need to follow.
Take care of the dependencies
Since the Linux Live Kit is just a smart set of scripts, it needs other software packages to be present on your Linux machine. In many cases, they will already be part of the default Linux version of your choice, but you will have to check this anyway.
You need to make sure that aufs is supported by the kernel used by your Linux distribution. You can check which kernel versions aufs support here If your chosen kernel does not support aufs, then you need to find an alternative solution for the Linux Live Kit.
Now we need to make sure Squashfs is installed on the system. This is the compression technology used by the Linux Live Kit. Here’s what you need to do to install it.
Open Terminal first. On Ubuntu, this can be done by clicking the Show Application button in the lower left corner of the screen. The search bar will appear. Find “Terminal” and click on it when it appears.
Now in the terminal enter the following:
sudo apt-get update && sudo apt-get install squashfs-tools
If all goes well, the package will be installed. If you run into problems, you will have to refer to your version of the OS documentation. Troubleshooting repository and installation issues is outside the scope of this tutorial.
Trim the fat
Since your current iw distribution will have all the same content as the installed one, you should remove any unnecessary files from the installation. You don’t need to do this, and storage is cheap these days if you’re using a flash drive. If you don’t know what to remove, skip this part for now.
Now you can make the necessary changes to your live distribution. Install applications, customize settings, and so on. When you’re done with that, we can move on to the Live Kit itself.
Download Linux Live Kit
It’s time to download the scripts we need. You can find it on GitHub Pay special attention to the advice in the README here Some of them may be relevant to your needs or situation. For example, there are special instructions if you want to create a bootable Live CD.
Save the downloaded files to / tmp. In the download file, you will find a folder named “/ DOC /. It contains additional information about the readme file to help you in case of difficulty.
Create your own live OS
Now that the script files are where they should be, we really want to run the script. To do this, we will have to switch from a regular user to a superuser. In Ubuntu, open a terminal and enter the following:
cd / tmp
This will switch you to the TMP folder where we unpacked the Live Kit files.
The last thing we need to do is run the script, so enter:
Now just wait until the script is ready!
Run Live Distro
So how do you get a live distribution? The script generates two versions in the / TMP folder. There is an ISO image that you can burn to disc or upload to a virtual machine for testing. However, most people will care about USB boot files. They are also located in the / TMP folder.
Copy them to a USB stick, don’t forget to unpack in the process. When they are there, use Terminal and change to the / boot directory. Then run the “bootinst.sh” script to make this USB stick bootable.
If all goes well, you will now have your own working OS!