PDA

View Full Version : LSB headers for dependency based boot



mecho
06-09-2010, 09:30 AM
I just made an attempt to convert to dependency based boot and it turned out that most of the knoppix scripts are missing their LSB headers which are needed for the new dependency based boot. Did anyone ever tried dpkg-reconfigure insserv sysv-rc
I am getting a message listing almost all knoppix scripts are missing their LSB headers.
May be I should have posted this in hardware&booting. Sorry about this

mecho
06-10-2010, 10:17 PM
Here is how the LSB header looks like for the smail process.

### BEGIN INIT INFO
# Provides: smail
# Required-Start: $remote_fs $syslog
# Required-Stop: $remote_fs $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: simple script to start and stop smail as daemon
### END INIT INFO

Without this LSB header there can not be concurrent process loading at boot up.
The init.d scripts that are missing this headers in knoppix 6.2 are:
knoppix-autoconfig, adriane-screenreader, firewall, knoppix-halt, knoppix-startx, knoppix-terminalserver, sbl

All of those are proprietary knoppix scripts. Can someone using knoppix 6.2.1 or 6.3 check their init.d and see if any of this scripts has the LSB TAG. It should look like the one above for smail and is at the beginning just after #! /bin/sh

mecho
06-11-2010, 03:57 PM
OK I figured it out. In 6.2 knoppix-autoconfig is solely responsible for loading daemons. You can add or remove daemons which are loaded at boot by modifying it. And I guess no concurrency is possible as knoppix follows this boot script. I am not sure if things are the same way in 6.2.1
I think in 6.2.1 and probably 6.3 knoppix scripts only do the hardware detection and load udev. So may be it will be possible to have concurrent loading of processes in those versions

krishna.murphy
06-11-2010, 10:17 PM
OK I figured it out. In 6.2 knoppix-autoconfig is solely responsible for loading daemons. You can add or remove daemons which are loaded at boot by modifying it. And I guess no concurrency is possible as knoppix follows this boot script. I am not sure if things are the same way in 6.2.1
I think in 6.2.1 and probably 6.3 knoppix scripts only do the hardware detection and load udev. So may be it will be possible to have concurrent loading of processes in those versions

AFAIK there is great deal of concurrency in Knoppix 6; see the Microknoppix (http://www.knopper.net/knoppix/knoppix62-en.html) summary of features. "Accellerated boot procedure: Independently from the usual SysV bootscripts, multiple tasks of system initialization are run in parallel, so that interactive desktops are reached very fast."

What do you want to accomplish, exactly, in tweaking the boot process? In this case, perhaps we need to widen the focus to get more in tune with your goals.

Cheers!
Krishna :mrgreen:

mecho
06-12-2010, 12:58 AM
I think that Accelerated boot procedure is exactly what is new to 6.2.1 and is lacking in 6.2.
I think the boot scripts are not run in parallel in 6.2 and knoppix-autoconfig is entirely responsible of loading them. Scripts which are in init.d are not run by their S symlinks in the RC folders - they are loaded by knoppix-autoconfig and not executed in parallel for faster system start. Apart of the faster start if I need to have a process run at boot I have to manually enter it in autoconfig to get it started at boot. Cron for example is not in autoconfig by default and is off by default when the system is up. If you need it you have to manually start it. I hope I am expressing myself well enough in english. I wrote this because it would probably be informational for some people wondering why an installed process is not running when it should be if it's in init.d and has the starting symlinks.
And it would be very usefull if there is a descussion about the way knoppix starts. It might be helpfull for a lot of new users like me

krishna.murphy
06-12-2010, 02:34 AM
I think that Accelerated boot procedure is exactly what is new to 6.2.1 and is lacking in 6.2.Nope, I don't think so - see the 6.0 release notes (http://www.knopper.net/knoppix/knoppix60-en.html), which have the same language about accelerating boot. Might be fruitful to download that version and play with it, see what differences it exhibits.

I think the boot scripts are not run in parallel in 6.2 and knoppix-autoconfig is entirely responsible of loading them. Scripts which are in init.d are not run by their S symlinks in the RC folders - they are loaded by knoppix-autoconfig and not executed in parallel for faster system start. Apart of the faster start if I need to have a process run at boot I have to manually enter it in autoconfig to get it started at boot.That's a useful observation!
Cron for example is not in autoconfig by default and is off by default when the system is up. If you need it you have to manually start it. I hope I am expressing myself well enough in english. I wrote this because it would probably be informational for some people wondering why an installed process is not running when it should be if it's in init.d and has the starting symlinks.
And it would be very usefull if there is a descussion about the way knoppix starts. It might be helpfull for a lot of new users like meI agree, and I applaud your efforts, especially since English is not your mother-tongue (and not easy, either.) And I find your English is "good enough", FWIW - while there are some occasional faux pas, it doesn't take a lot of effort to get what your meaning is. Thanks for taking the time and energy to contribute!

Cheers!
Krishna :mrgreen:

mecho
06-12-2010, 02:51 AM
Thanks Krishna,
I am relatively new linux user and went through a few live distros before I found Knoppix. I don't think I will opt for another distro any time soon as Knoppix fits all my expectations. It's relatively easy to learn and gives you just enough troubles to make you learn. I am running my laptop from a USB Knoppix stick 99% of the time :D

koolb
04-02-2012, 03:39 AM
Wow, i am just now looking into this myself. Kinda torn. I need to load services only after a successful connection to my router. Wicd is very nice for this as it will not prompt for your keyring password to connect (ie, can be done in the background). I am on 6.4.4 now about to move to 7.0 soon. to do this first:
apt-get install wicd, then


cd /etc/xdg/autostart && mv nm-applet.desktop .. # move out of autostart and now rely on wicd-tray.desktop newly located here from installation of wicd, Then

cd /etc/init.d && mv network-manager network-manager.disabled # you will want to reverse these steps in the future so hold on to your network-manager!

cd /etc/default && sed -p 's/DEFAULT=.*$/DEFAULT=yes/' wicd # you can edit this file manually if you prefer, the install may make this start automajically
now you can restart or (pkill your nm-applet and stop network-manager manually)

you can now put in a network related connection script in /etc/wicd/scripts/postconnect/up:
for service in "ntp apache2";
do /etc/init.d/$service start; doneYou can configure wicd to auto-connect lan and any wireless - of which it will remember your PSA keys.
However, wicd 1.7.0 will not connect to some of your older routers so you need to restore network-manager (and manually type your keyring each time like now).

And i do agree, even knoppix 6.4.4 has /etc/init.d/.legacy-bootordering and it seems all the startups are done in sequence vs parallel in /etc/init.d/knoppix-autoconfig but there is many thats run ultimatley with trailing & so a good portion of them are done in parallel. I am wondering if using the insserv style headers will cause more problems than help at this point. Right now im all for leaving it alone.

Anyways, I am shocked this seems to be the only thread on this because I have found this