IBM Support

Booting AIX in Single-User Mode

Question & Answer


Question

How do I boot AIX to Single-User Mode in order to perform maintenance?

Answer

In AIX we don't tend to use single-user mode very much, because many problems require having the rootvg filesystems unmounted for repairs. However, there are some instances when it's beneficial to use single-user:

  • The system boot hangs due to TCP/IP or NFS configuration issues
  • Do do work on non-root volume groups
  • To debug problems with entries in /etc/inittab
  • To work on the system without users attempting to log in
  • To work without applications starting up
  • It is easy to unmount /tmp and /var if they need to be checked with fsck or recreated

If the system boots fine from the rootvg, then booting into single-user to repair or perform work has advantages:
  • It boots quicker than Maintenance Mode.
  • You can boot off the normal system rootvg without finding AIX Install media or setting up a NIM SPOT.
  • It allows you to run all commands you would normally have access to in multiuser.
  • Unlike maintenance mode, there is no possibility that hdisks will be renamed.

PROCEDURE:

Standalone System (no HMC):
1. Boot system with no media in the CD/DVD drive
2. Wait until you see the options of choosing another boot list, and hear beeps on the console
3. Press 6 to start diagnostics

System using an HMC:
1. Select the LPAR in the HMC GUI
2. Select Operations -> Activate
3. In the Activate window, click the button that says "Advanced"
4. Change "Boot mode" to "Diagnostic with stored boot list"
5. Click "OK" to save that change, then "OK" again to activate.

After either of these you'll see this screen:

IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM
IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM

1 = SMS Menu 5 = Default Boot List
8 = Open Firmware Prompt 6 = Stored Boot List


Memory Keyboard Network SCSI Speaker

You will see the normal AIX boot header, since you are booting from your system hard disk:
-------------------------------------------------------------------------------
                                Welcome to AIX.
                       boot image timestamp: 08:55 07/25
                 The current time and date: 10:01:01 07/25/2009
               number of processors: 1    size of memory: 512MB
          boot device: /vdevice/v-scsi@30000003/disk@8700000000000000
                     kernel size: 15004862; 64 bit kernel
-------------------------------------------------------------------------------

DIAGNOSTIC OPERATING INSTRUCTIONS

At this point the diagnostic license information comes up. At the end it says:

Several keys are used to control the diagnostics:
- The Enter key continues the procedure or performs an action.
- The Backspace key allows keying errors to be corrected.
- The cursor keys are used to select an option.

To continue, press Enter.

The next screen will show you Diagnostic Functions you can perform.
On newer versions of firmware you will see Option 5 to start Single User Mode.

On older firmware you will have to go to:
3. Task selection
and scroll way down and select 'Start Shell' or 'Single User Mode'

FUNCTION SELECTION

1. Diagnostic Routines
    This selection will test the machine hardware. Wrap plugs and
    other advanced functions will not be used.
2. Advanced Diagnostic Routines
    This selection will test the machine hardware. Wrap plugs and
    other advanced functions will be used.
3. Task Selection(Diagnostics, Advanced Diagnostics, Service Aids, etc.)
    This selection will list the tasks supported by these procedures.
    Once a task is selected, a resource menu may be presented showing
    all resources supported by the task.
4. Resource Selection
    This selection will list the resources in the system that are supported
    by the diagnostic programs. Once a resource is selected, a task menu will
    be presented showing all tasks that can be run on the resource(s).
5. Single User Mode
    The system will enter single-user mode for software maintenance.

To make a selection, type the number and press Enter [1]: 5


The system will now continue the boot process.  Please wait...
Saving Base Customize Data to boot disk
Starting the sync daemon
Starting the error daemon
System initialization completed.

INIT: SINGLE-USER MODE
Password:

Give the root password at the "Password" prompt.

After getting logged in you will see a minimal rootvg mounted:
# df
Filesystem    512-blocks      Free %Used    Iused %Iused Mounted on
/dev/hd4          131072     70696   47%     2127    21% /
/dev/hd2         2129920    102104   96%    33435    71% /usr
/dev/hd9var       196608    136080   31%      431     3% /var
/dev/hd3           98304     74904   24%      148     2% /tmp

And not very many processes running:

# ps -ef
     UID    PID   PPID   C    STIME    TTY  TIME CMD
    root      1      0   0 09:49:40      -  0:00 /etc/init s
    root 151630      1   0 09:49:51   vty0  0:00 -ksh
    root 168040      1   0 09:49:48      -  0:00 /usr/sbin/syncd 60
    root 172160 151630   2 09:51:58   vty0  0:00 ps -ef
    root 176222      1   0 09:49:51      -  0:00 /usr/lib/errdemon

RUNNING 64-BIT COMMANDS
Some commands such as fsck may give you an error that 64-bit applications have not been enabled.
This is because this is enabled from inittab:
# grep 64 /etc/inittab
load64bit:2:wait:/etc/methods/cfg64 >/dev/console 2>&1 # Enable 64-bit execs

so run it by hand:
# /etc/methods/cfg64


EXITING SINGLE-USER MODE
To exit single-user mode and boot into multiuser in RunLevel 2 use:

# telinit 2

INIT: New run level: 2
Setting tunable parameters...complete
Starting Multi-user Initialization
 Performing auto-varyon of Volume Groups
 Activating all paging spaces
swapon: Paging device /dev/paging00 is already active.
swapon: Paging device /dev/hd6 activated.

The current volume is: /dev/hd10opt
Primary superblock is valid.
 Performing all automatic mounts
mount: /dev/hd4 on /: Device busy
Multi-user initialization completed
Checking for srcmstr active...complete
Starting tcpip daemons:
0513-059 The syslogd Subsystem has been started. Subsystem PID is 139390.
Jul 25 09:53:21 puma syslog:err|error syslogd: /tmp/syslog.debug: errno = 2
0513-059 The sendmail Subsystem has been started. Subsystem PID is 217218.
0513-059 The portmap Subsystem has been started. Subsystem PID is 94364.
0513-059 The inetd Subsystem has been started. Subsystem PID is 233600.
0513-059 The xntpd Subsystem has been started. Subsystem PID is 254104.
0513-059 The snmpd Subsystem has been started. Subsystem PID is 241836.
0513-059 The hostmibd Subsystem has been started. Subsystem PID is 237710.
0513-059 The snmpmibd Subsystem has been started. Subsystem PID is 180328.
0513-059 The aixmibd Subsystem has been started. Subsystem PID is 262282.
Finished starting tcpip daemons.
0513-059 The muxatmd Subsystem has been started. Subsystem PID is 127156.
Starting NFS services:
0513-059 The biod Subsystem has been started. Subsystem PID is 229540.
0513-059 The rpc.statd Subsystem has been started. Subsystem PID is 286868.
0513-059 The rpc.lockd Subsystem has been started. Subsystem PID is 299180.
Completed NFS services.
0513-059 The ctrmc Subsystem has been started. Subsystem PID is 290968.

Unauthorized use of this system is prohibited.
login:

[{"Product":{"code":"SWG10","label":"AIX"},"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Component":"Not Applicable","Platform":[{"code":"PF002","label":"AIX"}],"Version":"5.3;6.1;7.1","Edition":"","Line of Business":{"code":"LOB08","label":"Cognitive Systems"}}]

Document Information

Modified date:
17 June 2018

UID

isg3T1011796