Linux Start Sequence Summary CS7493
Linux Startup The compressed version of the kernel is loaded into memory. Look in /boot for kernel uname –a will show the kernel version The kernel expands and begins to run
Linux Startup The initrd process is loaded and begins to run This process acts as a memory based file system before the actual HD is mounted. Several special processes are started Drivers are loaded for some hardware devices including the root file system.
Linux Startup The process init is started, PID = 1. init reads the inittab file: /etc/inittab inittab defines the boot level The rc.sysinit script is run: /etc/rc.d/rc.sysinit The rc script is run: /etc/rc.d/rc
Linux Startup The rc script starts the services for the specified runlevel: rc 5 Runlevels 0 = shutdown 1 = single user mode 2= multi user mode 3 = level 2 + networking 5 = level 3 + X windows (for the GUI) 6 = restart
Linux Startup The startup directories and files are found in /etc /etc/rc.d rcN.d where n = the runlevel rc.sysinit rc /etc/init.d
Linux Startup There are a series of symbolic links in the /etc/rc.d/rcN.d The links are connected to the actual services started during the startup procedure. KxxserviceName (kill service) SxxserviceName (start service) Where xx is a two digit field
Linux Startup The actual startup script for anavailable service is in /etc/init.d Create a link from /etc/rc.d/rcN.d to the desired service in /etc/ini.d, to start the service during boot. Manual start of a service: service serviceScriptName [start|stop|restart]
How to manually start a service su – root Enter the root password cd /etc/init.d service ./serviceScriptName start Example: service ./smb start (starts Samba)
Stop a service Login as root cd /etc/init.d service ./serviceScriptName stop