Sign up ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

This question already has an answer here:

I would like to create my own Ubuntu derivative with my desktop environment of choice and my preferred set of prepackaged programs.

What base should I start with and what modifications should I start adding?

I know two possible starting points:

  • Ubuntu Core, an official set of bare necessities (which ones?) that seems suitable for creating appliance firmware or one's very own Linux distribution. Unlike JeOS that came before it, this is not a complete distribution, as it lacks a bootable image with an installer or a boot loader.

  • Ubuntu Mini Remix, a fully working Ubuntu livecd containing only the minimal set of software to make the system work; not an official Ubuntu project.

  • probably I could use Ubuntu Server or something else as a base.

Then, I need to customize my distribution. I know of the following tools:

that should allow for me to easily customize my installation media. But what if I need not just something to create a one-off remix of Ubuntu for my own enjoyment, but a maintainable project with all its trappings: I guess I need to have a set of scripts trackable by version control system, amenable for automated testing and building with some build infrastructure. That's how they build a halfway decent OS distribution, right?

How should I best start creating my own Ubuntu derivative in a way that could naturally transcend a one-off custom CD for myself, and be built in a more controlled, robust manner, like proper Ubuntu derivatives supposedly do?

share|improve this question

marked as duplicate by karel, Eric Carvalho, bodhi.zazen, Sneetsher, Jacob Vlijm Jun 19 '14 at 5:58

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

want to customize Installer or create something new like Ubuntu KDE/Gnome are? – Stefano Mtangoo Jun 13 '14 at 23:00
Do you need to build your own packages? Or just use existing packages? – bain Jun 13 '14 at 23:05
I would like to create something like Ubuntu KDE/Gnome but with another desktop environment, but uses the regular Ubuntu packages. It would basically be Ubuntu with another DE preinstalled; as configuring DE is more trouble than it's worth for many users. – Nickolai Leschov Jun 13 '14 at 23:44

1 Answer 1

up vote 1 down vote accepted

An Ubuntu remix is just a meta package (like xubuntu-desktop) that depends on whatever software should be installed by default. To get the source of some existing meta *buntu desktops do:

apt-get source xubuntu-desktop
apt-get source lubuntu-desktop

This will fetch the base package of x/lubuntu. It is just a regular Debian package, it has files debian/control debian/rules etc. It can be rebuilt by doing:

apt-get build-dep xubuntu-desktop
dpkg-buildpackage -b -uc

Each architecture has its own list of files to install ("desktop-amd64", "desktop-powerpc" etc). To create your own derivative:

  • take the lubuntu/xubuntu source as a base
  • adapt it (eg. replace lubuntu with nicbuntu everywhere)
  • edit the dependency lists to add the packages you want
  • build your meta package
  • install it (dpkg -i nicbuntu.deb or gdebi nicbuntu.deb if you want to pull in dependencies)

Once you have your meta package working, you can build an installer iso image. There are plenty of answers already explaining how to do that (this one is quite detailed).

The only extra things you need to remember to do are:

  • add your nicbuntu.deb and any packages it depends on to the iso image
  • regenerate the Packages file (apt-ftparchive, see linked answer)
  • add "nicbuntu" to the the pre-seed file (again, see linked answer)

Obviously there are a lot of specific details that you will need to get working, but basically that's all there is to it.

share|improve this answer
apt-get source lubuntu-desktop has installed source directory lubuntu-meta-0.52 into my home directory on Ubuntu 13.10. So, Lubuntu is in fact this... on top of what? – Nickolai Leschov Jun 14 '14 at 16:31
All of the dependencies are listed in that source code. You can also do apt-cache depends lubuntu-desktop to list all the dependencies. You can also view the dependencies on It is all the same. – bain Jun 14 '14 at 17:33

Not the answer you're looking for? Browse other questions tagged or ask your own question.