Summer 1996 - Lesson 04 Booting the System Steps in the boot process A. monitor mode "man eeprom", "man monitor" on Suns "man lilo" on Linux B. boot file 1. depending on eeprom settings or command line boot arguments b sd(0,0,1) b le() 2. disk boot 3. network boot C. kernel initialization 1. running monologue from various kernel routines 2. logged in /var/adm/messages 3. Tend to be very system-specific 4. here's an example from mu: Jan 15 14:12 SunOS Release 4.1.2 (mu) #2: Mon Aug 8 14:13:05 EDT 1994 Copyright (c) 1983-1991, Sun Microsystems, Inc. mem = 32768K (0x2000000) avail mem = 30597120 Ethernet address = 8:0:20:e:b0:40 cpu = Sun 4/40 zs0 at obio 0xf1000000 pri 12 zs1 at obio 0xf0000000 pri 12 fd0 at obio 0xf7200000 pri 11 audio0 at obio 0xf7201000 pri 13 sbus0 at SBus slot 0 0x0 dma0 at SBus slot 0 0x400000 esp0 at SBus slot 0 0x800000 pri 3 esp0: Target 3 now Synchronous at 4.167 mb/s max transmit rate sd0 at esp0 target 3 lun 0 sd0:st0 at esp0 target 4 lun 0 st0: le0 at SBus slot 0 0xc00000 pri 5 bwtwo0 at SBus slot 3 0x0 pri 7 root on sd0a fstype 4.2 swap on sd0b fstype spec size 32724K dump on sd0b fstype spec size 32712K D. bootup scripts BSD scripts /etc/rc* BSD order of execution single-user startup -init -rc.boot -rc.single -single user shell -exit (or CTL-D) multi-user startup -init -rc.boot -rc.single -rc -rc.local -getty and login prompt SysV bootup scripts 1. /etc/inittab is the master config file for init 2. this file controls which boot-up scripts will be executed 3. the scripts are divied into 'run-levels' 4. example from Linux: id:5:initdefault: si:S:sysinit:/etc/rc.d/rc.S su:S:wait:/etc/rc.d/rc.K rc:123456:wait:/etc/rc.d/rc.M ca::ctrlaltdel:/sbin/shutdown -t3 -rf now D. Halting and rebooting 1. don't turn off power if possible until halted 2. shutdown, halt, or reboot 3. the telinit command E. Problems with booting 1. can't find bootblock 2. kernel won't load 3. can't find swap 4. damaged root file system 5. error in startup scripts