0% found this document useful (0 votes)
110 views20 pages

Unit 2 System Startup and Shutdown

Unit2

Uploaded by

Richie Ballyears
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
110 views20 pages

Unit 2 System Startup and Shutdown

Unit2

Uploaded by

Richie Ballyears
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 20

Unit 2

System startup and shutdown

© Copyright IBM Corporation 2009


Course materials may not be reproduced in whole or in part without the prior written permission of IBM. 5.2
Unit objectives
IBM Power Systems

After completing this unit, you should be able to:


• Describe the System and AIX startup process
• Activate the System and AIX partitions
• Understand the AIX startup modes
• Describe the contents of the /etc/inittab file
• Understand the role of the System Resource Controller and
how to manage subsystems
• Explain how to shut down the system and AIX partitions

© Copyright IBM Corporation 2009


System startup
IBM Power Systems

Plug in managed system


Level 1: Power off Service Processor is active

Issue Power On command


All devices are initialized and powered on.
Level 2: Standby
System is ready to support partitions.

SMS mode
Start AIX - OR -
partitions
Normal mode

Level 3: Operating System is running partitions.

© Copyright IBM Corporation 2009


Managed system activation
IBM Power Systems

# ssh hscroot@<hmc> chsysstate -m <ms_name> -r sys -o on

© Copyright IBM Corporation 2009


Start-up modes for AIX (1 of 2)
IBM Power Systems

• The two most popular start-up modes are:


– SMS mode (the firmware menu)
– Normal mode

• SMS mode is used for :


– Selecting the boot device, for example: Network and IPL parameters
– Booting into Service (Maintenance) mode, examples:
• To fix a machine that will not boot
• Recover root password
SMS Top
Level
PowerPC Firmware
Version EL320_083 Firmware
SMS 1.7 (c) Copyright IBM Corp. 2000,2008 All rights reserved. Menu
----------------------------------------------------------------
Main Menu
1. Select Language
2. Setup Remote IPL (Initial Program Load)
3. Change SCSI Settings
4. Select Console
5. Select Boot Options

© Copyright IBM Corporation 2009


Start-up modes for AIX (2 of 2)
IBM Power Systems

• Normal mode
– AIX boots into multi-user mode (run level 2).
– Users can log in, the system can be configured, and applications can start.
– The bootlist command can set/change the start-up boot device.

## bootlist Displays the current


bootlist -m
-m normal
normal -o
-o boot device (hdisk0)
hdisk0 blv=hd5
hdisk0 blv=hd5
## bootlist
bootlist -m
-m normal
normal ent0
ent0 bserver=10.47.1.33
bserver=10.47.1.33 client=10.47.1.101
client=10.47.1.101

Changes the current


• Other less common start-up modes: normal bootlist to boot over
the network through device
– Diagnostic with default boot list ent0 to a network install
• Used to run diagnostics using diagnostic CD server 10.47.1.33

– Diagnostic with stored boot list


• Used to run online diagnostics
– Open firmware
• Open firmware prompt. Use by service/support personnel to obtain low level
debug information
© Copyright IBM Corporation 2009
AIX start up process overview
IBM Power Systems

Partition Activation

Locate AIX boot image


via firmware or bootlist

Load boot image


RAMFS created AIX Kernel is now in control

Configure Devices init process from RAMFS


Start rootvg executes rc.boot script

Start ‘real’ init process


From rootvg Process /etc/inittab, default run-level 2

LOGIN
© Copyright IBM Corporation 2009
AIX partition activation (1 of 2)
IBM Power Systems

# ssh hscroot@<hmc> chsysstate -m <ms_name> -r lpar \


-o on -n <lpar> -f <profile name> -b sms

To activate
into SMS

© Copyright IBM Corporation 2009


AIX partition activation (2 of 2)
IBM Power Systems

AIX
AIX Version
Version 66
Copyright
Copyright IBM
IBM Corporation,
Corporation, 1982,
1982, 2007
2007
Console
Console login:
login:

© Copyright IBM Corporation 2009


The alog command
IBM Power Systems

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
command
/var/adm/ras/nimlog
to view /var/adm/ras/conslog
logs /var/adm/ras/errlog

To view the boot log:


## alog
alog –o
–o –t
–t boot
boot

© Copyright IBM Corporation 2009


/etc/inittab
IBM Power Systems

Format of the line: id:runlevel:action:command


init:2:initdefault:
init:2:initdefault:
brc::sysinit:/sbin/rc.boot 3 >/dev/console 2>&1 # Phase 3 of system boot
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
powerfail::powerfail:/etc/rc.powerfail 2>&1 | alog -tboot > /dev/console
mkatmpvc:2:once:/usr/sbin/mkatmpvc >/dev/console 2>&1
mkatmpvc:2:once:/usr/sbin/mkatmpvc >/dev/console 2>&1
atmsvcd:2:once:/usr/sbin/atmsvcd >/dev/console 2>&1
atmsvcd:2:once:/usr/sbin/atmsvcd >/dev/console 2>&1
tunables:23456789:wait:/usr/sbin/tunrestore -R > /dev/console 2>&1 # Set tunables
tunables:23456789:wait:/usr/sbin/tunrestore -R > /dev/console 2>&1 # Set tunables
rc:23456789:wait:/etc/rc 2>&1 | alog -tboot > /dev/console # Multi-User checks
rc:23456789:wait:/etc/rc 2>&1 | alog -tboot > /dev/console # Multi-User checks
rcemgr:23456789:once:/usr/sbin/emgr -B > /dev/null 2>&1
rcemgr:23456789:once:/usr/sbin/emgr -B > /dev/null 2>&1
fbcheck:23456789:wait:/usr/sbin/fbcheck 2>&1 | alog -tboot > /dev/console
fbcheck:23456789:wait:/usr/sbin/fbcheck 2>&1 | alog -tboot > /dev/console
srcmstr:23456789:respawn:/usr/sbin/srcmstr # System Resource Controller
srcmstr:23456789:respawn:/usr/sbin/srcmstr # System Resource Controller
rctcpip:a:wait:/etc/rc.tcpip > /dev/console 2>&1 # Start TCP/IP daemons
rctcpip:a:wait:/etc/rc.tcpip > /dev/console 2>&1 # Start TCP/IP daemons
rcnfs:a:wait:/etc/rc.nfs > /dev/console 2>&1 # Start NFS Daemons
rcnfs:a:wait:/etc/rc.nfs > /dev/console 2>&1 # Start NFS Daemons
sniinst:2:wait:/var/adm/sni/sniprei > /dev/console 2>&1
sniinst:2:wait:/var/adm/sni/sniprei > /dev/console 2>&1
cron:23456789:respawn:/usr/sbin/cron
cron:23456789:respawn:/usr/sbin/cron
qdaemon:a:wait:/usr/bin/startsrc -sqdaemon
qdaemon:a:wait:/usr/bin/startsrc -sqdaemon
writesrv:a:wait:/usr/bin/startsrc -swritesrv
writesrv:a:wait:/usr/bin/startsrc -swritesrv
uprintfd:23456789:respawn:/usr/sbin/uprintfd
uprintfd:23456789:respawn:/usr/sbin/uprintfd
shdaemon:2:off:/usr/sbin/shdaemon >/dev/console 2>&1 # High availability daemon
shdaemon:2:off:/usr/sbin/shdaemon >/dev/console 2>&1 # High availability daemon
l2:2:wait:/etc/rc.d/rc 2
l2:2:wait:/etc/rc.d/rc 2
l3:3:wait:/etc/rc.d/rc 3
l3:3:wait:/etc/rc.d/rc 3
l4:4:wait:/etc/rc.d/rc 4
l4:4:wait:/etc/rc.d/rc 4
l5:5:wait:/etc/rc.d/rc 5
l5:5:wait:/etc/rc.d/rc 5
l6:6:wait:/etc/rc.d/rc 6
l6:6:wait:/etc/rc.d/rc 6
l7:7:wait:/etc/rc.d/rc 7
l7:7:wait:/etc/rc.d/rc 7
l8:8:wait:/etc/rc.d/rc 8
l8:8:wait:/etc/rc.d/rc 8
l9:9:wait:/etc/rc.d/rc 9
l9:9:wait:/etc/rc.d/rc 9
……………
……………

© Copyright IBM Corporation 2009


Run levels
IBM Power Systems

• Run levels on AIX:


– 0 and 1: Reserved for future use
– 2 default (normal): Multi-user mode
– 3 through 9: Free to be defined by the administrator

• The telinit or init command can be used to change run


levels.
– a, b, c and h can be initiated during any run level start-up, 2
through 9, without killing any existing run level processes.
– S, s, M, m, results in the system entering single user /
maintenance mode.
– Q, q, re-examines and processes the /etc/inittab file on request.

Example: To go from single user to multi-user mode, execute:


# telinit 2

© Copyright IBM Corporation 2009


Directory and script control
IBM Power Systems

• Start-up and stops scripts can be defined for each run level
which are automatically invoked at entry and exit.
/etc/rc.d # ls –R
/etc/rc.d # ls –R
init.d rc rc2.d rc3.d rc4.d rc5.d rc6.d rc7.d rc8.d rc9.d
init.d rc rc2.d rc3.d rc4.d rc5.d rc6.d rc7.d rc8.d rc9.d
./init.d:
./init.d:
./rc2.d:
./rc2.d:
Ksshd Kwpars Ssshd Scripts starting with
Ksshd Kwpars Ssshd
S are invoked at
./rc3.d:
./rc3.d: boot time by
./rc4.d:
/etc/rc.d/rc
./rc4.d:
./rc5.d:
./rc5.d:
./rc6.d: Scripts starting with K are
./rc6.d:
invoked synchronously by
./rc7.d:
./rc7.d: shutdown with one argument:
./rc8.d: 'stop'. They are also called on
./rc8.d:
start-up prior to invoking the start
./rc9.d:
./rc9.d:
scripts.

© Copyright IBM Corporation 2009


System resource controller
IBM Power Systems

• Provides a single interface to control subsystems


• Controls individual subsystems or groups of subsystems
# ps -ef |grep src
# ps -ef |grep src SRC
UID
UID
PID
PID
PPID
PPID
C
C
STIME
STIME
TTY TIME CMD
TTY TIME CMD Master
root 172178
root 172178
1
1
0
0
18 Sep
18 Sep
-
-
0:00 /usr/sbin/srcmstr
0:00 /usr/sbin/srcmstr process
# ps -T 172178
# ps -T 172178
PID TTY TIME CMD Parent
PID TTY TIME CMD
172178
172178
-
-
0:00 srcmstr
0:00 srcmstr
PID = init
151672 - 0:01 |\--syslogd
151672 - 0:01 |\--syslogd
163968 - 0:00 |\--inetd
163968 - 0:00 |\--inetd
303160
303160
-
-
0:00
0:00
|
|
\--rlogind
\--rlogind Subsystem
512170 pts/0 0:00 | \--ksh
512170 pts/0 0:00 | \--ksh
463024 pts/0 0:00 | \--ps
463024 pts/0 0:00 | \--ps
168088 - 0:00 |\--portmap
168088 - 0:00 |\--portmap
180418 - 0:00 |\--IBM.ServiceRMd
180418 - 0:00 |\--IBM.ServiceRMd
188650
188650
-
-
1:24
1:24
|\--rmcd
|\--rmcd Subserver
200856 - 3:47 |\--clstrmgr
200856 - 3:47 |\--clstrmgr
204904 - 0:00 |\--tftpd
204904 - 0:00 |\--tftpd
176288 - 0:00 | \--tftpd
176288 - 0:00 | \--tftpd
213102 - 0:00 |\--sshd
213102 - 0:00 |\--sshd
221334 - 0:00 |\--snmpdv3ne
221334 - 0:00 |\--snmpdv3ne
254124 - 0:00 |\--IBM.DRMd
254124 - 0:00 |\--IBM.DRMd
262276 - 0:59 |\--IBM.CSMAgentRMd
262276 - 0:59 |\--IBM.CSMAgentRMd
417800 - 0:00 \--ctcasd
417800 - 0:00 \--ctcasd

© Copyright IBM Corporation 2009


Listing subsystems
IBM Power Systems

• The lssrc command is used to list subsystems


# lssrc -a
# lssrc -a
Subsystem Group PID Status
Subsystem Group PID Status
syslogd ras 151672 active
syslogd ras 151672 active
portmap portmap 168088 active
portmap portmap 168088 active
inetd tcpip 163968 active
inetd tcpip 163968 active
tftpd tcpip 204904 active
tftpd tcpip 204904 active
sshd ssh 213102 active
sshd ssh 213102 active
ctrmc rsct 188650 active
ctrmc rsct 188650 active
snmpd tcpip 221334 active
snmpd tcpip 221334 active
clcomdES clcomdES 225414 active
clcomdES clcomdES 225414 active
clstrmgrES cluster 200856 active
clstrmgrES cluster 200856 active
ctcas rsct 417800 active
ctcas rsct 417800 active
qdaemon spooler inoperative
qdaemon spooler inoperative
writesrv spooler inoperative
writesrv spooler inoperative
lpd spooler inoperative
lpd spooler inoperative
…. Removed for clarity …..
…. Removed for clarity …..
# lssrc –g tcpip |grep active
# lssrc –g tcpip |grep active
Subsystem Group PID Status
Subsystem Group PID Status
inetd tcpip 163968 active
inetd tcpip 163968 active
tftpd tcpip 204904 active
tftpd tcpip 204904 active
snmpd tcpip 221334 active
snmpd tcpip 221334 active

© Copyright IBM Corporation 2009


SRC Control
IBM Power Systems

• Controlling subsystems

## stopsrc
stopsrc -s
-s inetd
inetd
0513-044
0513-044 The /usr/sbin/inetd
The /usr/sbin/inetd Subsystem
Subsystem was
was requested
requested to
to stop.
stop.
## startsrc
startsrc -s
-s inetd
inetd
0513-059
0513-059 The inetd
The inetd Subsystem
Subsystem has
has been
been started.
started. Subsystem
Subsystem PID
PID is
is
311374.
311374.
## refresh
refresh -s
-s inetd
inetd
0513-095
0513-095 The request
The request for
for subsystem
subsystem refresh
refresh was
was completed
completed
successfully.
successfully.
Not all
subsystems
support being
refreshed.

## refresh
refresh -s
-s sshd
sshd
0513-005
0513-005 The Subsystem,
The Subsystem, sshd,
sshd, only
only supports
supports signal
signal communication.
communication.

© Copyright IBM Corporation 2009


AIX partition shutdown (1 of 2)
IBM Power Systems

• The shutdown command, by default


– Gracefully stops all activity on the system
– Warns users of an impending shutdown
Do a fast shutdown,
## shutdown
shutdown -Fr
-Fr bypassing the
messages to users,
SHUTDOWN
SHUTDOWN PROGRAM
PROGRAM and reboot the system.
Thu
Thu 99 Oct
Oct 20:15:49
20:15:49 2008
2008
0513-044
0513-044 The sshd
The sshd Subsystem
Subsystem was
was requested
requested to
to stop.
stop.
Wait
Wait for
for 'Rebooting...'
'Rebooting...' before
before stopping.
stopping.
Oct
Oct 99 2008
2008 20:15:50
20:15:50 /usr/es/sbin/cluster/utilities/clstop:
/usr/es/sbin/cluster/utilities/clstop: called
called with
with
flags -f -y -s -N
flags -f -y -s -N -S -S
0513-004
0513-004 The
The Subsystem
Subsystem or
or Group,
Group, clinfoES,
clinfoES, is
is currently
currently inoperative.
inoperative.
Error logging stopped...
Error logging stopped...
Advanced
Advanced Accounting
Accounting has
has stopped...
stopped...
Process accounting stopped...
Process accounting stopped...
Stopping
Stopping NFS/NIS
NFS/NIS Daemons
Daemons
Connection
Connection closed.
closed.

© Copyright IBM Corporation 2009


AIX partition shutdown (2 of 2)
IBM Power Systems

• AIX shutdown can also be initiated from the HMC.


# ssh hscroot@<hmc> chsysstate -o osshutdown

Do a fast
shutdown,
shutdown -F

© Copyright IBM Corporation 2009


Managed system shutdown
IBM Power Systems

• Ensure all partitions have been shutdown first!


# ssh hscroot@<hmc> chsysstate -m <ms_name> -r sys -o off

© Copyright IBM Corporation 2009


Unit summary
IBM Power Systems

Having completed this unit, you should be able to:

• Describe the System and AIX startup process


• Activate the System and AIX partitions
• Understand the AIX startup modes
• Describe the contents of the /etc/inittab file
• Understand the role of the System Resource Controller
and how to manage subsystems
• Explain how to shut down the system and AIX partitions

© Copyright IBM Corporation 2009

You might also like