init and boot scripts:
The main startup process is initiated by the program init, which spawns all other processes. The purpose of init is to bring the system into a usable state.
initreads the file
■First, the main initialization script is run, /etc/rc.sysinit (a Bash script).
■If started in single user mode (runlevel 1 or S), the script /etc/rc.single is run.
■If in any other runlevel (2-5), /etc/rc.multi is run instead.
■The last script to run is /etc/rc.local (via /etc/rc.multi), which is empty by default
The tasks of rc.sysinit are:
1.sources the /etc/rc.conf and /etc/rc.d/functions scripts.
2.displays a welcome message.
3.mounts various virtual file systems.
4.make sure rootfs is mounted read-only (if needed).
6.print deprecation warnings.
7.configures the hardware clock.
8.starts udev, loads modules from the MODULES array defined in rc.conf, and waits for udev to finish processing coldplug events.
9.starts the loopback interface.
10.configures RAID, btrfs and encrypted filesystem mappings.
11.check partitions (fsck).
12.remount the rootfs in order to apply the options from /etc/fstab.
13.mounts local filesystems (networked drives are not mounted before a network profile is up).
14.start monitoring lvm groups.
15.activates swap areas.
17.initialize the random seed.
18.removes various leftover/temporary files, such as /tmp/*.
19.sets the hostname, locale and system clock as defined in rc.conf.
20.configures the locale, console, and keyboard mappings.
21.sets the console font.
22.writes output from dmesg to /var/log/dmesg.log.
The single-user mode is useful for system recovery where preventing remote users from doing anything that might cause data loss or damage is necessary
C. /etc/rc.multi :
1.runs sysctl to apply the settings in /etc/sysctl.conf, modifying kernel parameters at runtime; Arch has very few of these by default (mainly networking settings).
2.starts the daemons, as per the DAEMONS array in rc.conf.
3.runs /etc/rc.local to handle user customizations.
Most common system configuration tasks (like loading modules, changing the console font, or setting up devices) usually have a dedicated place where they are entered.
To avoid confusion, ensure that commands entered in rc.local are not better suited elsewhere, such as /etc/profile.d.