IBM Support

Capturing Boot Debug on Serial Console

Question & Answer


Question

Capturing Boot Debug in one of these circumstances: * System has no HMC * System is running AIX 5.2 or earlier version

Answer

This document can be used to assist in capturing boot debug information which may help determine why a system is hanging during IPL. These steps are also valid for higher AIX versions for systems without an HMC.

In a non-HMC environment:
Setting up the software

  Booting into maintenance mode
  Determining boot disc
  Enabling the debug boot image
    AIX 5L
  Preparing the system for shutdown
Setting up the hardware
  Hardware requirements for interfacing your AIX box with a client
Setting up the interfacing system
  Hardware requirements for interfacing your PC system with a client
  Setting up HyperTerminal with client
Capturing the debug information
Stopping the KDB after debug is obtained


Non-HMC environment

Setting up the software

Booting into maintenance mode

  1. Boot into maintenance mode using the system AIX OS cdrom, a mksysb on tape or CD, or a NIM SPOT..
  2. At the installation screen select 3, Maintainence mode for system recovery.
  3. Select 1, Access a root volume group.
  4. Select 0 to continue.
  5. Select the drive(s) associated with rootvg.
  6. Select to access the volume group and start a shell.

Determining your boot disc.

Use the lslv command to determine boot disc run.
lslv -m hd5
NOTE: PV1 is your boot hdisk#.

Enabling the debug boot image

  • Use the bosboot command. Enter:
  •      bosboot -I -ad /dev/hdisk#
    

Preparing the system for shutdown

Use the bootlist command to boot into hdisk# on reboot. Enter:
bootlist -m normal hdisk#

Setting up the hardware

During installation with debug mode enabled, debug output is sent to the S1 serial port of the machine. This output can then be captured to a tty or other serial connection. The preferred method for capturing debug mode output is to have another system near to the client machine that can interface with it via an rs232 serial connection.

Hardware requirements for interfacing your AIX box with a client

  • Two RS232 serial cables
  • One gender changer
  • One interposer (null modem)
Connect the hardware as shown in the schematic below:
[S1]--[X]----[R]----[I][G]----[R]----[X]--[Sx]
Note:
S1 = first serial port on the machine being installed
Sx = any serial port on the connecting AIX box
X = any extra cables needed to connect the DB25-RS232 cable to the serial port
R = DB25-RS232 cable
I = interposer
G = gender changer (female) to get the right connection to Sx


Setting up the interfacing system

  1. Use the lslpp command to determine if bos.net.uucp is installed. Enter:
    lslpp -l bos.net.uucp
    
    Note: If not If you do not have this installed, you must install it from the AIX base installation media.
  2. Set up the Sx port and create a tty on the port. To create the tty, enter:
    1. smitty tty
    2. Select Add a TTY
    3. Select tty rs232 Asynchronous Terminal
    4. Select Sx serial port
    5. Select the port number
    Note: Defaults
  3. Create an uucp entry for created tty by editting the file /etc/uucp/Devices with your preferred text editor. Add the following:
    Direct tty0 - 9600 direct
    
  4. Run the cu command piped to the tee command to capture the debug output. Enter:
    cu -ml tty0 | tee /tmp/boot.debuglog 
    
  5. Disconnect from the client and stop logging by doing the following:
    1. ~.
    2. exit

Hardware requirements for interfacing a PC with your client

The following hardware is needed:
  • Two RS232 serial cables
  • One gender changer
  • One interposer (null modem)
Connect the hardware as shown in the schematic below:
[S1]--[X]----[R]----[I][G]----[R]----[X]--[Sx]
Note:
S1 = first serial port on the machine being installed
Sx = any serial port on the connecting PC
X = any extra cables needed to connect the DB25-RS232 cable to the serial port
R = DB25-RS232 cable
I = interposer
G = gender changer (female) to get the right connection to Sx

Setting up HyperTerminal with client

Start up a HyperTerminal from your PC by doing the following:
  1. Start Menu
  2. Programs
  3. Accessories
  4. Communications
  5. HyperTerminal
  6. Name the session test then click Ok.
  7. Under Connect using, select COM 1.
  8. Enter the following Port Settings:
    Bits per second   9600
  9. Data bits 8 Parity None Stop Bits 1 Flow control Hardware Click Ok when done. Note: If your client system has tty0 configured properly to the S1 port, you should see a login prompt in the hyperterminal screen.
  10. Capturing the debug data from the HyperTerminal
    1. Click on Transfer drop-down menu in the HyperTerminal toolbar.
    2. Select Capture text.
    3. Enter a file name when prompted then click on Start

Capturing the debug information

  1. Reboot your AIX box to begin data capture. Enter:
    sync
    sync
    reboot
    
  2. Output should be displayed on your data capture system.
  3. A debugger prompt(KDB>) should be displayed. Enter the following:
    KDB(0)> mw enter_dbg
    enter_dbg+000000: 00000000 = 42
    enter_dbg+000004: 00000000 = .
    KDB(0)> g
    Note: The debug is captured in the file /tmp/boot.debuglog on the AIX system or in the file name you specified in the hyperterminal session.

Stopping the KDB after debug is obtained

Debug output is obtained when system hangs. If machine boots normal, the KDB debugger can be stopped by doing the following,

  1. Hit CTRL \
  2. Enter the following sequence:
    1. mw enter_dbg
    2. 0
    3. .
Note: Running the KDB causes a decrease in performance, it is recommended that the boot image be rebuilt and system rebooted. To prevent KDB from running on next boot up, enter:
bosboot -ad /dev/hdisk#

[{"Product":{"code":"SWG10","label":"AIX"},"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Component":"Installation- backup- restore","Platform":[{"code":"PF002","label":"AIX"}],"Version":"Version Independent","Edition":"","Line of Business":{"code":"LOB08","label":"Cognitive Systems"}},{"Product":{"code":"SWG10","label":"AIX"},"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Component":"Miscellaneous","Platform":[{"code":"","label":""}],"Version":"","Edition":"","Line of Business":{"code":"LOB08","label":"Cognitive Systems"}}]

Historical Number

isg1pTechnote1393

Document Information

Modified date:
17 June 2018

UID

isg3T1000628