D&C GLug - Home Page

[ Date Index ] [ Thread Index ] [ <= Previous by date / thread ] [ Next by date / thread => ]

Re: [LUG] Creating a GNU/Linux environment from scratch

 

Jeremy Pearson wrote:

I'd like to create a GNU/Linux environment from scratch, in effect
creating my own personal distribution, for lots of interesting reasons,
but mainly to see what's involved and to further my understanding of how
everything works. I suppose I'm a purist (masochist?!) at heart.

I imagine the process would generally be:

1) Boot from Live CD to partition the hard drive
2) Download the kernel source & compile it
3) Add in any necessary device drivers


Every thing is fairly easy to this point and i assume extra device drivers you mean extra non included modules so these could be built for a non running kernel without too much trouble.

4) Download goodness-knows-how-many basic GNU tools like "ls", "cat",
"more" etc.


This is where you have to be careful, don't forget all the dependencies such as dynamic libaries, you can look at each commands dependencies individualy using ldd i think.

You then need some sort of init scripts, to set up and load everything correctly for you. If i recall the kernel process spawns of init the master process. It is possible to run other things instead of init using the kernel parameter init=/bin/sh for example, but in most cases you will want init to run and then create sutible scripts for init to set things up. You could take a lot of short cuts as most scripts are designed for portability and flexibility but you could *hard code* many things.

Then it is a case of getting your basic shell environment correct so that you can do stuff such as compile etc.

Robin



--
The Mailing List for the Devon & Cornwall LUG
Mail majordomo@xxxxxxxxxxxxx with "unsubscribe list" in the
message body to unsubscribe. FAQ: www.dcglug.org.uk/linux_adm/list-faq.html