Unit 3
System startup and shutdown
© Copyright IBM Corporation 2008
Course materials may not be reproduced in whole or in part without the prior written permission of IBM. 5.1
Unit objectives
After completing this unit, you should be able to:
• Describe the system startup process
• Explain how to shut down the system
• Describe the contents of the /etc/inittab file
• Manage the system environment
© Copyright IBM Corporation 2008
Startup modes
Normal mode
Login prompt
All processes running
Multi-user mode
System Management Services
Not AIX
Runs from FIRMWARE
Sets boot list
Maintenance mode
Maintenance menu
Recover root password
Fix machine that won't boot
Diagnostics
AIX
AIX diagnostics
Diagnostics
© Copyright IBM Corporation 2008
Starting System Management services
© Copyright IBM Corporation 2008
System p server start up process overview
Power on
POST
Locate OS bootstrap image
Find AIX boot image
Load AIX boot image
RAMDISK created
Configuration Manager Phase 1
INIT
Normal IPL
© Copyright IBM Corporation 2008
The bootinfo command
• To view the architecture type:
# bootinfo -p
rs6k MCA model
rspc PCI model (POWER Reference Platform)
chrp PCI model (Common Hardware Reference)
• To view the bit addressing:
# bootinfo -y
32 32-bit
64 64-bit
© Copyright IBM Corporation 2008
The alog command
User Boot Install
NIM
Applications Process Process
alog program
/var/adm/ras/bootlog
/var/adm/ras/BosMenus.log
Use the /var/adm/ras/bosinst.log
alog /var/adm/ras/nimlog
command /var/adm/ras/conslog
to view /var/adm/ras/errlog
logs
To view the boot log:
# alog -o -t boot
© Copyright IBM Corporation 2008
/etc/inittab
Format of the line: id:runlevel:action:command
init:2:initdefault:
brc::sysinit:/sbin/rc.boot 3 >/dev/console 2>&1 # Phase 3 of system boot
powerfail::powerfail:/etc/rc.powerfail 2>&1 | alog -tboot > /dev/console ...
mkatmpvc:2:once:/usr/sbin/mkatmpvc >/dev/console 2>&1
atmsvcd:2:once:/usr/sbin/atmsvcd >/dev/console 2>&1
load64bit:2:wait:/etc/methods/cfg64 >/dev/console 2>&1 # Enable 64-bit execs
tunables:23456789:wait:/usr/sbin/tunrestore -R > /dev/console 2>&1 ...
rc:23456789:wait:/etc/rc 2>&1 | alog -tboot > /dev/console # Multi-User checks
fbcheck:23456789:wait:/usr/sbin/fbcheck 2>&1 | alog -tboot > /dev/console ...
srcmstr:23456789:respawn:/usr/sbin/srcmstr # System Resource Controller
rctcpip:23456789:wait:/etc/rc.tcpip > /dev/console 2>&1 # Start TCP/IP daemons
rcnfs:23456789:wait:/etc/rc.nfs > /dev/console 2>&1 # Start NFS Daemons
cron:23456789:respawn:/usr/sbin/cron
piobe:2:wait:/usr/lib/lpd/pio/etc/pioinit >/dev/null 2>&1 # pb cleanup
qdaemon:23456789:wait:/usr/bin/startsrc -sqdaemon
writesrv:23456789:wait:/usr/bin/startsrc -swritesrv
uprintfd:23456789:respawn:/usr/sbin/uprintfd
shdaemon:2:off:/usr/sbin/shdaemon >/dev/console 2>&1 # High availability daemon
l2:2:wait:/etc/rc.d/rc 2
l3:3:wait:/etc/rc.d/rc 3
l4:4:wait:/etc/rc.d/rc 4
. . .
© Copyright IBM Corporation 2008
System resource controller
• Provides a single interface to control subsystems
• Controls individual subsystems or groups of subsystems
Subsystem group spooler
Subsystem qdaemon writesrv lpd
Subserver qdaemon writesrv lpd
© Copyright IBM Corporation 2008
System resource controller syntax
• List SRC status:
# lssrc -g spooler
subsystem Group PID Status
qdaemon spooler 8022 active
writesrv spooler 9558 active
lpd spooler inoperative
• Start a subsystem:
# startsrc -s lpd
0513-059 The lpd Subsystem has been started. Subsystem PID is 12472.
• Refresh a subsystem:
# refresh -s lpd
0513-095 The request for subsystem refresh was completed successfully.
• Stop a subsystem:
# stopsrc -s lpd
0513-044 The lpd Subsystem was requested to stop.
© Copyright IBM Corporation 2008
Stopping processes
• # ps -ef
UID PID PPID C STIME TTY TIME CMD
root 1 0 0 May 04 - 0:11 /etc/init
root 2626 1 0 May 04 - 1:17 /usr/sbin/syncd 60
root 4136 1 0 May 04 - 0:00 /usr/sbin/srcmstr
root 4964 4136 0 May 04 - 0:00 /usr/sbin/inetd
root 6734 1 0 May 04 - 0:02 /usr/sbin/cron
root 8022 4136 0 May 04 - 0:00 /usr/sbin/qdaemon
root 9036 1 0 May 04 - 0:00 /usr/sbin/uprintfd
root 9345 1 0 May 04 - 0:02 /usr/bin/program
• For process not started by srcmstr:
# kill 9345
• For processes started by SRC:
# stopsrc -s qdaemon
© Copyright IBM Corporation 2008
System shutdown
• The shutdown command:
– Gracefully stops all activity on the system and advises all logged on users
– Warns users of an impending shutdown
# shutdown +2 The system will be down until 3AM
Broadcast message from root@localhost (tty) at
1:30:20...
The system will be down until 3AM
shutdown: PLEASE LOG OFF NOW!!!
All processes will be killed in 2 minutes
© Copyright IBM Corporation 2008
Manage the system environment
# smit system
System Environments
Move cursor to desired item and press Enter.
Stop the System
AIX Security Expert
Assign the Console
Change / Show Date, Time, and Time Zone
Manage Language Environment
Change / Show Characteristics of Operating System
Change / Show Number of Licensed Users
Broadcast Message to all Users
Manage System Logs
Change / Show Characteristics of System Dump
Change/Show Documentation Services
Change System User Interface
Change/Show Default Browser
Change/Show Documentation Services
Web-based System Manager
Enable 64-bit Application Environment
Manage Remote Reboot Facility
Manage System Hang Detection
F1=Help F2=Refresh F3=Cancel F8=Image
F9=Shell F10=Exit Enter=Do
© Copyright IBM Corporation 2008
Manage Language Environment
# smit mlang
Manage Language Environment
Move cursor to desired item and press Enter.
Change/Show Primary Language Environment
Add Additional Language Environments
Remove Language Environments
Change/Show Language Hierarchy
Set User Languages
Change/Show Applications for a Language
Convert System Messages and Flat Files
F1=Help F2=Refresh F3=Cancel F8=Image
F9=Shell F10=Exit Enter=Do
© Copyright IBM Corporation 2008
Hardware Management Console
© Copyright IBM Corporation 2008
HMC – LPAR operations menu
© Copyright IBM Corporation 2008
Checkpoint
1. What is the first process that is created on the system
and which file does it reference to initiate all the other
processes that have to be started?
____________________________________________
____________________________________________
2. Which AIX feature can be used to stop and start groups
of daemons or programs?
____________________________________________
3. True or False? You can only execute the shutdown
command from the console.
© Copyright IBM Corporation 2008
Checkpoint solutions
• What is the first process that is created on the system
and which file does it reference to initiate all the other
processes that have to be started?
The initial process is init, which checks /etc/inittab for
information regarding other processes that have to be
started.
• Which AIX feature can be used to stop and start groups
of daemons or programs?
The System Resource Controller (SRC)
• True or False? You can only execute the shutdown
command from the console.
© Copyright IBM Corporation 2008
Exercise 3: System startup and shutdown
• Multi-user mode
• Boot using System Management Services
• System Resource Controller (SRC)
• Resetting the run level (INIT)
© Copyright IBM Corporation 2008
Unit summary
• When the system boots up, it first runs through a number of
hardware checks before starting the processes defined in
the /etc/inittab file.
• The LED codes produced during the boot process can be
used to identify problems. Alternatively, the boot log file can
be accessed to obtain the system messages produced
during the boot phase.
• Once the system is up, it can be shut down by an
authorized user from any terminal.
• SMIT can be used to change common system settings such
as the language used, and the date and time used by the
system.
© Copyright IBM Corporation 2008