Linux Startup Scripts

or
What happens before the login prompt!

Kim Oldfield, kimo@debian.lib.monash.edu.au

Presented to Linux Users of Victoria.

Original presentation created using MagicPoint.


Boot sequence summary


BIOS

Load boot sector from one of:


Master Boot Record


LILO

One minute guide to installing a new kernel


Kernel


initrd

Allows setup to be performed before root FS is mounted

Details in /usr/src/linux/Documentation/initrd.txt


/sbin/init


sysinit


Example Debian /etc/rcS.d/ directory

README

S05keymaps-lct.sh -> ../init.d/keymaps-lct.sh

S10checkroot.sh -> ../init.d/checkroot.sh

S20modutils -> ../init.d/modutils

S30checkfs.sh -> ../init.d/checkfs.sh

S35devpts.sh -> ../init.d/devpts.sh

S35mountall.sh -> ../init.d/mountall.sh

S35umsdos -> ../init.d/umsdos

S40hostname.sh -> ../init.d/hostname.sh

S40network -> ../init.d/network

S41ipmasq -> ../init.d/ipmasq

S45mountnfs.sh -> ../init.d/mountnfs.sh

S48console-screen.sh -> ../init.d/console-screen.sh

S50hwclock.sh -> ../init.d/hwclock.sh

S55bootmisc.sh -> ../init.d/bootmisc.sh

S55urandom -> ../init.d/urandom


Run Levels


Run Level programs


Typical /etc/rc3.d/ directory

When changing runlevels /etc/init.d/rc 3:

K25nfs-server -< ../init.d/nfs-server

K99xdm -< ../init.d/xdm

S10sysklogd -< ../init.d/sysklogd

S12kerneld -< ../init.d/kerneld

S15netstd_init -< ../init.d/netstd_init

S18netbase -< ../init.d/netbase

S20acct -< ../init.d/acct

S20anacron -< ../init.d/anacron

S20gpm -< ../init.d/gpm

S20postfix -< ../init.d/postfix

S20ppp -< ../init.d/ppp

S20ssh -< ../init.d/ssh

S20xfs -< ../init.d/xfs

S20xfstt -< ../init.d/xfstt

S20xntp3 -< ../init.d/xntp3

S89atd -< ../init.d/atd

S89cron -< ../init.d/cron

S99rmnologin -< ../init.d/rmnologin


Boot Summary