There are many Linux distributions out there, and each one of them has its own features and programs. You may have asked yourself before about how to create a Linux distribution, we are explaining how to do it in our series about “Creating a Linux Distribution“, and today’s topic is about Ubuntu, previously we had:

Ubuntu is the most popular Linux distribution, featuring a lot of features that make life easier on end users, therefore creating a distribution based on it will be a good choice if you are beginner and want to learn a new thing, or share your own copy of the operating system with the world.

Why We Don’t Build a Distribution From Scratch?

Why should it always be based on other distributions instead of building everything from zero, just like the main major distributions? Well, that’s a possible approach you can take alone using Linux from Scratch, but it’s very hard and non-effective; you will need to do tons of work by yourself if you use this method.

You will have to maintain the main repositories holding at least 20000 packages for your users, you will have to fix any possible incompatibility between the components that you choose to ship in your distribution, you will have to create a very big community around you to keep the project up and running, you will have to hire a lot of people in order to ensure quality and security of your operating system.

That’s why people are always building their distributions on Debian, Ubuntu, openSUSE, Fedora… etc, no one is ready to take such effort to create another distributions with some extra features, that’s why we have building on other distributions, don’t re-invent the wheel, unless you will make a difference!

Create a Linux Distribution Based on Ubuntu

Create a Linux Distribution

You have many ways to do that actually, from using normal building software to manual building and customizing process and passing by combination of two:

The Easy Way

Just use programs; they are there for a reason, you know, to make life easier, you can use some already available special programs to build the ISO file you want from your local installed system and distribute it later.

For that, you can use PinguyBuilder, it’s a program that was originally forked of Remastersys (One of the first re-mixing software for Ubuntu) and developed by the PinguyOS team, it’s working well with Ubuntu 16.04 LTS.

I have personally tested it on Linux Mint 18 (Which is based on Ubuntu 16.04) to see how things will go, and it worked great, just choose the settings and files you want to ship in your distribution and wait the program while it builds the ISO file.

For installation, download the .deb file and install it, or run the following commands in terminal:

wget http://kent.dl.sourceforge.net/project/pinguy-os/ISO_Builder/pinguybuilder_4.3-8_all-beta.deb
sudo dpkg -i pinguybuilder_4.3-8_all-beta.deb

Then open the program from the applications menu:

Pinguy Builder Beta for 16.04
Pinguy Builder Beta for 16.04
  • The first option will create a file combining all your files and programs (Will be so big and may not work with huge data).
  • The second option will create an ISO combining the installed programs and the settings you choose only, not all your data, just the ones you choose from the settings to include.
  • The third option will create a file-system tree only, no ISO file, you can include files or packages in that file system manually using “chroot” command and then use the 4-th option.
  • The fourth option will create an ISO file from the file-system tree. You should have already used option 3 to do this.

As you can see also, you can choose the Plymouth theme (the graphics after the boot loader directly), edit the Live CD boot menu or choose whom user data you want to include. All files that you place under /etc/skel will be there by default in the users’ home directory who will use your distribution.

Switch for the settings tab for more option:

Pinguy Builder Settings
Pinguy Builder Settings

The options here are explaining themselves I guess.. After you finish, return to the main tab and choose whatever build option you want to start, you will see the ISO file beside the checksums in /home/PinguyBuilder/ folder:

Built ISO file and Checksums by PinguyBuilder
ISO file and Checksums  by built Pinguy Builder

The Hard Way

Ubuntu Customization Kit
Ubuntu Customization Kit

You can create your distribution based on Ubuntu by extracting the components of the ISO file of Ubuntu to a folder, modify them and then re-build the ISO file. This is how it works theoretically.

You can use this complete official guide from the Ubuntu community to learn how to do so, as you can see, it takes a lot of effort to do the same results, your time will be wasted between downloading packages and compressing and extracting file-systems, copying and modifying all the files manually, which is why people use programs.

If you want, you can use UCK (Ubuntu Customization Kit), it’s a tool that will do all the mentioned work in that article using graphical interfaces with less-need to tune things, it’s free and available to install from the repositories:

sudo apt install uck

If you want to be a first class-citizen in the Ubuntu family, you may consider building a distribution based on Ubuntu from the source ISO files for Ubuntu, you will have to download all the ISO files, combine them and then build your distribution manually using them.

Testing the Distribution

Testing the ISO file using VirtualBox
Testing the ISO file using VirtualBox

Don’t ever release a thing to the world without testing; it’s an essential thing today if you don’t want to get insults from users who will download your distribution and use it on their own.

You have a lot of methods to do so, like:

  • Using KVM, a virtual technology implemented in the kernel itself to run virtual systems. You can use many interfaces available to it like Qemu or GNOME Boxes.
  • VirtualBox, a famous program developed by Oracle to run and test virtual systems.

All are available from the official repositories for Ubuntu:

sudo apt install gnome-boxes qemu

Or to install VirtualBox:

sudo apt install virtualbox virtualbox-qt

Then just search in the applications menu for the program and launch it to start testing.

Conclusion

There are a lot of ways to build a customized Linux distribution based on Ubuntu, you may choose any one of them that fits your needs, but don’t forget testing; it’s a very important step in order to insure that your system is error-free and working well on any hardware that a user may have.

Have you ever built a distribution before? What methods did you use and how was your experience?

Load More Related Articles
  • I never thought I’d make a distro based on Ubuntu again, thanks for the informative post 🙂

  • Oliver Jung

    I made a own distribution based on elementaryOS without the disadvantages the original had (in my version it looks almost exatly like a macOS since i used the gtkl theme of the b00merang project, reactivated the desktop-icons, add other usefull features and software and so on). So now my problem is: How can I share this with the world? I have a website created where I offer my distro to the world but no forum allows advertising/promoting custom linux distros. So how can I tell the world where they can download my distro?

    • And if your distribution is good, you can try sending it to the guys in Softpedia or Distrowatch.

      • Oliver Jung

        Yes i am planning to suggest it to distrowatch but not now since it is just a customization of elementaryOS, improving it in certain ways but it’s not outstanding in a way that i think distrowatch would accept it as an official distribution, i don’t know. We will see how the project goes on 🙂

  • Oliver Jung

    Hmn thanks for just deleting my post without any information. I just wanted to know where, if you created your own distribution, you can share it. Obviously not here as I see now. Well yeah, thanks for showing how to make your own distributions and thanks for not showing how to show them to others – which would be the sense of “to distribute”…

    • Can you calm down for a moment? Your “post” contained a link. All comments which contain links in the Disqus comment system (the one we use) must be moderated before being published. This is an automated thing.

      Now talking about where you can publish it, you can share it on +Google communities or Reddit subreddits. A lot of FOSS people are there.

      https://uploads.disquscdn.com/images/b0725cd2dbd2c446df9a7ea960a62b8eab258291af7015ec94da425490d59fe9.png

      • Oliver Jung

        I am calmed, it was a post, not a “post” – just because it contained a link doesn’t mean i didn’t had something to say related to the topic, since the topic is also mentioning Pinguy Builder and I wanted to share my experiances since i followed this tutorial and created my own distribution like described. The link was just to share what i did so others except only me could also benefit from it if they find it useful. Sadly the project “distroshare.com” didn’t suceed, they offered a portal where you could share custom distributions easily. Maybe in the future a similar project will open. I would do it by myself but as a hobby project this would be way too much effort in time and costs sadly.

  • pranto007

    I ve made already 3-4 disto’s now i am thinking adding some extra cool features like chatbot or assistance for my distros, Can you help me? how to add this home made software in my customized distros?