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.
migrated from askubuntu.com Feb 28 '12 at 12:04
|
Here's what you're looking for: http://www.linuxfromscratch.org/ |
|||||||||||||
|
|
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 In terms of configuring your kernel, I cannot more strongly recommend taking your existing config (usually available in |
|||
|
|
|
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. |
|||
|
|

/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. – Shawn J. Goff Feb 28 '12 at 4:12