[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: changing processes to start at bootup



Adam wrote:

How do I change the processes started at bootup?  In the old days I
would just edit some file, but does Debian have some special method of
accessing it that works with the package system?  If not, where is the
file I should edit?

Please send me replies by e-mail as I do not subscribe to this list.

Thanks,
Adam


__________________________________________________

Your questions are a bit general, but here's a go at a short explanation.

The CMOS does its thing, such as running the POST, then it looks for some more code to run on the hard drive or the CDROM, etc. It finds the Linux kernel, and loads it. The kernel then starts up the "init" program, which uses the file "/etc/inittab" as its configuration file. Before the CMOS starts loading the Linux kernel, at the LILO prompt (or equivalent, GRUB, etc), you can feed parameters to the kernel to change this default behaviour (such as "linux init=/bin/bash" to start a bash shell instead of the normal "init" program, which can be useful in some troubleshooting/hacking/cracking situations).

In the file "/etc/inittab" you'll see a line such as:
# The default runlevel.
id:2:initdefault:

which specifies the default runlevel to be "2". Further down in the file this causes this line to be executed:
l2:2:wait:/etc/init.d/rc 2


The "/etc/init.d/rc" script, fed the parameter "2", then runs all the Kill scripts (those starting with "K"). in alphanumeric order, that it finds in the "/etc/rc2.d directory. When it finishes that, it runs the Start scripts (those starting with "S"), in alphanumeric order, that if finds in that directory.

These files in the "/etc/rc2.d" directory are usually symbolic links to the actual scripts in "/etc/init.d".

So, to change the processes started at bootup, you'd change/rename/move/delete/ these scripts or the symlinks to these scripts or interfere in some other manner with this process.

Hope this helps!

Kent




Reply to: