Boot process and services management

The boot process of Linux on a Intel i386 architecture has steps common in every distro:
- A Linux Loader is placed at the first sector read by the bios (The Master Boot Record of an hard disk, or the equivalent of a CDROM)
- The kernel is loaded. Newer distributions use a kernel of the 2.6 family, but the 2.4 is still widely deployed.
- Init is started and executes various scripts.

The Linux Loader (on Intel compatible architectures) is typically Lilo or Grub for hard disk installations (Syslinux is a common choice for booting CDROMs: live or install disks).
Configuration files are generally /etc/lilo.conf and /boot/grub/grub.conf here you define:
- where to place to Linux Loader (Master Boot Record or boot record of a single partition),
- what is the partition where resides the root ( / ) of your system,
- the path for the kernel image and for the initrd.
It's always possible to define different systems to boot (Linux or other OS) and different kernel versions.

The Linux Kernel in every distro is obviously derived from Linus Torvalds' kernel but it can have different version and some variations and non-Linus patches defined and compiled by the distro maintainer.
It's always possible to recompile the kernel from the official sources or from the custom source packages of the distro used.

Init is the first process launched in every UNIX system: it's config file is ALWAYS /etc/inittab
Analyze it and all the script sourced from it and you can entirely reconstruct what happens in the boot process.
The logic the distro maintainer has used in the initscritps largely defines the systems' nature and essence.
The difference between Linux/Unix dialects is mostly a matter of shell (init)scripts.

The Unix System V boot method, based on the rc scripts is used in many Linux and defines what startup scripts in /etc/init.d/ activate at the different runlevel.

Debian
/etc/init.d/rcS - The system initialization script that executes all the "S" symlinked scripts in /etc/rcS.d/ for system initialization.
The directory /etc/default/ contains configuration settings (similar to /etc/sysconfig/ of other distros). After the basic initialization, the system enters in the default runlevel (Note: Debian uses 2 as default text networked runlevel, instead of 3, as in various other *nix) executing the services startup scripts in /etc/init.d according to the SysV logic of the /etc/rc#.d/ symlinks.

RedHat
/etc/rc.d/rc.sysinit Large script, launched directly by init, that sets and executes all the system initialization functions. It sources configuration files in /etc/sysconfig/* where user (and configuration tools) define various system settings
/etc/rc.d/functions General purpose functions used by every system script
/etc/init.d/* The startup/shutdown scrips of all the system services activated according to the symlinks in the /etc/rc#.d/ directories

SlackWare
/etc/rc.d/rc.S - System Initialization
/etc/rc.d/rc.modules - Kernel modules loading /etc/rc.d/rc.pcmcia, rc.serial ... - Probe and configure various hardware devices
/etc/rc.d/rc.sysvinit - Executes the SysV init files according to the chosen runlevel
/etc/rc.d/rc.local - Reserved for user's custom boot commands

Mandrake
/etc/init.d/rc.sysinit Large script, launched directly by init, that sets and executes all the system initialization functions. It sources configuration files in /etc/sysconfig/*) where user (and configuration tools) define various system settings
/etc/init.d/functions General purpose functions used by every system script

Gentoo
/sbin/rc handles everything and does different activities according to the argument given. Gentoo's inittab executes: /sbin/rc sysinit for general system initialization, /sbin/rc boot for further generic boot commands and /sbin/rc default to enter in the default runlevel, executing the usual services scripts in /etc/init.d/.

SUSE
/etc/init.d/boot First script launched by init, it sources and handles what follows
/etc/init.d/boot.* Various boot files for different purposes that are executed according to the logic of S/K symlinks in the /etc/init.d/boot.d/ directory
/etc/init.d/boot.local Last file, before entering in the rc phase, reserved for user's custom boot commands
/etc/init.d/* The single services startup scripts launched according to selected runlevel (/etc/init.d/rc#.d/ rc symlinks)

Privacy Policy