I've heard that Ubuntu is an Open source project.

So, Suppose I've got Windows 8 installed at this time and I want to build the Ubuntu Operating System myself - by compiling each package, and build a custom kernel.

How would I compile and convert it into ISO? I'm very confused.

How can I achieve this process. And what's the difference between Ubuntu Kernel source and Ubuntu Source?

I've heard that Ubuntu is divided into several packages - what does the Ubuntu kernel source code as a package do?

  • you can google how to compile the linux kernel – bolzano Mar 17 '15 at 11:20
  • 3
    Are you sure you want to compile your Ubuntu installation yourself? Why won't you just download a ready iso? My opinion is that self-compiling is something for advanced users and without being offensive, I would say that you do not belong to this group... – Byte Commander Mar 17 '15 at 11:21
  • 2
    (almost) All the source code is available. But you need first to know what you are asking (you are not, believe me --- no offense intended, anyone need to start somewhere!); read for example tutorialspoint.com/unix and linuxfoundation.org/what-is-linux. After then, think again. There are distribution based on the paradigm of compiling everything, like gentoo: gentoo.org – Rmano Mar 17 '15 at 11:24
  • I believe this question is overly broad and answering how to compile a kernel and all of Ubuntu is very specialized. FWIW - custom kernels are porrly supported or not at all - help.ubuntu.com/community/Kernel/Compile – Panther Mar 17 '15 at 14:41
  • If you want to compile everything from source, use a distro tailored to such a task such as LFS or gentoo - linuxfromscratch.org and wiki.gentoo.org/wiki/Handbook:AMD64. Most distros, inculding Ubuntu, supply compiled often patched binaries and I would not try to patch and compile all the ubuntu packages from scratch, you would just end up spending a ton of time with the same compiled binary. – Panther Mar 17 '15 at 14:43

You have been correctly informed that Ubuntu is indeed an Open Source Project.

While its completely possible to compile each package - and spend the hour(s) it will take to undertake such a task - it's not really recommended for first time users. Judging by the varying levels of questions here - it seems like this would be a good thing for you to explore in a Virtual Machine so you're not going to disrupt a working PC while you explore and learn the wonderous world of building your own Operating System.

You can compile and create your own ISO not just with ubuntu - but any distribution of linux that makes its source available to the public. The primary means behind this process is to pick your base system packages (from a debian based distribution - possibly more) and get started building this with remastersys.

Once you've completed this process you can then choose an ISO format to build, and thus install your own distribution. However - its likely to cause you problems if you don't know what you're doing. Again - I urge you to use a Virtual Machine to test anything you build by hand out of remastersys before attempting to install on your primary workstation.

Information on Remastersys

Remastersys is a tool that extracts the configuration from a running Ubuntu or Debian installation and then turns this into an installable ISO image. This means that you carry out the customisation using the standard tools that you normally use, such as the package management system and GUI configuration tools. When you have everything set up the way you want it, you can clone the system and deploy it. Additionally, you can use Remastersys to make a clone of a working system.

link to tutorial here

If you want to get started by building everything from source - as other users have pointed out there are distributions that are engineered to provide this experience. Such as a stage 1 Gentoo isntallation - where you literally start from a minimal linux instance in ram - and build your base operating system one piece at a time. The entire process can take up to a day if it's your first run through - and its not uncommon to encounter strange and cryptic error messages that will require deeper learning about the process you're undertaking.

What is the difference between the Kernel Source and Ubuntu Source?

This could mean one of three things, and I will attempt to cover all paths.

  1. The Kernel source is the official linux kernel source distributed by the core kernel team headed by Linus Torvalds. This is often referred to as a "vanilla kernel".

  2. The "Ubuntu Source" may refer to Canonicals fork of the kernel which we keep up to date with patches, vendor hardware stacks (called HWE - shorthand for Hardware Enablement), and other customizations that help Ubuntu to perform and behave in the way you would expect Ubuntu to behave.

  3. Or the "Ubuntu Source" could mean the thousands of packages we have available - which range from basic system utilities like Dash (or Bash), to a full GUI Desktop environment like Unity - which is in reality a meta-package, consisting of several micro-services and components that make up the interactive desktop on Ubuntu.

What does the kernal source code as a package do?

Most packages you encounter in Ubuntu will be binary distributions. Meaning they are pre-compiled for your CPU architecture, and shipped ready to run with zero compilation required by your machine. This speeds up installation, and gives you a sane set of defaults to consume.

Some packages, such as linux-headers - distribute the source code for use in compiling other packages. And this can be required to install things like kernel modules, building developer-level packages, or installing the bleeding edge package from a project that requires the linux headers as other code includes. (if you need more information on this subject, I encourage you to find a getting started with programming guide, and give that a thorough read through)

Hopefully this has answered your tiers of questions - and you feel armed with enough information to get moving. Again - please use caution with this advice if you choose to build your own flavor of an Operating System. It's taken teams of people a varying amount of time to build a robust operationg system such as Ubuntu. While its a great learning experience - it's certainly not for everyone.

| improve this answer | |
  • "hour(s)" is somewhat optimistic...! – Nathan MacInnes Mar 17 '15 at 16:37

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