System Administration Guide: Basic Administration

Procedurex86: How to Boot a System With the Kernel Debugger in the GRUB Boot Environment (kmdb)

This procedure shows the basics for loading the kernel debugger (kmdb). The savecore feature is enabled by default. For more detailed information about using the kernel debugger, see the Solaris Modular Debugger Guide.

  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 ^ key to scroll up and the v key to scroll down.

  4. Type e to edit the line.

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

  5. Type -k at the end of the line.

  6. Press enter to return to the GRUB main menu.

  7. Type b to boot the system with the kernel debugger enabled.

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

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


Example 13–7 x86: Booting a System With the Kernel Debugger (Hypervisor Support)

This example shows how to boot a 64-bit capable x86 based system, with the kernel debugger enabled:


kernel$ /boot/$ISADIR/xen.gz
module$ /platform/i86xpv/kernel/$ISADIR/unix /platform/i86xpv/kernel/$ISADIR/unix -B $ZFS-BOOTFS -k

This example shows how to boot a 64-bit capable x86 based system in 32-bit mode, with the kernel debugger enabled:


kernel$ /boot/xen.gz
module$ /platform/i86xpv/kernel/unix /platform/i86xpv/kernel/unix -B $ZFS-BOOTFS -k


Example 13–8 x86: Booting a System With the Kernel Debugger (Support for Directly Loading and Booting the unix Kernel)

The following examples apply to a Solaris release with GRUB support for directly loading and booting the unix kernel.

This example shows how to boot a 64-bit capable x86 based system, with the kernel debugger enabled.


kernel$ /platform/i86pc/kernel/$ISADIR/unix -B $ZFS-BOOTFS -k

This example shows how to boot a 64-bit capable x86 based system in 32-bit mode, with the kernel debugger enabled.


kernel$ /platform/i86pc/kernel/unix -B $ZFS-BOOTFS -k


Example 13–9 x86: Booting a System With the Kernel Debugger (GRUB Multiboot Implementation)

This example shows how to manually boot a 64-bit capable x86 based system with the kernel debugger enabled.


kernel$ /platform/i86pc/multiboot kernel/amd64/unix -k -B $ZFS-BOOTFS

This example shows how to boot a 64-bit capable x86 based system 32-bit mode with the kernel debugger enabled.


kernel$ /platform/i86pc/multiboot kernel/unix -k -B $ZFS-BOOTFS