unix system administration booting and shutting down chapter 2

12
Unix System Administration Booting and Shutting Down Chapter 2

Upload: jeffrey-wade

Post on 17-Jan-2016

212 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Unix System Administration Booting and Shutting Down Chapter 2

Unix System Administration

Booting and Shutting Down

Chapter 2

Page 2: 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

Page 3: Unix System Administration Booting and Shutting Down Chapter 2

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

Page 4: Unix System Administration Booting and Shutting Down Chapter 2

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

Page 5: Unix System Administration Booting and Shutting Down Chapter 2

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

Page 6: Unix System Administration Booting and Shutting Down Chapter 2

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)

Page 7: Unix System Administration Booting and Shutting Down Chapter 2

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

Page 8: Unix System Administration Booting and Shutting Down Chapter 2

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

Page 9: Unix System Administration Booting and Shutting Down Chapter 2

I’ll Go This Way, You Go the BSD Way

Page 10: Unix System Administration Booting and Shutting Down Chapter 2

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

Page 11: Unix System Administration Booting and Shutting Down Chapter 2

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

Page 12: Unix System Administration Booting and Shutting Down Chapter 2

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.