The DSL bootprocess
Unregistered
|
|
Posted: Jan. 04 2005,04:22 |
|
hehe, that silly bugger, all confusing people. Using init's the problem.
Init, as well as the entirety of inittab is INSIDE the KNOPPIX file. ntfs.o has to be loaded by the linuxrc inside minirt24.gz before it starts searching for places from which to mount the KNOPPIX file.
Here's how I've figured the bootprocess: Bootloader kernel loads and mounts the initrd (minirt24.gz), attempts to exec /bin/init /bin/init is either an alias for, or a script that loads linuxrc linuxrc does a lot, but in essence, it finds the root partition, mounts it, and passes control to init, switching to runlevel S
When changing runlevels, init executes what commands are found in the inittab. In the case of DSL (and debian in general), it executes that which is contained in /rc{runlevel}.d
Init starts by switching to runlevel S, so the contents of /etc/rcS.d are executed in order (K00-K99, then S00-S99). For both Knoppix and DSL, this is all the hotplug stuff you see on boot. For DSL, it's also where the myDSL stuff is loaded.
Then init switches to the runlevel defined by the "initdefault", in the case of DSL, 5. This is where services specific to our GUI are loaded (sound, printer, etc). You can also place stuff to run before the gui starts here. See below before you go mad-dashing with scite or beaver.
You'll see in inittab that the next thing is to run bash -login. This executes .bashrc and .bash_profile from ${HOME} (in the case of the DSL LiveCD, this is /home/dsl). .bash_profile starts X (if you're not connecting via SSH). startx, among other things, checks to see if there's an xconfiguration, if not, calls xsetup.sh. After that, it starts the xserver and executes ~/.xinitrc
boom. That's how DSL boots. Now you know where to place anything based on where it should be in that process.
|