i have seen lot of questions on this topic, but i am just starting in this field as an interest and a basic project. I am familiar with Linux, Shell Scripting, C, C++, Perl, Tcl.
I am just looking to learn to build an OS.
Question 1 :Can i build a basic OS using Linux kernel? It definitely must be possible, but where to start in a simple way? How much work it will take? Motto is just to build a simple OS which should boot and hold text files and rename/copy/move/edit is allowed with no directory structure. Is this the minimum i can think to start a small project?
Question 2 : I have one Desktop, i will create a partition to that system (suppose for 20-30GB) and start working on it for writing OS. This plan looks Ok in context of not putting rest of the data on risk?
Question 3 : What if i want to alter kernel only (just to learn) and want to use already built distro to make new distro? Is it possible? Yes i think this should also be possible, but where to start? Is it simpler than the other way around as in Question 1?
Question 4 : How can i play more with Linux/Unix? You all might be having more cool ideas?
How to build an OS from Linux Kernel?
-
- Posts: 1
- Joined: Fri Aug 21, 2015 3:21 am
- Libera.chat IRC: vishwadeep86
- Combuster
- Member
- Posts: 9301
- Joined: Wed Oct 18, 2006 3:45 am
- Libera.chat IRC: [com]buster
- Location: On the balcony, where I can actually keep 1½m distance
- Contact:
Re: How to build an OS from Linux Kernel?
1: You can build off the Linux kernel. The process is called Linux From Scratch, you should search that term.
2: Mistakes are human, and forever remain human.
3: You probably need a very good plan of what you want before you edit the kernel itself. It's a huge thing of its own.
4: Installing Gentoo (in a VM, perhaps, considering point 2) is a pretty good training excursion for those who want to be better than a desktop simpleton.
2: Mistakes are human, and forever remain human.
3: You probably need a very good plan of what you want before you edit the kernel itself. It's a huge thing of its own.
4: Installing Gentoo (in a VM, perhaps, considering point 2) is a pretty good training excursion for those who want to be better than a desktop simpleton.
Re: How to build an OS from Linux Kernel?
The linux kernel is an OS, you would be building your own Linux distro.Question 1 :Can i build a basic OS using Linux kernel? It definitely must be possible, but where to start in a simple way? How much work it will take? Motto is just to build a simple OS which should boot and hold text files and rename/copy/move/edit is allowed with no directory structure. Is this the minimum i can think to start a small project?
Not sure what you want to do hereQuestion 2 : I have one Desktop, i will create a partition to that system (suppose for 20-30GB) and start working on it for writing OS. This plan looks Ok in context of not putting rest of the data on risk?
See the first answer.Question 3 : What if i want to alter kernel only (just to learn) and want to use already built distro to make new distro? Is it possible? Yes i think this should also be possible, but where to start? Is it simpler than the other way around as in Question 1?
Depends on what you mean by "play". Since Linux is open-source you could pretty much do anything from writing your own TCP/IP or USB stack to writing a window manager (like X).Question 4 : How can i play more with Linux/Unix? You all might be having more cool ideas?
but then again, why would you? Just to learn, sure. But there are better ways to do so (write your own text editor/web browser/etc.)
Re: How to build an OS from Linux Kernel?
Actually, the Linux kernel is just a kernel. Only when you pair it with something like GNU you get an OS.FusT wrote:The linux kernel is an OS, you would be building your own Linux distro.Question 1 :Can i build a basic OS using Linux kernel? It definitely must be possible, but where to start in a simple way? How much work it will take? Motto is just to build a simple OS which should boot and hold text files and rename/copy/move/edit is allowed with no directory structure. Is this the minimum i can think to start a small project?
"for example, turning off the system’s power through the movement of a large red switch" - the Advanced Configuration and Power Interface Specification
Re: How to build an OS from Linux Kernel?
A kernel is rarely an operating system all by itself. For example, a micro-kernel relies on several user programs as well as the kernel itself. Even the Linux kernel relies strongly on modules which are added on to the kernel. And any reasonable interpretation of the term "operating system" would include at least those basic utilities necessary to get the system running and communicate with the outside world.FusT wrote:The linux kernel is an OS, you would be building your own Linux distro.
- Schol-R-LEA
- Member
- Posts: 1925
- Joined: Fri Oct 27, 2006 9:42 am
- Location: Athens, GA, USA
Re: How to build an OS from Linux Kernel?
I am not entirely certain if your goal is to write an operating system that uses the Linux kernel as its kernel but with a different user interface, file system, et. al., or if you are looking to develop a different OS from the ground up using Linux as your development platform. In the absence of more information, I will assume you mean the former.
To start with, I would recommend starting by reading the Beginner's Information pages in the OSdev wiki, especially Introduction, Required Knowledge, Beginner's Mistakes, and How to Ask Questions. That will give your the foundation needed to understand the scope of an OS project, if nothing else.
From question 4, it sounds like you don't have Linux installed yet, and presumably you are using an existing Windows installation as your base system. Given that, I would say your best bet is to get a virtualizer (I recommend VirtualBox) and create a virtual disk installation of the Linux distribution of your choice (you might try asking for advice on this if you don't have one in mind, but expect to get dozens of different opinions on the subject; I use Gentoo, with XFCE on one machine and Enlightenment on another, but YMMV). This will let you avoid re-partitioning your drive, and will make it easy to have several different installations in place.
If you are starting from a bare disk, I would recommend installing a hypervisor such as Xen instead, which will let you work with Windows and Linux on an equal footing.
I can't really give any more advice past this, not without more information from you at least. I hope this gives you a starting point, though.
To start with, I would recommend starting by reading the Beginner's Information pages in the OSdev wiki, especially Introduction, Required Knowledge, Beginner's Mistakes, and How to Ask Questions. That will give your the foundation needed to understand the scope of an OS project, if nothing else.
From question 4, it sounds like you don't have Linux installed yet, and presumably you are using an existing Windows installation as your base system. Given that, I would say your best bet is to get a virtualizer (I recommend VirtualBox) and create a virtual disk installation of the Linux distribution of your choice (you might try asking for advice on this if you don't have one in mind, but expect to get dozens of different opinions on the subject; I use Gentoo, with XFCE on one machine and Enlightenment on another, but YMMV). This will let you avoid re-partitioning your drive, and will make it easy to have several different installations in place.
If you are starting from a bare disk, I would recommend installing a hypervisor such as Xen instead, which will let you work with Windows and Linux on an equal footing.
I can't really give any more advice past this, not without more information from you at least. I hope this gives you a starting point, though.
Rev. First Speaker Schol-R-LEA;2 LCF ELF JAM POEE KoR KCO PPWMTF
Ordo OS Project
Lisp programmers tend to seem very odd to outsiders, just like anyone else who has had a religious experience they can't quite explain to others.
Ordo OS Project
Lisp programmers tend to seem very odd to outsiders, just like anyone else who has had a religious experience they can't quite explain to others.
Re: How to build an OS from Linux Kernel?
I stand corrected, excellent explanation.A kernel is rarely an operating system all by itself. For example, a micro-kernel relies on several user programs as well as the kernel itself. Even the Linux kernel relies strongly on modules which are added on to the kernel. And any reasonable interpretation of the term "operating system" would include at least those basic utilities necessary to get the system running and communicate with the outside world.