In this blog, analyzes have been made of the best distributions of the year, they have even been cataloged according to your interests, but now we are going to go a step further and we are going to present this mega tutorial that explains step by step how to customize a Linux distribution to create "our" particular distro. If we follow the steps, even the less experienced will be able to modify a distro to their liking.
Customizing a distribution not only serves to have a distribution that is different from the rest and genuine, but also to make life easier. For example, when we format our computer (or if we have to install operating systems and software on several computers), we must install the distro and then install all the necessary software or programs one by one. If we had them all together, this would not be necessary, so it would be much easier. Even we can have a LiveCD with the tools we need for our work ...
Table of Contents
- 1 Existing tools:
- 1.1 UCK (Ubuntu Customized Kit):
- 1.2 Remastersys:
- 1.3 Rebuilder:
- 1.4 Reviewer:
- 1.5 SuSE Studio:
- 1.6 Installinux.com
- 1.7 Pungy:
- 1.8 Builder:
- 1.9 LinuxLive:
- 1.10 Systemback:
- 1.11 Hook:
- 1.12 Debian Live Magic:
- 1.13 UbuntuBuilder:
- 1.14 Linux:
- 1.15 New Builder:
- 1.16 Distroshare Ubuntu Imager:
- 1.17 U Customizer:
- 1.18 Answer:
- 1.19 Linux From Scratch (LFS):
- 2 Necessary material:
- 3 Installing the virtualization software and installing the virtual machine:
- 4 Customize the distro:
- 5 Finish our work:
There are many tools available, from some very automated based on scripts that allow you to do the work in a simple way, to others using the terminal and making the distro practically from scratch. The most striking that I have come across are:
UCK (Ubuntu Customized Kit):
UCK is perhaps one of the best known. This program with a graphical interface allows you to use a series of scripts that allow you to customize an Ubuntu ISO and derivatives to create your custom distribution. You can choose the desktop environment, install or uninstall some packages, etc.
Remastersys is another very good tool to create custom layouts. It allows it to be installed on a computer and create a copy of the installed computer to later have a personalized backup, without having to reinstall everything from scratch or have the distro with the default packages that they bring.
Reconstructors is an interesting tool that allows us to create a Live from Debian or Ubuntu. With Reconstructor you can customize the distro and even install new packages from a base Debian or Ubuntu system (also derivatives).
Reviewer is another utility to create a custom distro. It has a simple graphical interface that allows us to customize our distro in a similar way to Recosntructor. Then it allows to create an ISO image with the result for CD, DVD or USB. The image can be used as Live or installed. The limitation of Revisor is that it customizes Fedora distributions.
SuSE Studio is a website that allows you to create your own personalized operating system from the logo, and wallpaper, configuration, to installing packages from repositories and even choosing the desktop environment that the distro will have. You only need access the web and create an account from your Google account, for example, to start the construction menu. As you can deduce, the distro will be based on openSUSE.
Instalinux.com is an online service which can help us to create a base disk for maintenance or have a not too heavy distro. It is very rudimentary and do not expect great things, but it is certainly another alternative that deserves to be mentioned.
Pungi is a software to create Fedora spins, that is, customize a distro from a Fedora base.
Builder allows you to create a distribution from gNewSense (Debian and Ubuntu base). In this case the procedure is more rudimentary and without having a graphical interface, working from the console and editing files.
Linux Live is a utility, also known as LiLi, and open source, although compatible in this case with Microsoft Windows. With it we can create a portable, bootable and virtualizable distro on a USB device.
Systemback is the application chosen for our tutorial, so it will be the one we pay the most attention to. This does not mean that you do not use the rest, you can use whatever you want according to your interests. It is simple and with a graphical interface, but it allows us to create .sblive and .ISO files to be able to have a Live of our distro from the operating system that we have installed on our machine (or virtual machine). It also allows you to create restore points, restore the system, make new installations, etc.
Hook is another tool that promises to create your Linux distribution in just 10 minutes. From the project website you can find PDFs detailing the procedure and download the package to install it. We can use Hook to create a custom distribution, generate a copy of / home, generate a copy of the system, and make an ISO in our language ...
Debian Live Magic:
Debian Live Magic is one more, another GUI tool for building your own Debian Live. Simple to use, although it allows little customization, in addition to limiting you to Debian. Among the possibilities, select the GNOME, KDE or Xfce desktop environment or opt for a rescue image, select the Boot Loader, packages, etc.
From an ISO you can customize Ubuntu and create another new custom ISO with Ubuntu Builder. In a graphical and simple way, you can edit source.list, install new packages and other configurations guided by the wizard.
ReLinux allows you to create a new ISO from one of Ubuntu that we can modify during the process. Although it is a good tool, it may not be the best for beginners because you have to work from the terminal.
Novo Builder has an intuitive graphical interface and with options similar to the tools seen above. From an image of Ubuntu, Mint, LastOS, and other derivatives, we can customize repositories, desktop environment among the options it gives us, install packages, generate an ISO burn, normal ISO, etc.
Distro share Ubuntu Imager allows creating an installable Live thanks to this script that we can run from the terminal to automate the customization and creation process. As its name indicates, it allows creating a distro based on Ubuntu thanks to a commented .conf file, we can customize the values until we leave the distro to our liking and then execute the .sh to generate the ISO.
U-Customizer can customize Ubuntu distributions to your liking, it is a powerful and effective tool. The tool proposes to start from Ubuntu Mini Remix, a reduced version of Ubuntu that has everything necessary to function but no additions, and from here to build our ISO.
Remastersys is a discontinued project, although it is still widely used. Respin proposes to be your substituteIt is a fork of the previous project that has been improved and continues to be maintained, although it is practically the same.
Linux From Scratch (LFS):
Linux From Scratch or LFS It is the most complex method but also the most customizable and powerful of all, since you can create the distro practically from scratch. It is not a software, but guides that explain step by step how to build your own Linux distribution. If you search the net, you will find this type of updated PDF guides in English or some older versions in Spanish. I recommend it, you will learn a lot.
Now you know the advantages of being able to create your own Linux distro and also all the tools and alternatives available for it. The next step is to present you the material that we are going to use for this tutorial. To create our LiveCD, LiveDVD or LiveUSB, we need a series of things that we list below:
- Computer with Windows, Mac OX X or GNUX / Linux installed. In my case I have Ubuntu, so I will do it from Ubuntu.
- Virtualization software. It can be VMWare Workstation or VirtualBox, both are available for Linux. I have chosen VirtualBox. Another option is to use the own distribution that we use in our team as a base or even an ISO of the distribution that we want to customize in case of choosing other software that works from images of those seen previously.
- ISO of some distribution Linux that we will use as a base. In my case I have chosen elementaryOS Freya.
- Software packages that we want to install. For example, in our case we are going to install GIMP, Calligra Suite, Oracle Java JRE, Master PDF Editor and Synaptic. In these cases it is not interesting to install drivers, since being a Live or later wanting to install it on another computer, there may be conflicts.
- Un wallpaper that we like to change it and create a more personalized environment.
- Imagination to baptize our new system. We will call it LxAOS.
- Systemback to create our ISO or .sblive live.
Installing the virtualization software and installing the virtual machine:
Now let's get down to business and explain how to create our Live step by step. We will do it in the simplest way and with screenshots at all times to guide you so that you do not miss anything, you will see that it is not complicated at all.
- We prepare our machine with virtualization software. I have chosen VirtualBox to virtualize our system from which we will then generate the Live ISO. With VirtualBox we will be able to run another guest operating system (in our case elementaryOS) from our host machine (Ubuntu). The first step is to go to the VirtualBox download website. From there we download the binary corresponding to our operating system (remember that if you have another OS, you must choose the appropriate package, or if you have opted for VMWare or another option, the same ...). It's about 60MB and a DEB package that we'll have to install later.
- To install the .deb, we can double-click and it will open the Ubuntu Software Center to be able to install it with a simple click on the Install button. Another option is to open it with the GDebi manager to install it automatically. But if you want to type, you can do it from the terminal. Imagine that we have it in the Downloads directory, then to install:
cd Descargas dpkg -i virtualbox-5.0_5.0.14.deb
- Once we have it installed, we will download the image of our operating system base. The distro chosen in this case is elementaryOS. You can download it from the official website of the project and make a donation or from another web as SurceForge. The ISO are just under 900MB. It goes without saying that you can choose Ubuntu, Mint, Arch, openSUSE or whatever distro you prefer… This is only indicative.
- Now we have the ISO of our distro and the virtualization software. The next is install the distro in a virtual machine. To do this we open VirtualBox (or the software you have chosen) and click on the New button to create a new machine. A window will appear asking us for the name of our system. We can choose the one we want, elementaryOS or directly give it the name as we are going to baptize it. We will choose LxAOS. In Type we select Linux and in Version we opted for Ubuntu (64-bit), since elementaryOS is based on Ubuntu and in my case I downloaded the 64-bit version.
- If we click Next, it asks us the amount of RAM that we will dedicate to our virtual machine. In my case I have chosen 2GB, since I have verified that with less quantity the machine does not work properly. And if we click on Next we can Create a disk now to be able to install the system there. Then we select VDI VirtualBox Disk Image, for example. The next screen asks us if we want a fixed space to be reserved, and therefore invariable, or a dynamic space so that it can change if more space is needed. You can select what you want, I have opted for a fixed size since I will not use the virtual machine too much other than to create the Live one and then I will delete it. The chosen size is 15GB, if you want you can select more.
- If we click on Start, it will ask us to select the operating system to boot, in our case we select the ISO that we have downloaded of elementaryOS, from the directory where we have it. But first I would like to point out one thing. We must configure (Configuration) the virtual machine, although by default it may already be configured properly. It is necessary that the host or host computer (Ubuntu in my case) has an Internet connection, and that the virtualized guest or guest system also has it to download the packages and make the appropriate installations. For this we go to Configuration of our VM (Virtual Machine) and then to the Network section. We must have at least one Adapter. We enable Adapter 1 if it is not and then configure the type of connection we want. There are some interesting options like NAT and Bridget (bridge adapter) that are perhaps the ones we use the most. Both would work for us, but we are going to opt for NAT. NAT refers to a direct access between virtual machines and Bridged is for a virtual machine and physical machine connection. Remember that for our elementaryOS to have an Internet connection, you must then select "Wired Connection" in the networks section of the distro desktop, since by default it is on WiFi and therefore it does not detect any network in this mode ...
- Now we start our machine and the first thing we will see will be a black screen, some text messages and the elementaryOS logo. After a while, we the distro installation menu will appear. Remember that if you click on the virtual machine screen, the cursor will be "embedded" in it, to release it, you can press Ctrl + Alt.
- The elementaryOS Installer appears that the first thing it asks for is the language and gives us the option to test in live mode (LIVE) or Install, we of course choose this second one. It then shows us a series of requirements to be able to install elementaryOS properly: we are connected to the Internet and we have enough hard disk space to install. We can select the option to Download updates while installing and Install third-party software, which I recommend choosing. We continue ...
- Erase disk and install elementary is the default option and the one we must choose. Then click on Install Now. It offers some very interesting options, but since we want to create a MV to customize it, we ignore them. These options are LVM to manage the hard drives, More partitioning options and Encrypt to encrypt the content ... But we leave them unselected.
- Easy? Well we continue selecting our time zone.
- Continue and we select language and layout or keyboard layout. In our case Spanish.
- We put our name and the team and user names are generated, although if we want we can change it. We also enter a password and confirm it. This will be root. We can also choose whether to start automatically or ask for the password to log in and if we want to encrypt our personal directory. In our case we will put an automatic session and not encrypt. Continue.
- Now comes the most boring part, although the you can take advantage to do other things while… It is time to wait for the necessary files to be copied and everything required to be installed.
- After waiting, it is necessary to restart and if everything went well, what we will see is the brand new desktop environment Pantheon from elementaryOS.
We continue with our second part of the tutorial. In the first part we already explained how to prepare the virtualization software and how to install our Linux distribution in the virtual machine, in addition to giving a review of the software and alternatives to customize our Linux distribution that are currently offered to us. Now we are going to start with the customization as such and finish creating the ISO of our Live or live system that we can test without installing.
For this tutorial, all you need is systemback software, or the one that we have chosen from those that we presented in the previous article and the packages that we want to install in our distro to customize it. Also, if you want to change any settings, wallpaper, etc., now will also be the time to do it. What we will do is leave the system as we want it in Live and then with systemback, we will create a copy of our system installed in the VM and pass them to a .sblive and then transform it into an ISO image.
Customize the distro:
We have divided this section into two parts, a first in which we will basically dedicate ourselves to install and uninstall packages to vary the default composition of the distro. You can choose to remove or add the programs you want, this is very personal and obviously according to your needs they will be one and the other. We have chosen to install Synaptic, Calligra Suite, GIMP, Java JRE and Master PDF Editor, and we will remove LibreOffice that we will no longer need because of Calligra.
The second section is intended to vary the configuration of our distro and to change the appearance by modifying the screen settings and putting a new different wallpaper. The changes can be much more profound and as in the first part, it all depends on your interests, this is only to exemplify.
Install / Uninstall the necessary software
- We start by installing Synaptic, since this software will help us to install other programs more easily. To do this, once our virtual machine has started with elementaryOS and we are on the desktop, we can open the terminal and write the following:
- Now we can open synaptic (It will ask us for the password because it needs privileges) and use it to install or uninstall software in a more graphical and simple way, although we can continue installing from the terminal without problems ...
- We can start looking Java JRE with Synaptic Finder and search among the packages that it finds the appropriate one. In my case, instead of opting for the Oracle package, we are going to support free software and we opted for OPenJDK 7 JRE that we select to install and we will see how when we click Apply to install, OPenJDK 7 JRE Headless is also self-selected, since it is necessary, don't worry about dependencies, Synaptic will solve them for you.
- Let's go for Calligra, we search in Synaptic and install ...
- The next step in our case is install GIMP and we do the same as with Calligra ...
- We now install Master PDF Editor. You may have noticed that the search in Synaptic does not find anything, well, we will use this to use another installation method and thus practice alternatives. To continue we go to the Midori browser that comes in the distro and that we can find in the Dock, then we look for «Master PDF Editor» and we enter the official Code-Industry website, which as we see is a paid software, well ... We click Download to download the latest version for Linux and it allows us to download the 32-bit or 64-bit version. We selected the latter, since if you remember we lowered elementaryOS from 64. It also allows you to download binaries .deb, .rpm and a tarball. For more convenience we are going to download the .deb (although we also have the option of, for example, opening it with the Software Center):
cd Descargas sudo dkpg -i master-pdf-editor-3.5.81_amd64.deb
- For, uninstall LibreOffice, we are going to use our dear terminal again, in which we will type:
sudo apt-get remove --purge libreoffice* sudo apt-get clean sudo apt-get autoremove
Configuration and appearance
Now let's make some settings Simple to see some examples that what we change will remain in Live. The configuration will be very simple in our case:
- Let remove all the icons that come by default in the dock clicking on them with the right mouse button and deselecting "Keep in the dock". We leave only Midori, Calendar, System Settings, and add Files and Terminal. To add, just go to Applications, find and open what you want and once its icon appears in the dock, click with the right mouse button and select "Keep in the dock".
- Then we go to System Configuration and then to Desktop, from where we can choose wallpaper Custom in the Wallpaper tab. If it is a personalized image, we go to the back "Wallpapers" to select the Custom option and the file manager opens so that we can find where we have our image. We select and ready.
Finish our work:
To finish our work, we have already left the distro as we want it, configured and with the necessary packages. Now we just need to generate our ISO Live thanks to the program systemback that we will also install in this part:
sudo add-apt-repository ppa:nemh/systemback sudo apt-get update sudo apt-get install systemback
When you open it, it will ask you for the password, since need privileges...
Create the .sblive
In the main systemback screen we must select the Create Live system option:
In the next screen we must select a name, in our case LxAOS and click on Create new:
Now we wait for the process to finish. It will take a while, depending on the size of the image. The process will be completed in three steps and once it is finished, we can move on to the next step, since the Live image will have been generated LxAOS.sblive and that it would help us in case we want to install it on a USB pendrive. But if we want the ISO, we have to continue with the tutorial ...
Convert to ISO
Now, we return to the main systemback screen and we will be allowed transform the .sblive into ISO clicking on the Convert to ISO button selecting our LxAOS in the box above and waiting:
Please comment, give your opinions, ask if you have doubts or provide improvements or corrections. You'll be welcome. In the next part, we will continue with the customization of the virtual machine and we will make the ISO of our Live ...