I tried to make an operating system with my on custom built kernel. It didn't work out too well. I am using Ubuntu and have downloaded Linux 3.2.7 from kernel.org . I am not trying to change the kernel in my Ubuntu system. I want to make my own OS with Grub, the Linux kernel and I want to be able to have this homebrew OS in a file type (such as iso) that I can put on a cd and boot on another computer. My question is: what exactly do I need to make this OS? Any comments or tutorials would be helpful.

  • 1
    You can configure grub to boot a Linux kernel. There are many places to find out how to do that; the most authoritative of which would be the official manual(gnu.org/software/grub/manual/grub.html). Once the kernel boots, it will attempt to start a program located at /sbin/init (unless configured otherwise). This program can do anything you want. There are some common options to use for /sbin/init, such as Upstart, sysvinit, systemd, or just bash. From there, that program is in control. If it ever exits, the kernel will crash, so it should be capable of starting other programs. Feb 28, 2012 at 4:12
  • 4
    The website linuxfromscratch.org has a lot of information for building your own linux distribution. Feb 28, 2012 at 11:41

3 Answers 3


Here's what you're looking for: http://www.linuxfromscratch.org/

  • 2
    I agree that this is what he SHOULD be doing, and I gave it the +1. I think what he really wants is the details of Ubuntu re-branding since it was migrated from askubuntu. Feb 28, 2012 at 13:04
  • Even if you're trying to do something slightly different, Linux From Scratch is certainly the place to start.
    – Vernon
    Feb 28, 2012 at 14:51
  • If nothing else, LFS is an excellent learning experience.
    – tshubitz
    Feb 28, 2012 at 16:28
  • @tshubitz I looked at LFS but it makes no sense to me. Is it a prebuilt operating system? is it a guide for making an operating system? What is it?
    – Coder404
    Mar 18, 2012 at 17:32
  • LFS is a guide for making a GNU/Linux operating system from the ground up. This page from the LFS site pretty much sums it up: linuxfromscratch.org/lfs
    – tshubitz
    Mar 19, 2012 at 20:26

One place to start would be Buildroot.

What is it? It's a set of scripts / makefiles that allows you to produce a linux system literally from scratch. It pulls down all of the relevant components, builds the cross compiler on the host. - pretty much everything.

It is designed primarily for embedded work - as such, it contains uclibc rather than glibc and is missing build steps for many components, e.g. Gnome and some desktop environments - however, if you're making a live CD it is absolutely brilliant. Not limited to live CDs, of course. I say that - it does come with embedded Qt.

The latest stable version comes with grub 0.97 which might not meet your requirements.

I mention this because whilst Linux From Scratch is great in that it tells you how to complete the whole process, it's long, time consuming and requires a lot of patience. Buildroot could be adapted to include whatever you needed; as a learning experience, the ability to use the menuconfig style menus and get something that boots and works is great. You can also see how it does everything before adding later features.

In terms of configuring your kernel, I cannot more strongly recommend taking your existing config (usually available in /boot), copying it to the kernel tree as .config then running make oldconfig and stepping through the new options. The default options are pretty much guaranteed to work from your distribution; if you start absolutely from scratch you may well build something unusable.


The bare minimum you need is the kernel and some process you can run as init, along with any loaders and libraries required for the init process. You boot the kernel telling it to run the init process, and where it goes from there is your business.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .