unix system administration booting and shutting down chapter 2
TRANSCRIPT
Unix System Administration
Booting and Shutting Down
Chapter 2
Six Steps to Better Footwear
• Sock Shoe, Sock Shoe or Sock Sock, Shoe, Shoe?
• Load and init the kernel
• Detect and config devices
• Create spontaneous processes
• Operator intervention
• System startup scripts
• Multi-user operation
Sock Shoe, Sock Shoe vs. Sock Sock, Shoe Shoe
• In case of fire...
• Sock sock, shoe shoe– Both feet will be kept warm
• Sock Shoe, Sock Shoe– If raining, sock sock will get wet and cold– Sock shoe can hop around on one foot to stay
dry
Colonel Kernel Here! Let’s Go...
• Kernel is a program• Path is vendor dependent
– Solaris - /kernel/genunix– Linux - depends, sometimes /vmlinuz, see
/etc/lilo.conf
• Two stage process– Boot loader read from disk or tape (vendor
dependent)– Kernel loaded into memory
Let’s Probe Uranus Instead!
• Kernel’s first chore
• Detects and initializes devices built into kernel
• Probes for additional device info and other devices
• In Solaris, devices must be on and the system booted with boot -r to detect new devices
Processes That Start with a “(cheesy) Poof”
• BSD Spontaneous Processes– swapper - process 0– init - process 1– pagedaemon - process 2
• ATT Spontaneous Processes– sched - process 0– init - process 1– various memory handlers (except on Solaris)
Hey, I Need a Little Help Here!
• Single-user mode
• Most modern version of Unix stop and ask for the “root” password before creating a Bourne shell with root privileges
• Minimal services running and partitions mounted
• Operator can run fsck, backups, etc.
• CTRL-D to proceed to multi-user startup
Just follow the Script Please
• Location, content and organization of the startup scripts varies by system
• Two “standard” startup script methods exist.
• BSD - /etc/rc, /etc/rc.boot, /etc/rc.single, /etc/rc.local
• ATT - /etc/inittab, /etc/rc*, /etc/rc*.d/, /etc/init.d
I’ll Go This Way, You Go the BSD Way
Calling All Operators,How Does ATT Startup?
• Run + /etc/inittab determines scripts to run
• /etc/rc* scripts run programs that start with “S” in the /etc/rc*.d directories– foreach f in rc2.d
• run $f
• /etc/rc*.d startup scripts are usually linked to a scripts in a common /etc/init.d directory
It’s More Fun in Multi-User Mode
• Multi-user mode is reached after all the startup scripts run
• The system is ready for more than one user to login at a time
• Services (e.g. web, nfs daemon, telnet daemon, ftp daemon) are up and waiting to service requests
Jeopardy Time
• Answer: The system won’t start.
• Answer: The startup script method Linux uses.
• Answer: It is the command used to properly shutdown the system.