This section includes new information for performing a GRUB based disk boot and a GRUB based network boot on an x86 based system. Also included are instructions for configuring DHCP to perform GRUB based network boots and how to modify the Solaris boot behavior.
GRUB based booting is not available on SPARC based systems in this Solaris release.
Some of the procedures in this section indicate to use the Reset button to restart the system. If your system does not have a Reset button, use the power switch to restart the system. You might be able to press Ctrl-Alt-Del to interrupt system operation, depending upon the state of the system.
How to Boot a System to Run Level 3 (Multiuser Level)
Use this procedure to boot a system that is currently at run level 0 to run level 3.
If the system displays the Press any key to
reboot
prompt, press any key to reboot the system.
You can also use the Reset button at this prompt. If the system is shut down, turn the system on with the power switch.
When the boot sequence begins, the GRUB menu is displayed.
To boot the system to run level 3, press Enter to boot the default OS instance.
If you do not choose an entry within 10 seconds, the system automatically boots to run level 3.
Verify that the system has booted to run level 3.
# who -r
The login prompt is displayed when the boot process has finished successfully.
hostname
console login:
Example 11.1. Booting a System to Run Level 3 (Multiuser Level) in the Solaris OS
For new installations of the Solaris OS, the system automatically boots
a 64-bit kernel if the system is 64-bit capable. For upgrade installations,
the system boots a 64-bit kernel, if the system is 64-bit capable. However,
the system does not boot a 64-bit kernel if the boot-file
parameter
was previously set to a value other than kernel/unix
with
the eeprom command.
This example shows how to boot an x86 based system that has 64-bit computing capabilities to run level 3.
Press any key to reboot. Resetting... GNU GRUB version 0.95 (631K lower / 2095488K upper memory) +-------------------------------------------------------------------------+ | Solaris 10.1 ... X86 | | Solaris failsafe | | | | | | | +-------------------------------------------------------------------------+ Use the ^ and v keys to select which entry is highlighted. Press enter to boot the selected OS, 'e' to edit the commands before booting, or 'c' for a command-line. The highlighted entry will be booted automatically in 10 seconds Booting 'Solaris 10.1 ... X86' root (hd0,2,a) Filesystem type is ufs, partition type 0x000000bf kernel /platform/i86pc/multiboot [Multiboot-elf, <0x1000000:0x13f3b:0x3941d>, shtab=0x104e258, entry=0x1000000] module /platform/i86pc/boot_archive SunOS Release 5.10.1 Version ... 64-bit Copyright 1983-2005 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms. Hostname: swoozie.Central.Sun.COM NIS domain name is boulder.Central.Sun.COM checking ufs filesystems /dev/rdsk/c1d0s7: is logging. swoozie.Central.Sun.COM console login:
How to Boot a System to Run Level S (Single-User Level)
Use this procedure to boot a system that is at run level 0 to run level S. Single-user level is used for performing system maintenance.
If the system displays the Press any key to
reboot
prompt, press any key to reboot the system.
You can also use the Reset button at this prompt. If the system is shut down, turn the system on with the power switch.
When the boot sequence begins, the GRUB menu is displayed.
To boot the system to run level S, type e when the GRUB main menu is displayed.
Use the arrow keys to choose the kernel /platform/i86pc/multiboot boot entry.
If you cannot use the arrow keys, use the ^
key
to scroll up and the v
key to scroll down.
Type e to edit the kernel /platform/i86pc/multiboot boot entry.
The GRUB edit menu is displayed, enabling you to add options and arguments to the kernel command.
grub edit> kernel /platform/i86pc/multiboot
Type
s
at the end of the kernel /platform/i86pc/multiboot line. Then, press Enter.
grub edit> kernel /platform/i86pc/multiboot -s
After you press Enter, you are returned to the GRUB main menu.
To boot the system to the single-user level, type b.
The system boots to the single-user level.
Type the superuser password, if prompted.
Verify that the system is at run level S.
# who -r
Perform the system maintenance task that required the run level change to S.
After you complete the system maintenance task, type Control-D to bring the system to the multiuser state.
Example 11.2. Booting a System to Run Level S (Single-User Level)
Press any key to reboot. Resetting... GNU GRUB version 0.95 (631K lower / 2095488K upper memory) +-------------------------------------------------------------------------+ | Solaris 10.1 ... X86 | | Solaris failsafe | | | +-------------------------------------------------------------------------+ Use the ^ and v keys to select which entry is highlighted. Press enter to boot the selected OS, 'e' to edit the commands before booting, or 'c' for a command-line. <Type e to edit Solaris entry> GNU GRUB version 0.95 (631K lower / 2095488K upper memory) +-------------------------------------------------------------------------+ | root (hd0,2,a) | | kernel /platform/i86pc/multiboot | | module /platform/i86pc/boot_archive | | | | | | | +-------------------------------------------------------------------------+ Use the ^ and v keys to select which entry is highlighted. Press 'b' to boot, 'e' to edit the selected command in the boot sequence, 'c' for a command-line, 'o' to open a new line after ('O' for before) the selected line, 'd' to remove the selected line, or escape to go back to the main menu. <Type e to edit the line> grub edit> kernel /platform/i86pc/multiboot-s
Press Enter
GNU GRUB version 0.95 (631K lower / 2095488K upper memory) +-------------------------------------------------------------------------+ | root (hd0,2,a) | | kernel /platform/i86pc/multiboot -s | | module /platform/i86pc/boot_archive | | | | | +-------------------------------------------------------------------------+ Use the ^ and v keys to select which entry is highlighted. Press 'b' to boot, 'e' to edit the selected command in the boot sequence, 'c' for a command-line, 'o' to open a new line after ('O' for before) the selected line, 'd' to remove the selected line, or escape to go back to the main menu. <Type b to boot system in single-user mode> Booting List command root (hd0,2,a) Filesystem type is ufs, partition type 0x000000bf kernel /platform/i86pc/multiboot -s [Multiboot-elf, <0x1000000:0x13f3b:0x3941d>, shtab=0x104e258, entry=0x100000 0]... SunOS Release 5.10.1 Version ... 64-bit Copyright 1983-2005 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms. Booting to milestone "milestone/single-user:default". . . . Root password for system maintenance (control-d to bypass):xxxxxx
single-user privilege assigned to /dev/console. Entering System Maintenance Mode May 30 12:11:15 su: 'su root' succeeded for root on /dev/console Sun Microsystems Inc. SunOS 5.10.1 ... October 2007. #who -r
. run-level S Jun 10 11:44 S 0 0 #svcs | grep milestone
disabled 11:44:02 svc:/milestone/sysconfig:default disabled 11:44:02 svc:/milestone/name-services:default disabled 11:44:02 svc:/milestone/multi-user:default disabled 11:44:02 svc:/milestone/multi-user-server:default online 11:44:05 svc:/milestone/devices:default online 11:44:10 svc:/milestone/network:default online 11:44:10 svc:/milestone/single-user:default # <Perform some maintenance task> #^D
How to Boot a System Interactively
Use this procedure to boot a system when you need to specify an alternate
kernel or an alternate /etc/system
file.
If the system displays the Press any key to
reboot
prompt, press any key to reboot the system.
You can also use the Reset button at this prompt. If the system is shut down, turn the system on with the power switch.
When the boot sequence begins, the GRUB main menu is displayed.
Type e to access the GRUB edit menu.
Use the arrow keys to select the kernel /platform/i86pc/multiboot line.
Type e to edit the line.
The GRUB edit menu is displayed, enabling you to add options to the kernel command.
grub edit> kernel /platform/i86pc/multiboot
Type
a
at the end of the kernel /platform/i86pc/multiboot line. Then, press Enter.
grub edit> kernel /platform/i86pc/multiboot -a
The GRUB main menu is displayed.
To boot the system interactively, type b.
A series of system prompts are displayed. If you want to accept the default, press Enter.
Provide the name of the default directory for modules.
The
following prompt is displayed: Enter default directory for modules
[/platform/i86pc/kernel /kernel /usr/kernel]:
Provide the name of the kernel to use for booting.
The
following prompt appears: Name of system file
[etc/system]:
When prompted, provide an alternate path for the module directories.
Press Enter to use the default module directories. Otherwise, provide the alternate paths to module directories, press Enter.
When prompted, type the physical name of the root device.
Provide an alternate device name, or press Enter to use the default.
If you are not prompted to answer these questions, modify the
entry by using the
a
option, boot the system interactively
again.
Example 11.3. Booting a System Interactively
In the following example, the default choices (shown in square brackets []
) are accepted.
Press any key to reboot.
Resetting...
Press any key to reboot.
GNU GRUB version 0.95 (631K lower / 2095488K upper memory)
+-------------------------------------------------------------------------+
| Solaris 10.1 ... X86 |
| Solaris failsafe |
| |
| |
| |
+-------------------------------------------------------------------------+
Use the ^ and v keys to select which entry is highlighted.
Press enter to boot the selected OS, 'e' to edit the
commands before booting, or 'c' for a command-line.
The highlighted entry will be booted in 10 seconds.
GNU GRUB version 0.95 (631K lower / 2095488K upper memory)
+-------------------------------------------------------------------------+
| root (hd0,2,a) |
| kernel /platform/i86pc/multiboot |
| module /platform/i86pc/boot_archive |
| |
| |
| |
+-------------------------------------------------------------------------+
Use the ^ and v keys to select which entry is highlighted.
Press 'b' to boot, 'e' to edit the selected command in the
boot sequence, 'c' for a command-line, 'o' to open a new line
after ('O' for before) the selected line, 'd' to remove the
selected line, or escape to go back to the main menu.
grub edit> kernel /platform/i86pc/multiboot -a
GNU GRUB version 0.95 (631K lower / 2095488K upper memory)
+-------------------------------------------------------------------------+
| root (hd0,2,a) |
| kernel /platform/i86pc/multiboot -a |
| module /platform/i86pc/boot_archive |
| |
| |
| |
+-------------------------------------------------------------------------+
Use the ^ and v keys to select which entry is highlighted.
Press 'b' to boot, 'e' to edit the selected command in the
boot sequence, 'c' for a command-line, 'o' to open a new line
after ('O' for before) the selected line, 'd' to remove the
selected line, or escape to go back to the main menu.
Booting command-list
root (hd0,2,a)
Filesystem type is ufs, partition type 0x000000bf
kernel /platform/i86pc/multiboot -a
[Multiboot-elf, <0x1000000:0x13f3b:0x3941d>, shtab=0x104e258, entry=0x100000
0]...
module /platform/i86pc/boot_archive
Enter default directory for modules [/platform/i86pc/kernel /kernel /usr/kernel]
: <Press Enter>
Name of system file [etc/system]:<Press Enter>
SunOS Release 5.10.1 Version ... 64-bit
Copyright 1983-2005 Sun Microsystems, Inc. All rights reserved.
Use is subject to license terms.
Hostname: swoozie.Central.Sun.COM
NIS domain name is boulder.Central.Sun.COM
checking ufs filesystems
/dev/rdsk/c1d0s7: is logging.
swoozie.Central.Sun.COM console login:
How to Set Solaris Boot Parameters by Using the eeprom Command
You can display or set Solaris boot parameters by using the eeprom command. The parameters that you can set with the eeprom command
are found in the /boot/solaris/bootenv.rc
file. Changes
that you make by using the eeprom command persist over
a system reboot. However, you can override this eeprom setting
if you boot the system by using the kernel command in the
GRUB menu.
See How to Modify the Solaris Boot Behavior by Editing the GRUB Menu. For more information about changes to the eeprom command in this release, see the eeprom ( 1M ) man page.
Become superuser or assume an equivalent role.
Roles contain authorizations and privileged commands. For more information about roles, see Configuring RBAC (Task Map) in System Administration Guide: Security Services .
To change the specified parameter, type the eeprom command with the appropriate arguments .
# eeprom parameter
=new-value
Verify that the new parameter has been set.
# eeprom parameter
The output should display the new eeprom value for the specified parameter.
Example 11.4.
Setting boot-file
Parameters by Using the eeprom Command
This example shows how to manually specify that the system boot a 64-bit kernel. Note that the system must support 64-bit computing.
# eeprom boot-file=kernel/amd64/unix
This example shows how to manually boot a 32-bit kernel on a 64-bit capable system.
# eeprom boot-file=kernel/unix
This example shows how to restore the default autodetected boot behavior on a system.
# eeprom boot-file=""
This example shows how to determine the current boot-file
parameter.
$ eeprom boot-file
Example 11.5. Setting the Console Destination, Mode, and Speed by Using the eeprom Command.
The following examples show how to direct the console to run on ttyb
.
# eeprom console=ttyb
# eeprom input-device=ttyb output-device=ttyb
The eeprom console=ttyb command only works if you
are running at least the Solaris Express 6/05 OS. Note that input-device
and output-device
must have the same value. Or, the system might not boot at all.
This example shows how to set a high serial line speed.
# eeprom ttyb-mode=115200,8,n,1
To enable the Solaris software to work with a higher serial line speed,
you must also modify the console line in the /etc/ttydefs
file,
as shown in the following example.
console:115200 hupcl opost onlcr:115200::console
For more information about setting the baud rate on the terminal console, see How to Set the Baud Rate Speed on the ttymon Console Terminal in System Administration Guide: Advanced Administration .
You can modify the Solaris boot behavior by editing the GRUB menu when the system is first booted. Typing e when the GRUB main menu is displayed interrupts the boot process, enabling you to access the GRUB edit menu. Each line in this menu is an individual command for the boot entry that you chose in the GRUB main menu. See the section, GRUB Terminology for more information.
The following is a sample of the menu that is displayed when you type e in the GRUB main menu to edit a boot entry. The second line, kernel /platform/i86pc/multiboot
, executes the kernel command,
which determines the boot behavior of the Solaris OS. Use the arrow keys to
navigate the menu, then highlight the specified line. Type e again
to edit the line. Note that any modifications you make persist only until
the next time the system is booted.
GNU GRUB version 0.95 (631K lower / 2095488K upper memory) +-------------------------------------------------------------------------+ | root (hd0,2,a) | | kernel /platform/i86pc/multiboot | | module /platform/i86pc/boot_archive | | | +-------------------------------------------------------------------------+
You can only add additional arguments to the end of boot entry that you are editing. You should not modify any portion of the text in the menu entry itself. Doing so prevents the Solaris instance from booting.
The following list describes how to use the kernel command with the appropriate options and arguments to specify Solaris boot behavior in the GRUB menu.
grub edit> kernel /platform/i86pc/multiboot/ [kernel-name
] [-asrvxk]
-m [smf-options
] [-i altinit] [-B prop=value[,prop=value]...]
kernel-name
Specifies the kernel to boot.
a
Prompts the user for configuration information.
s
Boots the system in single-user mode.
r
Specifies a reconfiguration boot. The system probes all attached hardware devices and then assigns nodes in the file system to represent only those devices that are actually found.
v
Boots the system with verbose messages enabled.
x
Does not boot in clustered mode.
k
Boots the system with the kernel debugger enabled.
m
smf-options
Controls the boot behavior of the Service Management Facility (SMF). Included are two categories of options, recovery options and messages options.
i
altinit
Specifies an alternative executable as the primordial process. altinit is a valid path to an executable.
B
prop=value[,prop=value]...
Is parsed by the multiboot program. The multiboot program then translates the argument into properties.
The following describes various ways that you can used the kernel command
with the
B
option:
B
console=ttya
Redirects the console to ttya
.
B
acpi-enum=off
Disables Advanced Configuration and Power Interface (ACPI) enumeration of devices.
B
console=ttya,apci-enum=off
Redirects the console to ttya
and disables
the ACPI enumeration of devices.
B
acpi-user-options=0x2
Disables ACPI entirely.
Note that when properties are specified by using the eeprom command and on the GRUB command line, that the GRUB command takes precedence.
How to Modify the Solaris Boot Behavior by Editing the GRUB Menu
This procedure shows how to modify the Solaris boot behavior in the GRUB menu. Changes that you make persist until the next time the system is booted.
If the system displays the Press any key to
reboot
prompt, press any key to reboot the system.
You can also use the Reset button at this prompt. If the system is shut down, turn the system on with the power switch.
When the boot sequence begins, the GRUB main menu is displayed.
To access the GRUB edit menu, type e.
Ue the arrow keys to select the second line in the menu.
GNU GRUB version 0.95 (631K lower / 2095488K upper memory) +-------------------------------------------------------------------------+ | root (hd0,2,a) | | kernel /platform/i86pc/multiboot | | module /platform/i86pc/boot_archive | | | | | | | +-------------------------------------------------------------------------+
The second line in the GRUB menu includes the kernel command, which is used to specify Solaris boot options.
Type e again to edit the kernel /platform/i86pc/multiboot line.
Type the appropriate information for the boot parameter that you want to specify.
kernel /platform/i86pc/multiboot/ [kernel-name
] [-afsrvxk]
-m [smf-options
] [-i atinit] [-B prop=value[,prop=value]...]
For example, to boot a 64-bit capable x86 based system in 32-bit mode, you would type:
grub edit> kernel /platform/i86pc/multiboot kernel/unix
See Using the kernel Command for a description of all the kernel command options.
Return to the GRUB main menu, by pressing Enter.
Pressing Enter saves your changes and returns you to the GRUB main menu. Pressing the Escape key returns you to the GRUB main menu without saving your changes.
To boot the system, type b.
Changes that you made take affect when the system is booted.
Example 11.6. Modifying the Solaris Boot Behavior in the GRUB Menu
This example shows how to modify the kernel /platform/i86pc/multiboot line to boot a 32-bit kernel to single-user mode.
grub edit> kernel /platform/i86pc/multibootkernel/unix -s
This example shows how to manually redirect the console to ttyb
.
grub edit> kernel /platform/i86pc/multiboot -B console=ttyb
Alternatively, you can use input-device/output-device
property,
as shown in the following example.
grub edit> kernel /platform/i86pc/multiboot -B input-device=ttyb,output-device=ttyb
This example shows how to override the serial line speed.
grub edit> kernel /platform/i86pc/multiboot -B ttyb-mode="115200,8,n,1,-"
In the preceding example, the property value contains commas, which is also a property separator. To avoid confusing the property parser, use double quotation marks around the entire property value.
Any system can boot from the network, if a boot server is available. You might need to boot a stand-alone system from the network for recovery purposes if the system cannot boot from the local disk. You can boot a Solaris OS x86 based system directly from a network that supports the PXE network boot protocol.
The PXE network boot is available only for devices that implement the Intel Preboot Execution Environment specification.
The default network boot strategy that is used for a GRUB based PXE network boot is DHCP. For non-PXE devices, you can use either the DHCP or the RARP boot strategy. The strategy that you use depends on which type of boot server is available on your network. If no PXE or DHCP server is available, you can load GRUB from a diskette, a CD-ROM, or a local disk. You can then configure the network in GRUB manually and download the multiboot program and the boot archive from the file server. For additional information, see GRUB Based Booting From the Network.
When you add clients with the add_install_client
d
script on the install server, the script reports DHCP configuration
information to standard output. You can use this information when you create
the options and macros that are needed to pass network installation information
to clients.
To install DHCP clients with a DHCP server over the network, you must create DHCP options. This information is needed to install the Solaris OS. When a client sends a DHCP request, the server must have the following client information:
Client's ID, which is typically the Ethernet address
Class of the client request
Subnet the client resides on
The Solaris DHCP server forms a response. This response is based on the following macros, which matches the client request:
The class macro is based on a class string that
is contained in the DHCP request. On x86 based systems, the BIOS already makes
a DHCP request with the class PXEClient:Arch:00000:UNDI:002001
.
If a macro by this name is defined in the DHCP server configuration, then
the macro content is sent to the x86 based clients.
The network macro is named by the IP address of the subnet
that the client resides on. If the macro 129.146.87.0
is
defined on the DHPC server, the macro content is sent to all clients on that
subnet. The macro content is sent, regardless of the class of the request.
If an option is defined in both the class macro and the network macro, the
network macro takes precedence.
The IP macro is named by an IP address. This macro is rarely used
The client macro is named by the client's type (01 for Ethernet)
and the mac address of the client, in uppercase letters. For a client with
the Ethernet address 0:0:39:fc:f2:ef
, the corresponding
macro name is 01000039FCEF
. Note the absence of colons
in the client macro.
For example, for a client on the subnet 192.168.100.0
,
with the Ethernet address 0:0:39:fc:f2:ef
, making a DHCP
request of class PXEClient
, the DHCP server has the following
matching macro:
PXEClient BootSrvA: 192.168.100.0 BootFile: pxegrub 129.146.87.0 Router: 129.146.87.1 NISdmain: sunsoft.eng.sun.com 01000039FCEF BootFile: 01000039FCEF The actual DHCP response will be BootSrvA: 192.168.100.0 BootFile: 01000039FCEF Router: 129.146.87.1 NISdmain: sunsoft.eng.sun.com
Note that the BootFile
in the client macro overrides
the BootFile
in the class macro.
For more detailed information, see Preconfiguring System Configuration Information With the DHCP Service (Tasks) in Solaris Express Installation Guide: Network-Based Installations .
How to Perform a GRUB Based Boot From the Network
To perform a GRUB based network boot a DHCP server that is configured
for PXE clients is required. A boot server that provides tftp service
is also required. The DHCP server must be able respond to the DHCP classes, PXEClient
and GRUBClient
to obtain the IP address
of the file server and the boot file (pxegrub). By default,
the menu file is /tftpboot/menu.lst.01
.
If this file does not exist, then pxegrub reverts to DHCP
Option 150, if this option is specified, or the ethernet-address
/tftpboot/boot/grub/menu.lst
file.
If you are booting the system from the Solaris Software 1 CD or DVD, the system boots automatically.
In this release, the Device Configuration Assistant has been replaced by the GRUB menu.
Before performing a network boot on an x86 based system with GRUB, do the following:
Run the appropriate commands on the installation server to enable the system to boot from the network.
Add the client system as an install client.
See Chapter 8, Preparing to Install From the Network (Overview), in Solaris Express Installation Guide: Network-Based Installations for more information.
On the DHCP server, create a client macro for the DHCP service with the following two options:
BootSrvA
: svr-addr
BootFile
: client-macro
Note that you must have superuser privileges on the DHCP server to run the dhtadm command.
where svr-addr
is
the IP address of the server, and client-macro
is
is named by the client's Ethernet type (01) and the mac address, in uppercase
letters. This number is also the name of the file that is used in the /tftpboot
directory on the installation server.
The notation for the client-macro
should
not contain any colons.
You can create the client macro from the DHCP GUI or from command-line interface.
To create the client macro from the command-line, type:
# dhtadm -[MA] -m client macro
-d
":BootFile=client-macro
:BootSrvA=svr-addr:
"
Reboot the system.
Instruct the BIOS to boot from the network.
If your system uses a specific keystroke sequence to boot from the network, type the keystrokes when the BIOS screen is displayed.
If you need to manually modify the BIOS settings to boot from the network, type the keystroke sequence to access the BIOS setup utility. Then, modify the boot priority to boot from the network.
When the GRUB menu is displayed, select the network installation image that you want to install.
How to Stop a System for Recovery Purposes
Stop the system by using one of the following commands, if possible:
If the keyboard and mouse are functional, become superuser.
Then, type init 0 to stop the system. After the Press
any key to reboot
prompt appears, press any key to reboot the system.
If the keyboard and mouse are functional, become superuser. then, type init 6 to reboot the system.
If the system does not respond to any input from the mouse or the keyboard, press the Reset key, if it exists, to reboot the system.
Or, you can use the power switch to reboot the system.
How to Boot the Failsafe Archive for Recovery Purposes
Follow this procedure to boot the Solaris failsafe archive, so that you can update the boot archives or repair a critical system resource.
Starting with the Solaris Express 3/06 release, the GRUB failsafe interaction has changed. Previously, when you booted the failsafe archive, you were prompted to update the boot archives, regardless of whether the boot archives were out-of-date. Now, you are prompted to update the boot archives only if the system detects any out-of-date boot archives. See Example 11–8 for an example.
For an example of the previous GRUB failsafe interaction, see Booting the Failsafe Archive for Recovery Purposes to Repair a Critical System Resource.
Stop the system by using the system's Stop key sequence.
Use the Stop key sequence for your system if you do not know the superuser password, or if you cannot log in to the system. For more information, see How to Stop a System for Recovery Purposes.
If the system displays the Press any key to
reboot
prompt, press any key to reboot the system.
You can also use the Reset button at this prompt.
When the boot sequence begins, the GRUB menu is displayed.
GNU GRUB version 0.95 (631K lower / 2095488K upper memory) +-------------------------------------------------------------------------+ | Solaris 10.1 ... X86 | | Solaris failsafe | | | | | | | +-------------------------------------------------------------------------+ Use the ^ and v keys to select which entry is highlighted. Press enter to boot the selected OS, 'e' to edit the commands before booting, or 'c' for a command-line. The highlighted entry will be booted in 10 seconds.
Use the arrow keys to navigate the GRUB menu, then select the Solaris failsafe
entry. Type b or press Enter
to boot the failsafe archive.
The system searches for installed OS instances. If the system detects any out-of-date boot archives, a message that is similar to the following is displayed:
Searching for installed OS instances... An out of sync boot archive was detected on /dev/dsk/c0t0d0s0. The boot archive is a cache of files used during boot and should be kept in sync to ensure proper system operation. Do you wish to automatically update this boot archive? [y,n,?]
Type y to automatically update the out-of-date boot archive. If multiple out-of-date boot archives are found, the system prompts you to update each boot archive, one at a time. Type y and press Enter to update each boot archive.
A message that is similar to the following is displayed:
Updating boot archive on /dev/dsk/c0t0d0s0. The boot archive on /dev/dsk/c0t0d0s0 was updated successfully.
After the boot archive has been updated successfully, the system searches
again for all installed OS instances and prompts you to select a device to
mount on /a
. If more than one OS instance is found, a
message that is similar to the following is displayed:
Multiple OS instances were found. To check and mount one of them read-write under /a, select it from the following list. To not mount any, select 'q'. 1 /dev/dsk/c0t0d0s0 Solaris 10 1/06 s10x_u1wos_19a X86 2 /dev/dsk/c0t1d0s0 Solaris Nevada snv_25 X86 Please select a device to be mounted (q for none) [?,??,q]: 2 mounting /dev/dsk/c0t1d0s0 on /a Starting shell. #
If you do not want to mount a device, type q and press Enter. Then, proceed to Step 7.
If any out-of-date archives were updated in the previous step, you do not need to mount the device. The device is already mounted. Proceed to Step 5.
If no out-of-date boot archives were updated in the previous step, and you want to mount the device, type the corresponding number of the device, and press Enter.
The system mounts the device on /a
,
and you are returned to the shell prompt.
Repair the critical system resource.
When you have finished repairing the critical system resource, unmount the device.
# umount /a
Reboot the system.
# init 6
Example 11.7. Booting the Failsafe Archive to Repair a Critical System Resource
This example shows the previous failsafe interaction. In the preceding task, the failsafe interaction that is shown is for the current release. If you have installed or have upgraded to at least the Solaris Express 3/06 OS, see Example 11–8 for the current failsafe interaction.
Press any key to reboot. Resetting... GNU GRUB version 0.95 (631K lower / 2095488K upper memory) +-------------------------------------------------------------------------+ | Solaris 10.1 ... X86 | | Solaris failsafe | | | | | | | +-------------------------------------------------------------------------+ GNU GRUB version 0.95 (631K lower / 2095488K upper memory) Filesystem type is ufs, partition type 0x000000bf [Multiboot-elf, <0x1000000:0x13f3b:0x3941d>, shtab=0x104e258, entry=0x100000 0]... module /boot/x86.miniroot-safe SunOS Release 5.10.1 Version ... 64-bit Copyright 1983-2005 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms. Booting to milestone "milestone/single-user:default". Configuring devices. Searching for installed OS... /dev/dsk/c1t0d0s0 -- Solaris 10.1 ... X86 Do you wish to automatically update boot archives? [y,n,?]y
#mount /dev/dsk/c0t0d0s0 /a
. . . #cd /a/etc
#vi passwd
(Remove invalid entry) #cd /
#umount /a
#init 6
. . . Booting 'Solaris 10.1 ... X86' root (hd0,2,a) Filesystem type is ufs, partition type 0x000000bf kernel /platform/i86pc/multiboot [Multiboot-elf, <0x1000000:0x13f3b:0x3941d>, shtab=0x104e258, entry=0x1000000] module /platform/i86pc/boot_archive SunOS Release 5.10.1 Version ... 64-bit Copyright 1983-2005 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms. Hostname: swoozie.Central.Sun.COM NIS domain name is boulder.Central.Sun.COM checking ufs filesystems /dev/rdsk/c1d0s7: is logging.hostname.domain
console login:
How to Boot the Failsafe Archive to Forcibly Update a Corrupt Boot Archive
This procedure shows you how to replace a corrupt boot archive by using the bootadm command. For more information, see the bootadm ( 1M ) man page.
Stop the system by using the system's Stop key sequence.
Use the Stop key sequence for your system if you do not know the superuser password, or if you cannot log in to the system. For more information, see How to Stop a System for Recovery Purposes.
If the system displays the Press any key to
reboot
prompt, press any key to reboot the system.
You can also use the Reset button at this prompt.
When the boot sequence begins, the GRUB menu is displayed.
+-------------------------------------------------------------------------+ | Solaris 10.1... X86 | | Solaris failsafe | | | | | +-------------------------------------------------------------------------+ Use the and keys to select which entry is highlighted. Press enter to boot the selected OS, 'e' to edit the commands before booting, or 'c' for a command-line.
Use the arrow keys to navigate the GRUB menu, then select the Solaris failsafe
entry. Type b or press Enter
to boot the failsafe archive.
If any boot archives are out of date, a message that is similar to the following is displayed:
Searching for installed OS instances... An out of sync boot archive was detected on /dev/dsk/c0t0d0s0. The boot archive is a cache of files used during boot and should be kept in sync to ensure proper system operation. Do you wish to automatically update this boot archive? [y,n,?]
Type y, then press Enter to update the out-of-date boot archive.
The system displays the following message:
Updating boot archive on /dev/dsk/c0t0d0s0. The boot archive on /dev/dsk/c0t0d0s0 was updated successfully.
If no out-of-date boot archives are found, a message that is similar to the following is displayed:
Searching for installed OS instances... Solaris 10.1... X86 was found on /dev/dsk/c0t0d0s0. Do you wish to have it mounted read-write on /a? [y,n,?]
This message is also displayed after any out-of-date boot archives are updated successfully.
Mount the device that contains the corrupt boot archive on /a
by typing the corresponding number of the device, then press
Enter.
If any out-of-date boot archives were updated in the previous
step, the device is already mounted on /a
. Proceed to
Step 6.
To forcibly update the corrupt boot archive, type:
# bootadm update-archive -f -R /a
Unmount the device.
# umount /a
Reboot the system.
# init 6
Example 11.8. Booting the Failsafe Archive to Forcibly Update a Corrupt Boot Archive
This example shows how to boot the failsafe archive to forcibly update a corrupt boot archive. Note that this example shows the failsafe interaction in the current Solaris release. For an example of the previous failsafe interaction, see Example 11–7.
GNU GRUB version 0.95 (635K lower / 523200K upper memory) +-------------------------------------------------------------------------+ | Solaris 10 1/06 s10x_u1wos_19a X86 | | >Solaris failsafe< | | | | | +-------------------------------------------------------------------------+ Use the and keys to select which entry is highlighted. Press enter to boot the selected OS, 'e' to edit the commands before booting, or 'c' for a command-line. SunOS Release 5.11 Version snv_34 32-bit Copyright 1983-2006 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms. Booting to milestone "milestone/single-user:default". Configuring devices. Searching for installed OS instances... Multiple OS instances were found. To check and mount one of them read-write under /a, select it from the following list. To not mount any, select 'q'. 1 /dev/dsk/c0t0d0s0 Solaris 10 1/06 s10x_u1wos_19a X86 2 /dev/dsk/c0t1d0s0 Solaris Nevada snv_25 X86 Please select a device to be mounted (q for none) [?,??,q]: 1 mounting /dev/dsk/c0t0d0s0 on /a Starting shell. # rm /a/platform/i86pc/boot_archive # bootadm update-archive -f -R /a Creating ram disk on /a updating /a/platform/i86pc/boot_archive...this may take a minute # umount /a # reboot syncing file systems... done rebooting... . . .
How to Boot a System With the Kernel Debugger in the GRUB Based 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 .
Boot the system.
The GRUB menu is displayed when the system is booted.
When the GRUB menu is displayed, type e to access the GRUB edit menu.
Use the arrow keys to choose the kernel /platform/i86pc/multiboot entry.
If you cannot use the arrow keys, use the ^
key
to scroll up and the v
key to scroll down.
Type e to edit the boot entry.
grub edit> kernel /platform/i86pc/multiboot
The boot entry menu is displayed. In this menu, you can add options to the kernel command.
Type
k
after the kernel /platform/i86pc/multiboot entry.
grub edit> kernel /platform/i86pc/multiboot -k
To save your changes and return to the GRUB main menu, press Enter.
Type b to boot the system with the kernel debugger enabled.
The system boots with the kernel debugger enabled.
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 11.9. Booting a System With the Kernel Debugger in the GRUB Based Boot Environment
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
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
If you type kmdb at the GRUB menu, the system boots
the autodetected kernel type, with the kernel debugger enabled. The system
boots in this manner regardless of how the eeprom boot-file
parameter has been set.
Typing
k
at the GRUB menu, with no additional arguments,
has the same boot result as typing b, with the kernel debugger
enabled. The kernel is specified by the eeprom boot-file
parameter or by the autodetected default, if the boot-file
parameter
is set to a null value (""
).
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 Chapter 24, Managing System Crash Information (Tasks), in System Administration Guide: Advanced Administration .
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, or with the mdb
k
command, for the following procedure to work.
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 induce 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 11.10.
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 neptune
by using the halt
d
and boot commands. Use this method to force a crash dump of the system.
Reboot the system afterwards manually.
#halt -d
4ay 30 15:35:15 wacked.Central.Sun.COM halt: halted byuser
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