JavaScript is required to for searching.
Skip Navigation Links
Exit Print View
Booting and Shutting Down Oracle Solaris on x86 Platforms     Oracle Solaris 11 Information Library
search filter icon
search icon

Document Information

About This Book

1.  Booting and Shutting Down an x86 Based System (Overview)

2.  Booting an x86 Based System to a Specified State (Tasks)

3.  Shutting Down a System (Tasks)

4.  Rebooting an x86 Based System (Tasks)

5.  Booting an x86 Based System From the Network (Tasks)

6.  Modifying Boot Parameters on an x86 Based System (Tasks)

7.  Creating, Administering, and Booting From ZFS Boot Environments on x86 Platforms (Tasks)

8.  Keeping an x86 Based System Bootable (Tasks)

9.  Troubleshooting Booting an x86 Based System (Tasks)

Troubleshooting Booting an x86 Based System (Task Map)

Shutting Down and Booting an x86 Based System for Recovery Purposes

Stopping and Booting a System for Recovery Purposes

How to Stop a System for Recovery Purposes

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

How to Boot From Media to Resolve an Unknown root Password

How to Boot From Media to Resolve a Problem With the menu.lst File That Prevents the System From Booting

Forcing a Crash Dump and Reboot of the System

How to Force a Crash Dump and Reboot of the System

How to Boot a System With the Kernel Debugger Enabled (kmdb)

Troubleshooting Issues With Fast Reboot on the x86 Platform

Debugging Early Panics That Might Occur

Troubleshooting Conditions That Might Prevent Fast Reboot From Working on x86 Platforms

Index

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.

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:

How to Stop a System for Recovery Purposes

  1. 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.

  2. 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

  1. Stop the system.
    # init 0
  2. Reboot the system.
    # reboot
  3. When the GRUB menu is displayed, do the following:
    1. Select the appropriate boot entry, then type e to edit that entry.
    2. 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.

    3. Type -s at the end of the $kernel line, then press Return to save your changes and return to the previous screen.
    4. Type b to boot the system in single-user mode.
  4. Correct the shell entry in the /etc/passwd file.
    # vi /etc/password
  5. Press control-d to reboot the system.

How to Boot From Media to Resolve an Unknown root Password

Use the following procedure if you need to boot the system to correct a problem an unknown root password or similar problem. Note that this procedure requires you to mount the boot environment after importing the root pool. If you need to recover a root pool or root pool snapshot, see How to Replace a Disk in a ZFS Root Pool in Oracle Solaris Administration: ZFS File Systems.

  1. Boot from the Oracle Solaris media.
    • 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.

      For example:

      1  Install Oracle Solaris
              2  Install Additional Drivers
              3  Shell
              4  Terminal type (currently xterm)
              5  Reboot
      
      Please enter a number [1]: 3
      To return to the main menu, exit the shell
  2. Import the root pool.
    zpool import -f rpool
  3. Create a mount point for the boot environment.
    # mkdir /a
  4. Mount the boot environment on /a
    # beadm mount solaris-instance|bename /a

    For example:

    # beadm mount solaris-2 /a
  5. If a password or shadow entry is preventing a console login, correct the problem.
    1. Set the TERM type.
      # TERM=vt100
      # export TERM
    2. Edit the shadow file.
      # cd /a/etc
      # vi shadow
      # cd /
  6. Update the boot archive.
    # bootadm update-archive /R /a
  7. Unmount the boot environment.
    # beadm umount be-name
  8. Halt the system.
    # halt
  9. Reboot the system in single-user mode, as described in How to Boot in Single-User Mode to Resolve a Bad root Shell or Password Problem, and when prompted for the root password, press Return.
  10. Reset the root password.
    root@system:~# passwd -r files root
    New Password: xxxxxx
    Re-enter new Password: xxxxxx
    passwd: password successfully changed for root
  11. Press control-d to reboot the system.

How to Boot From Media to Resolve a Problem With the menu.lst File That Prevents the System From Booting

Use the following procedure if you need to boot the system to correct a problem with the default menu.lst file. Note that this procedure does not require you to mount the boot environment. If you need to recover a root pool or root pool snapshot, see How to Replace a Disk in a ZFS Root Pool in Oracle Solaris Administration: ZFS File Systems.

  1. Boot from the Oracle Solaris media.
    • 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.

      For example:

      1  Install Oracle Solaris
              2  Install Additional Drivers
              3  Shell
              4  Terminal type (currently xterm)
              5  Reboot
      
      Please enter a number [1]: 3
      To return to the main menu, exit the shell
  2. Import the root pool.
    zpool import -f rpool
  3. Examine the entries in the menu.lst file and make corrections as needed.
    # cd /rpool/boot/grub
    # vi menu.lst
  4. Update the boot archive.
    # bootadm update-archive -R /a
  5. Exit the shell and reboot the system.
    exit
            1  Install Oracle Solaris
            2  Install Additional Drivers
            3  Shell
            4  Terminal type (currently sun-color)
            5  Reboot
    
    Please enter a number [1]: 5

Forcing a Crash Dump and Reboot of the System

Forcing a crash dump and reboot of the system are sometimes necessary for troubleshooting purposes. The savecore feature is enabled by default.

For more information about system crash dumps, see Managing System Crash Dump Information in Oracle Solaris Administration: Common Tasks.

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.


  1. 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.

  2. To force a crash, use the systemdump macro.
    [0]> $<systemdump

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

  3. 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.

# halt -d
4ay 30 15:35:15 wacked.<domain>.COM halt: halted by user

panic[cpu0]/thread=ffffffff83246ec0: forced crash dump initiated at user request

fffffe80006bbd60 genunix:kadmin+4c1 ()
fffffe80006bbec0 genunix:uadmin+93 ()
fffffe80006bbf10 unix:sys_syscall32+101 ()

syncing file systems... done
dumping to /dev/dsk/c1t0d0s1, offset 107675648, content: kernel
NOTICE: adpu320: bus reset
100% done: 38438 pages dumped, compression ratio 4.29, dump succeeded

Welcome to kmdb
Loaded modules: [ audiosup crypto ufs unix krtld s1394 sppp nca uhci lofs 
genunix ip usba specfs nfs md random sctp ]
[0]> 
kmdb: Do you really want to reboot? (y/n) y

How to Boot a System With the Kernel Debugger Enabled (kmdb)

This procedure shows the basics for loading the kernel debugger (kmdb). The savecore feature is enabled by default.

  1. Boot the system.

    The GRUB menu is displayed when the system is booted.

  2. When the GRUB menu is displayed, type e to access the GRUB edit menu.
  3. Use the arrow keys to 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.

  4. Type e to edit the line.

    The boot entry menu is displayed. In this menu, you can modify boot behavior by adding additional boot arguments to the end of the kernel$ line.

  5. In the GRUB edit menu, type -kmdb or -k at the end of the kernel$ line.
    grub edit> kernel$ /platform/i86pc/kernel/$ISADIR/unix -B $ZFS-BOOTFS -s -k
  6. Press enter to go back one screen, then type b to boot the system with the kernel debugger enabled.

    Typing -kmdb or -k loads the debugger, then directly boots the operating system.

  7. 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 that is appropriate for that type of serial console.

    To access the kernel debugger before the system fully boots, use the -kd option.

    Using the -kd option loads the debugger and then gives you an opportunity to interact with the debugger before booting the operating system.

    A welcome message is displayed when you access the kernel debugger for the first time.

See Also

For more detailed information about interacting with the system by using kmdb and the execution control facilities that are provided by kmdb, see the kmdb(1) man page.