Shutting Down and Booting an x86 Based System for Recovery Purposes

In the following instances, you must first shut down a system to
analyze or troubleshoot booting and other system problems.

Troubleshoot error messages when the system boots.

Stop the system to attempt recovery.

Boot a system for recovery purposes.

Force a crash dump and reboot of the system.

Boot the system with the kernel debugger by using the kmdb command.

The procedures that follow describe how to safely shut down and then boot
an x86 based system for recovery purposes.

Stopping and Booting a System for Recovery Purposes

You might need to boot the system for recovery purposes.

The following are some of the more common error and recovery scenarios:

Boot a system in single-user mode to resolve a minor problem, such as correcting the root shell entry in the /etc/passwd file or changing a NIS server.

Boot from the installation media or from an install server on the network to recover from a problem that is preventing the system from booting or to recover from a lost root password. This method requires you to mount the boot environment after importing the root pool.

Resolve a boot configuration problem by importing the root pool. If a problem with the menu.lst file exists, you do not have to mount the boot environment, just import the root pool, which automatically mounts the rpool file system that contains the boot-related components.

How to Stop a System for Recovery Purposes

Stop the system.

First, become the root role, then type init 0 if the keyboard and mouse are functional.

If the Press any key to reboot prompt is displayed, press any key to reboot the system.

To reboot the system, type init 6.

If the system does not respond to any input from the mouse, do
one of the following:

Press the Reset key to reboot the system.

Use the power switch to reboot the system.

How to Boot in Single-User Mode to Resolve a Bad root Shell or Password Problem

Stop the system.

# init 0

Reboot the system.

# reboot

When the GRUB menu is displayed, do the following:

Select the appropriate boot entry, then type e to edit that entry.

Using the arrow keys, select the kernel$ line.

If you cannot use the arrow keys, use the caret (^) key to
scroll up and the letter v key to scroll down.

Type -s at the end of the $kernel line, then press Return to
save your changes and return to the previous screen.

Live Media – Boot from the installation media and use a GNOME terminal
for the recovery procedure.

Text installation – From the GRUB menu, select the Text Installer and command line boot entry,
then select the option 3 Shell from the text installation screen.

Automated installation – Booting from an install server on the network requires a
PXE boot. Select the Text Installer and command line entry from the GRUB menu. Then, select
the option 3 Shell from the text installation screen.

Live Media – Boot from the installation media and use a GNOME terminal
for the recovery procedure.

Text installation – From the GRUB menu, select the Text Installer and command line boot entry,
then select the option 3 Shell from the text installation screen.

Automated installation – Booting from an install server on the network requires a
PXE boot. Select the Text Installer and command line entry from the GRUB menu. Then, select
the option 3 Shell from the text installation screen.

How to Force a Crash Dump and Reboot of the System

If you cannot use the reboot-d or the halt-d command, you
can use the kernel debugger, kmdb, to force a crash dump. The kernel
debugger must have been loaded, either at boot time or with the mdb-k command for the following procedure to work.

Note - You must be in text mode to access the kernel debugger (kmdb).
So, first exit any window system.

Access the kernel debugger.

The method used to access the debugger is dependent upon the type
of console that you are using to access the system.

If you are using a locally attached keyboard, press F1–A.

If you are using a serial console, send a break by using the method appropriate to that type of serial console.

The kmdb prompt is displayed.

To force a crash, use the systemdump macro.

[0]> $<systemdump

Panic messages are displayed, the crash dump is saved, and the system reboots.

Verify that the system has rebooted by logging in at the console login
prompt.

Example 9-1 x86: Forcing a Crash Dump and Reboot of the System by Using halt-d

This example shows how to force a crash dump and reboot of
the x86 based system by using the halt-d and boot commands.