OSDev.org

The Place to Start for Operating System Developers
It is currently Tue Apr 23, 2024 7:44 am

All times are UTC - 6 hours




Post new topic Reply to topic  [ 9 posts ] 
Author Message
 Post subject: How would I make a Linux distribution?
PostPosted: Sun Jan 08, 2017 2:19 pm 
Offline
Member
Member

Joined: Thu Oct 13, 2016 2:07 pm
Posts: 27
Hello.

I really want to make my own Linux distribution. I only want to build the Linux kernel and make it run a shell. I might want to even add packages like Gnome or KDE.

I am not just looking for something to do (I'm not someone who play games and just wants to make something in 5 minutes). I am really serious about creating a distribution. I have looked into LFS (Linux From Scratch) but that seems a little too heavy.

I don't want SuseStudio or Ubuntu kits. I want to build things from source. There is no point of using online tools when you can just tap on a button. You might as well just install Ubuntu, customise it and say you made it.

I am experienced with some C and Java (If you think I'm saying I want to make it all in Java, I am not because it requires a JVM and it is impossible). I would prefer it if I could find something that could help me learn how to actually use Assembly and C to make an OS.

Please help.

Thank you
Andrew.


Top
 Profile  
 
 Post subject: Re: How would I make a Linux distribution?
PostPosted: Sun Jan 08, 2017 2:28 pm 
Offline
Member
Member

Joined: Sat Mar 28, 2015 11:23 am
Posts: 103
Hi,

LFS is your best bet. Your other alternative would be to code all the user-space from scratch, but if you think that LFS is too heavy, then you certainly can't handle writing all the user-space.

_________________
If some of you people keep insisting on having backwards compatibitity with the stone age, we'll have stone tools forever.
My Hobby OS: https://github.com/heatd/Onyx


Top
 Profile  
 
 Post subject: Re: How would I make a Linux distribution?
PostPosted: Sun Jan 08, 2017 2:35 pm 
Offline
Member
Member
User avatar

Joined: Sat Mar 31, 2012 3:07 am
Posts: 4594
Location: Chichester, UK
+1

LFS is about as light as it gets. I think, perhaps, that you underestimate what is involved.


Top
 Profile  
 
 Post subject: Re: How would I make a Linux distribution?
PostPosted: Sun Jan 08, 2017 2:43 pm 
Offline
Member
Member

Joined: Thu Oct 13, 2016 2:07 pm
Posts: 27
I just want to add bash to the linux kernel.


Top
 Profile  
 
 Post subject: Re: How would I make a Linux distribution?
PostPosted: Sun Jan 08, 2017 2:46 pm 
Offline
Member
Member
User avatar

Joined: Sat Dec 27, 2014 9:11 am
Posts: 901
Location: Maadi, Cairo, Egypt
andrewthompson555 wrote:
I just want to add bash to the linux kernel.

Then learn how the Linux kernel boots. Less than a week ago, you posted the exact same question about making an OpenBSD distribution. :roll:
In general, the boot loader loads the Linux kernel, an initrd and passes parameters to the kernel. You should specify in these parameters to use the initrd as the root file system, and Linux will execute /sbin/init or similar. You put your initialization code there.
Linux From Scratch, as already mentioned, is your best resource for this.

_________________
You know your OS is advanced when you stop using the Intel programming guide as a reference.


Top
 Profile  
 
 Post subject: Re: How would I make a Linux distribution?
PostPosted: Sun Jan 08, 2017 2:54 pm 
Offline
Member
Member
User avatar

Joined: Sat Mar 31, 2012 3:07 am
Posts: 4594
Location: Chichester, UK
andrewthompson555 wrote:
I just want to add bash to the linux kernel.

You need more than just the kernel and the bash executable to make bash run. That's what LFS teaches you.

You need to fully understand how the kernel works, what supporting software it needs, and how it interacts with the kernel. This is what you find "too heavy" in LFS.


Top
 Profile  
 
 Post subject: Re: How would I make a Linux distribution?
PostPosted: Sun Jan 08, 2017 4:02 pm 
Offline
Member
Member
User avatar

Joined: Tue Aug 02, 2016 1:52 pm
Posts: 286
Location: East Riding of Yorkshire, UK
andrewthompson555 wrote:
I just want to add bash to the linux kernel.

Maybe the Linux kernel and a busybox initrd would be better then?

_________________
com.sun.java.swing.plaf.nimbus.InternalFrameInternalFrameTitlePaneInternalFrameTitlePaneMaximizeButtonWindowNotFocusedState
Compiler Development Forum


Top
 Profile  
 
 Post subject: Re: How would I make a Linux distribution?
PostPosted: Sun Jan 08, 2017 4:42 pm 
Offline
Member
Member
User avatar

Joined: Thu Jul 12, 2012 7:29 am
Posts: 723
Location: Tallinn, Estonia
andrewthompson555 wrote:
I just want to add bash to the linux kernel.


Just pass "init=/bin/bash" to linux kernel. Done. (It won't work though, because init scripts initialize a LOT of userspace stuff)

_________________
Learn to read.


Top
 Profile  
 
 Post subject: Re: How would I make a Linux distribution?
PostPosted: Sun Jan 08, 2017 4:47 pm 
Offline
Member
Member

Joined: Sat Mar 28, 2015 11:23 am
Posts: 103
dozniak wrote:
andrewthompson555 wrote:
I just want to add bash to the linux kernel.


Just pass "init=/bin/bash" to linux kernel. Done. (It won't work though, because init scripts initialize a LOT of userspace stuff)


It will work, but probably without job control(Linux uses it as a fallback if it can't find an init script).

_________________
If some of you people keep insisting on having backwards compatibitity with the stone age, we'll have stone tools forever.
My Hobby OS: https://github.com/heatd/Onyx


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 9 posts ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: Bing [Bot], SemrushBot [Bot] and 102 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group