A question about system booting
I have a question about how a linux or Unix box boots.
The bootloader points to the kernel, and the kernel loads. The root partition is specified as kernel parameter in the boot loader. Then the kernel loads, utilizes some stuff, mounts the root filesystem (read only in the beginning)and then init (mother of all processes) reads the /etc/inittab to determine what comes next (start up script and the suitable script for the specified runlevel). How does init know that it should read /etc/inittab. Is it hard coded? I tried to grep for inittab in the kernel source tree and nothing appeared. Does the boot loader specify this to the kernel as a parameter, like the root partition? Is it possible to tell the kernel to read another file? |
Um, as far as I remember one is calling the other. Try searching for inittab in /sbin/init, I think you'll find it there...
|
I've been using the init command for years, and still i was looking for inittab inside the kernel.
Actually the path to init is what is hard-coded inside the kernel, in the file /init/main.c in the kernel tree: Code:
skalkoto@darkstar:/usr/src/linux-2.4.29/init$ grep "/sbin/init" main.c Code:
skalkoto@darkstar:~$ grep "/etc/inittab" /sbin/init |
In case you don't know them yet:
http://axiom.anu.edu.au/~okeefe/p2b/...ower2bash.html http://www-106.ibm.com/developerwork.../l-config.html |
Thanx. I 'll look at them
|
All times are GMT -5. The time now is 11:37 PM. |