HOME -> LINUX-PMAC -> RC
Looking at the
/etc/inittab I saw, that the whole
initialisation is based onto the two scripts
rc.sysinit is started just once when the
rc is started after
to establish the startup run-level, as well as each time the run level
is changed using the command
After reducing these files, it takes only 6 seconds until I get a console login prompt. So total boot time, from BootX to login prompt is 19 seconds.
The missing link is now, how to start booting Linux right after switching on my PowerBook. It takes now 25 seconds until BootX appears.
|1||Single user mode|
|2||Multiuser without network servers|
|3||Full multiuser mode|
As I use linux on a notbeook, which is rarely attached to a network,
it makes no sense to have two different multiuser modes. Also I think I
will not used xdm login, but start X after having logged in textually.
So I will not use run-level 3 and 5. This means I can remove the line
prefdm from the
When this script is called, it will basically execute all scripts
contained in the directory
either with the argument stop, if the script name starts with K or with
argument start, if the script starts with letter S. The scripts are
really just links into the
Depending on whether the script shall be called with argument start or
stop, a link in the run-level directory is created with a name starting
with K or S.
Now my idea to speed up startup, is to have just the
script, and do everything in there. The script shall be very compact,
and contain also all of the configuration stuff. Nevertheless, it shall
be easily readable/understandable.
Having on 2 "non-shutdown" run-levels, 1 for single-user and 2 for multi-user mode, makes everything easier. I also assume, that if I ever switch from a run-level to the same one, it is ok to restart all servers.
Thus I created a script, which first stops almost everything. Then it looks, if run-level 0 or 6 were selected. In this case some further "stopping" actions are performed, and the system is powered off or rebooted. Otherwise it will first perform setups and start services needed for both run-level 1 and 2. If run-level 2 was selected additional setup-startup takes place.