The boot process
What happens while booting your Linux system?DOS uses the files CONFIG.SYS and AUTOEXEC.BAT, but Linux makes it much more interesting.
First the expensive product:
Linux theoretically can have unlimited runlevels but the following ones are included by default:
From now on everything depends on the chosen distribution - look in the /etc/inittab
More information can be reviewed with
LinksThe basic steps
The advantage of this boot process is the ability to change everything the way you want it to be.
Instead of the Energy Star logo you are able to place a nice penguin logo here.
More information about changing the BIOS logo can be found at
here.
Another way can be LILO, the LInux LOader. It loads the kernel directly from the physical sector on a hard disk. Therefore, LILO writes itself into the Master Boot Record (MBR) together with the sectors where the kernels are placed. After choosing the appropriate kernel, it writes it into memory and executes it.
The kernel finished its job and the complete system of all discovered and mounted hardware is available.
The messages that show the point where the kernel ends and the programs begin looks like:
VFS: mounted root (ext2fs) filesystem read-only. (still Kernel)
INIT: Version X.XX booting (already INIT)
/etc/inittab where it finds the runlevel that has to be started (id:X:initdefault:, where `X' is the number of the runlevel).
Then INIT checks which program has to be started next, because not a server nor a shell has been started, nor has a network connection been made nor any partition been made available. All this happens in the line si:I:wait:PROGRAM).
In general PROGRAM stands for /etc/rc.d/init.boot or /sbin/init.d/boot and this one is executed now.
Please Remember: Every system can be different.
and if one partition has a problem, it would stop the process and requires a root login
Often, you find the file boot.local in the same directory which is executed by boot at the end. In it, you can place additional commands.
Of course, you could put these commands into the boot script, but be careful! You should not change anything there as long as you do not know what you are doing./etc/inittab) and now all scripts of this runlevel are /etc/inittab: lN:N:wait:SCRIPT (N=runlevel). In general, this means that all scripts in /etc/init.d/rcN.d/ (or similar) are started (N=runlevel).
Here, all the services and daemons are started which are run in the background. At the same time, lock- and log-files are created if necessary.
This is specified in the /etc/inittab,too.
"respawn" means here that the program would be restarted at once if it was finished. Without this option you would be able to login only once ...
This works over a network like so many other things, too. E.g. a simple startx --query another_computer:0 places a login window of another computer in the network on your screen.
Definition Runlevel
M$ Windows knows 6 runlevels which cannot be changed:
Now everyone should know what is meant by the term "run level".
0:
6:
S:
root has access to log in; no network at all. A good mode for fixing things.
1:
What exactly is started or stopped in each runlevel is defined by the scripts you find in /etc/rcN.d or /etc/rc.d/rcN.d or /sbin/init.d/rcN.d (with N=runlevel).2:
3:
4:
5:
>> man 8 init.
The German text is part of the Linux USER FAQ and was generously sent to us by Jens Benecke, an author of the
Linux USER FAQ.
Author's homepage (Jens Benecke): http://www.linuxfaq.de
Talkback Area
Enter Own Comment