[RHCE] For Wednesday: Boot Process Notes

Gregory Woodbury ggw at wolves.durham.nc.us
Tue Sep 23 17:51:14 EDT 2003


Print this out and bring with you on Wednesday, Sept. 24, 2003
	-Greg
------------------------------------------------------------------------------

Unit 2: The Boot Process

 1.  The BIOS
		Basic I/O System - ROM based, Power On Self Test, loads the MBR

 2.  GRUB Bootloader
     a.  MBR - Stage 1
		loads Stage 2 or Stage 1.5, does not understand filesystems
     b.  Stage 1.5
		loads Stage 2, understands filesystems
     c.  Stage 2
		does the rest of the loading process, loads initrd
     d.  grub.conf
		configuration file for "menu" interface
     e.  command interface
		allows editing of configuration or booting alternates

 3.  The Kernel
		core system management program
     a.  CPU initialization
		detect CPU types and features
     b.  memory initialization
		set up memory pools
     c.  monolithic kernels
		all drivers included in kernel load
     d.  modular kernels
		some drivers are stored externally and loaded as needed
     e.  driver initialization
		go through drivers and call their initialization functions

 4.  The Initrd
		Initial ramdisk containing kernel modules
     a.  RAMdisk
		initialized by Stage 2 specification
     b.  modules
		contains kernel modules from /lib/modules/<kernel-version>/*

 5.  Process Initialization
		System V initialization style
     a.  process 1 - init
		"hand crafted" by kernel during initialization stage
     b.  fork/exec
		basic means of running another process, real or threads
     c.  /etc/inittab
		tells Init what processes to run

 6.  Run Control
		run as specified by inittab
     a.  Runlevels
		0  shutdown
		1  single user mode
		2  multi-user, no network or many other services
		3  full multi-user, no GUI
		4  <unused - clone of 3?>
		5  full GUI multi-user
		6  reboot
     b.  /etc/rc.d
		service scripts in /etc/rc.d/rcN.d/*
		linked from /etc/rc.d/init.d
			KNN<name>	stop services
			SNN<name>	start services in numerical order
		arguments:	start
				stop
				restart
				reload
				status
		chkconfig, ntsysv, redhat-config-service covered later
     c.  /etc/rc.local
		for local administrator use (if not writing a full script)

 7.  text consoles
		runlevel 2,3,4,5 interfaces
		/dev/ttyNN
     a.  *getty
		started via inittab for each "virtual console", or serial line
		sends /etc/issue file when opened
		collects username/password, calls login
     b.  login
		checks username/password
		uses PAM
		initializes environment for shell
     c.  shell
		started by login based on /etc/passwd entry

 8.  GUI console
		started in runlevel 5
     a.  display manager
		handles login, determines GUI flavor (GNOME,KDE,WMaker,etc...)
     b.  startx
		user interface instead of display manager

	more in Unit on X windows

 9.  Troubleshooting
     a. GRUB
		missing configuration
		wrong configurations
     b. inittab
		missing inittab
		wrong inittab
		can't start init
     c. /etc/rc.d
		missing linkages


More information about the RHCE mailing list