LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Password
Linux - Kernel This forum is for all discussion relating to the Linux kernel.

Notices


Reply
  Search this Thread
Old 01-09-2023, 06:32 PM   #1
audiotore341
Member
 
Registered: Jan 2023
Posts: 42

Rep: Reputation: 0
Post an OS from the linux kernel itself?


I'm made my own Operating system before and it was a really cool experience! But however I was interested in the linux kernel and how it worked. Then I wondered if it would be possible to make an OS with just the linux kernel. Now its only a kernel and I know but is it still possible to give it a shell and program it into an functional OS? if yes then correct me if im wrong but wouldn't that be a good idea? Linux already has support for many many devices and can run on tiny cellphones and crappy toasters. It can even run on something with very limited technology so thats why im thinking about this. It would just be pretty convenient
 
Old 01-09-2023, 06:37 PM   #2
jmgibson1981
Senior Member
 
Registered: Jun 2015
Location: Tucson, AZ USA
Distribution: Debian
Posts: 1,154

Rep: Reputation: 394Reputation: 394Reputation: 394Reputation: 394
that is what pretty much any linux distribution is. just a few programs on top of a kernel. of course you can roll your own. LFS is a good project that will make sure you get only what you absolutely need. Personally I'd pick Arch or any other minimal distro. Otherwise rolling my own is far to much work for me.
 
Old 01-09-2023, 06:40 PM   #3
audiotore341
Member
 
Registered: Jan 2023
Posts: 42

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by jmgibson1981 View Post
that is what pretty much any linux distribution is. just a few programs on top of a kernel. of course you can roll your own. LFS is a good project that will make sure you get only what you absolutely need. Personally I'd pick Arch or any other minimal distro. Otherwise rolling my own is far to much work for me.
I wanna do it with a way that involves coding and actually looking into the kernel itself.
Plus I have tried using LFS multiple times and have failed every single time. Compiling the kernel from source the regular
Way was so much easier.
 
Old 01-09-2023, 06:42 PM   #4
wpeckham
LQ Guru
 
Registered: Apr 2010
Location: Continental USA
Distribution: Debian, Ubuntu, RedHat, DSL, Puppy, CentOS, Knoppix, Mint-DE, Sparky, VSIDO, tinycore, Q4OS, Manjaro
Posts: 5,773

Rep: Reputation: 2770Reputation: 2770Reputation: 2770Reputation: 2770Reputation: 2770Reputation: 2770Reputation: 2770Reputation: 2770Reputation: 2770Reputation: 2770Reputation: 2770
Think about that a bit: everything would be done in the kernel, so there would be no security level separation. Everything the user did would take place as a kernel process, and would HAVE to. You would have to fold in TONS of code to make it properly multiuser and add safety between users, recreate all of the security features of a ton of packages that work above the kernel to add OS features, security management, device management, network management, user management, and basically everything GNU because none of that preexisting software would work. And all of that would have to be pretty good before you could shim on an interface to support something like Xwindows or a different GUI!

When you got halfway done you might have something that would look like a broken hybrid between MS-DOS and MPM-II that would not run most applications not explicitly written just for it.

DARN! Now I feel like I am talking myself into something.
 
Old 01-09-2023, 06:47 PM   #5
audiotore341
Member
 
Registered: Jan 2023
Posts: 42

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by wpeckham View Post
Think about that a bit: everything would be done in the kernel, so there would be no security level separation. Everything the user did would take place as a kernel process, and would HAVE to. You would have to fold in TONS of code to make it properly multiuser and add safety between users, recreate all of the security features of a ton of packages that work above the kernel to add OS features, security management, device management, network management, user management, and basically everything GNU because none of that preexisting software would work. And all of that would have to be pretty good before you could shim on an interface to support something like Xwindows or a different GUI!

When you got halfway done you might have something that would look like a broken hybrid between MS-DOS and MPM-II that would not run most applications not explicitly written just for it.

DARN! Now I feel like I am talking myself into something.
I have made an entire OS from SCRATCH 0 of that sounds pretty hard believe it or not. and luckily I am going for a dos like OS
 
Old 01-09-2023, 08:36 PM   #6
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 19,393
Blog Entries: 28

Rep: Reputation: 6165Reputation: 6165Reputation: 6165Reputation: 6165Reputation: 6165Reputation: 6165Reputation: 6165Reputation: 6165Reputation: 6165Reputation: 6165Reputation: 6165
You are certainly more ambitious than I!

If you have not already done so, you might want to bookmark the docs at kernel.org.
 
Old 01-10-2023, 12:03 AM   #7
dugan
LQ Guru
 
Registered: Nov 2003
Location: Canada
Distribution: distro hopper
Posts: 11,259

Rep: Reputation: 5338Reputation: 5338Reputation: 5338Reputation: 5338Reputation: 5338Reputation: 5338Reputation: 5338Reputation: 5338Reputation: 5338Reputation: 5338Reputation: 5338
Go for it.
 
Old 01-10-2023, 04:27 AM   #8
fatmac
LQ Guru
 
Registered: Sep 2011
Location: Upper Hale, Surrey/Hants Border, UK
Distribution: Mainly Devuan, antiX, & Void, with Tiny Core, Fatdog, & BSD thrown in.
Posts: 5,525

Rep: Reputation: Disabled
Quote:
and luckily I am going for a dos like OS
Kernel plus Busybox would seem doable, without making it really huge; at least for the basics.

Consider these - http://tinycorelinux.net/downloads.html

Last edited by fatmac; 01-10-2023 at 07:55 AM.
 
1 members found this post helpful.
Old 01-10-2023, 05:43 AM   #9
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 22,071

Rep: Reputation: 7364Reputation: 7364Reputation: 7364Reputation: 7364Reputation: 7364Reputation: 7364Reputation: 7364Reputation: 7364Reputation: 7364Reputation: 7364Reputation: 7364
the os is not the linux kernel itself, the os is split into different parts (like kernel, shell, and others). It was made intentionally. You can [try to] make a new os based on the linux kernel (if you wish), but creating a full os is not the same as creating/building a kernel. And obviously you need to specify exactly what do you mean by os. How do you want (for example) run firefox on it?
 
Old 01-10-2023, 05:49 AM   #10
hazel
LQ Guru
 
Registered: Mar 2016
Location: Harrow, UK
Distribution: LFS, AntiX, Slackware
Posts: 7,691
Blog Entries: 19

Rep: Reputation: 4495Reputation: 4495Reputation: 4495Reputation: 4495Reputation: 4495Reputation: 4495Reputation: 4495Reputation: 4495Reputation: 4495Reputation: 4495Reputation: 4495
Building in a shell is obviously not impossible because GRUB does it. The GRUB kernel is basically a stripped-down Linux kernel with limited hardware support and no process management. The GRUB shell is a kernel module that gets loaded and can then read the configuration file and create a menu from it. The commands in the file map to other modules, not to external programs.
 
Old 01-10-2023, 10:05 AM   #11
smallpond
Senior Member
 
Registered: Feb 2011
Location: Massachusetts, USA
Distribution: Fedora
Posts: 4,160

Rep: Reputation: 1266Reputation: 1266Reputation: 1266Reputation: 1266Reputation: 1266Reputation: 1266Reputation: 1266Reputation: 1266Reputation: 1266
I think it would be a fun project to have the Linux kernel start a shell that emulates CMD.EXE. Start the screen in blocky 80x25 character mode and have a retro DOS environment on a modern 64-bit computer.
 
Old 01-10-2023, 10:41 AM   #12
wpeckham
LQ Guru
 
Registered: Apr 2010
Location: Continental USA
Distribution: Debian, Ubuntu, RedHat, DSL, Puppy, CentOS, Knoppix, Mint-DE, Sparky, VSIDO, tinycore, Q4OS, Manjaro
Posts: 5,773

Rep: Reputation: 2770Reputation: 2770Reputation: 2770Reputation: 2770Reputation: 2770Reputation: 2770Reputation: 2770Reputation: 2770Reputation: 2770Reputation: 2770Reputation: 2770
Source for the kernel is available. Source for the shells are available. Building the minimal modules and a shell into the kernel would certainly be possible. Obscene, but possible.
Let me know what you come up with. I suspect several of us might like to take a look at the results.
 
Old 01-10-2023, 11:51 AM   #13
audiotore341
Member
 
Registered: Jan 2023
Posts: 42

Original Poster
Rep: Reputation: 0
Lightbulb

Quote:
Originally Posted by fatmac View Post
Kernel plus Busybox would seem doable, without making it really huge; at least for the basics.

Consider these - http://tinycorelinux.net/downloads.html
I see. I was able to boot up tiny linux into a virtualmachine and I can see that it does infact
does already have a shell. However, I'm gonna need more than the basic commands to get an spinoff up and running.
Is there a way to install packages over into tinycore linux? I'm using the bare metal one with only a terminal.
 
Old 01-10-2023, 11:56 AM   #14
fatmac
LQ Guru
 
Registered: Sep 2011
Location: Upper Hale, Surrey/Hants Border, UK
Distribution: Mainly Devuan, antiX, & Void, with Tiny Core, Fatdog, & BSD thrown in.
Posts: 5,525

Rep: Reputation: Disabled
All the info you need about using Tiny Core is in this free download book by the project.

http://www.tinycorelinux.net/book.html
 
Old 01-10-2023, 12:20 PM   #15
audiotore341
Member
 
Registered: Jan 2023
Posts: 42

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by fatmac View Post
All the info you need about using Tiny Core is in this free download book by the project.

http://www.tinycorelinux.net/book.html
Ahh I think I see your approach here. Would it be possible to use debian linux too?
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
It seems that in future Linux kernel itself will force the use of systemd blancamolinos Slackware 25 11-07-2013 02:38 PM
[SOLVED] Computer turns off by itself, then boots by itself to a blank screen Lyle Linux - Hardware 8 07-25-2010 07:27 PM
Upgrade my kernel and eth0 now calls itself eth1 and there's ONLY ONE CARD INSTALLED! CJ Chitwood Linux - Hardware 3 06-11-2007 10:44 PM
urpmi updated kernel source but not the kernel itself(??) tredegar Mandriva 5 02-15-2005 02:27 AM
Samba: Linux Not establishing itself on network, WinXP cannot see Linux either shassouneh Linux - Networking 5 07-27-2002 06:28 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel

All times are GMT -5. The time now is 01:59 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration