1) /etc/lilo.conf
2) /etc/inittab
3) /etc
Boot sequence in Red Hat
boot/grub stuff
/etc/inittab
/etc/rc.sysinit script
/etc/init.d stuff ->rc0,rc1,rc2,rc3,etc..
/etc/rc.d/rc.local
Runlevel | Scripts Directory (Red Hat/Fedora Core) | State |
---|---|---|
0 | /etc/rc.d/rc0.d/ | shutdown/halt system |
1 | /etc/rc.d/rc1.d/ | Single user mode |
2 | /etc/rc.d/rc2.d/ | Multiuser with no network services exported |
3 | /etc/rc.d/rc3.d/ | Default text/console only start. Full multiuser |
4 | /etc/rc.d/rc4.d/ | Reserved for local use. Also X-windows (Slackware/BSD) |
5 | /etc/rc.d/rc5.d/ | XDM X-windows GUI mode (Redhat/System V) |
6 | /etc/rc.d/rc6.d/ | Reboot |
s or S | Single user/Maintenance mode (Slackware) | |
M | Multiuser mode (Slackware) |
After the runlevel script is done, the kernel will execute scripts in one of the following directories.
- /etc/rc.d/init.d/ (Red Hat/Fedora )
- /etc/init.d/ (S.u.s.e.)
- /etc/init.d/ (Ubuntu / Debian)
Adding a script to the /etc/rc.d/rc#.d/ directory with either an S or K prefix, adds the script to the boot or shutdown process. The scripts are run in numerical order. S20abc is run before S30xyz. The extensibility to the boot and shutdown procedures of the operating system is one of the strengths of UNIX. The orderly sequential initiation of processes can be coordinated for dependent processes. The orderly shutdown of processes is often required of complex programs such as databases. This is how it is done. Individual processes may be monitored, shutdown and started at any time using these scripts. i.e. /etc/rc.d/rc2.d/httpd start. The modifiers start, stop or status may be used.
The start/stop/status scripts actually reside in the directory:
- /etc/rc.d/init.d/ (Red Hat/Fedora)
- /etc/init.d/ (S.u.s.e. and Ubuntu / Debian)
The rc.local script is the last system script to be executed. This is equivalent to autoexec.bat in windows. This is where most of the customised commands/scripts are located.
Meaning, /etc/init.d is the central depository of all scripts.
Files in rc?.d are symbolic links to /etc/init.d.
Eg if runlevel 3 is selected, scripts in /etc/rc3.d which are symbolic links to scripts in /etc/init.d are executed.
No comments:
Post a Comment