System Administration Guide: Basic Administration

Chapter 11 Modifying Oracle Solaris Boot Behavior (Tasks)

This chapter provides information about modifying boot behavior on Solaris systems.

The following is list of the information that is in this chapter:

For what's new in booting and general overview information about the boot process, see Chapter 8, Introduction to Shutting Down and Booting a System.

For step-by-step instructions on booting an Oracle Solaris system, see Chapter 12, Booting an Oracle Solaris System (Tasks).

Modifying Boot Behavior on SPARC Based Systems (Task Map)

Task 

Description 

For Instructions 

Identify the PROM revision number. 

Use the banner command at the ok prompt to display the PROM revision number for a system.

SPARC: How to Find the PROM Revision Number for a System

Identify devices on the system that can be booted. 

Before modifying boot behavior by using the boot PROM, identify the devices on the system. 

SPARC: How to Identify Devices on a System

Display the current boot device. 

Use this procedure to determine the current default boot device from which the system will boot. 

SPARC: How to Determine the Default Boot Device

Change the default boot device. 

To change the default boot device, use one of the following methods:

  • Change the boot-device parameter at the boot PROM.

  • Change the boot-device parameter by using the eeprom command.

SPARC: How to Change the Default Boot Device by Using the Boot PROM

SPARC: How to Change the Default Boot Device by Using the eeprom Command

Reset the system. 

When you reset the system, the system runs diagnostic tests on the hardware, then reboots. 

SPARC: Resetting the System

Change the default boot file. 

To change the default kernel that the system boots, use one of the following methods:

  • Change the boot-file parameter by using the boot PROM.

  • Change theboot-file parameter by using the eeprom command.

SPARC: How to Change the Default Kernel by Using the Boot PROM

SPARC: How to Change the Default Kernel by Using the eeprom Command

Boot a system with install-time Updates (ITUs). 

The new ITU utility enables you to boot a SPARC system with install-time updates that you create. 

SPARC: How to Boot a System With a Newly Created ITU

SPARC: Using the Boot PROM

The boot PROM is used to boot a system. You might need to change the way the system boots. For example, you might want to reset the device to boot from or run hardware diagnostics before you bring the system to a multiuser level.

System administrators typically use the PROM level to boot a system. You can also change the default boot file and boot device at the PROM level.

If you need to perform any of the following tasks, you need to change the default boot device:

For a complete list of PROM commands, see the monitor(1M) and eeprom(1M) man pages.

ProcedureSPARC: How to Find the PROM Revision Number for a System

  1. Display a system's PROM revision number by using the banner command.


    ok banner
    Sun Ultra 5/10 UPA/PCI (UltraSPARC-IIi 333MHz), No Keyboard
    OpenBoot 3.15, 128 MB memory installed, Serial #number.
    Ethernet address number, Host ID: number.

    Hardware configuration information, including the revision number of the PROM, is displayed. In the preceding example, the PROM revision number is 3.15.

ProcedureSPARC: How to Identify Devices on a System

You might need to identify the devices on the system to determine what are the appropriate devices to boot from.

Before You Begin

Before you can safely use the probe commands to determine what devices are attached to the system, you need to do the following:

You can view the probe commands that are available on your system by using the sifting probe command:


ok sifting probe

If you run the probe commands without clearing the system registers, the following message is displayed:


ok probe-scsi
This command may hang the system if a Stop-A or halt command
has been executed.  Please type reset-all to reset the system 
before executing this command. 
Do you wish to continue? (y/n) n
  1. Identify the devices on the system.


    ok probe-device
    
  2. (Optional) If you want the system to reboot after a power failure or after using the reset command, then reset the auto-boot? parameter to true.


    ok setenv auto-boot? true
    auto-boot? =          true
  3. Boot the system to multiuser mode.


    ok reset-all
    

Example 11–1 SPARC: Identifying the Devices on a System

The following example shows how to identify the devices connected to an Ultra 10 system.


ok setenv auto-boot? false
auto-boot? =          false
ok reset-all
Resetting ... 

Sun Ultra 5/10 UPA/PCI (UltraSPARC-IIi 333MHz), No Keyboard
OpenBoot 3.15, 128 MB memory installed, Serial #10933339.
Ethernet address 8:0:20:a6:d4:5b, Host ID: 80a6d45b.

ok probe-ide
  Device 0  ( Primary Master ) 
          ATA Model: ST34321A                                

  Device 1  ( Primary Slave ) 
         Not Present

  Device 2  ( Secondary Master ) 
         Removable ATAPI Model: CRD-8322B                               

  Device 3  ( Secondary Slave ) 
         Not Present

ok setenv auto-boot? true
auto-boot? =          true

Alternatively, you can use the devalias command to identify the device aliases and the associated paths of devices that might be connected to the system. For example:


ok devalias
screen                   /pci@1f,0/pci@1,1/SUNW,m64B@2
net                      /pci@1f,0/pci@1,1/network@1,1
cdrom                    /pci@1f,0/pci@1,1/ide@3/cdrom@2,0:f
disk                     /pci@1f,0/pci@1,1/ide@3/disk@0,0
disk3                    /pci@1f,0/pci@1,1/ide@3/disk@3,0
disk2                    /pci@1f,0/pci@1,1/ide@3/disk@2,0
disk1                    /pci@1f,0/pci@1,1/ide@3/disk@1,0
disk0                    /pci@1f,0/pci@1,1/ide@3/disk@0,0
ide                      /pci@1f,0/pci@1,1/ide@3
floppy                   /pci@1f,0/pci@1,1/ebus@1/fdthree
ttyb                     /pci@1f,0/pci@1,1/ebus@1/se:b
ttya                     /pci@1f,0/pci@1,1/ebus@1/se:a
keyboard!                /pci@1f,0/pci@1,1/ebus@1/su@14,3083f8:forcemode
keyboard                 /pci@1f,0/pci@1,1/ebus@1/su@14,3083f8
mouse                    /pci@1f,0/pci@1,1/ebus@1/su@14,3062f8
name                     aliases

ProcedureSPARC: How to Determine the Default Boot Device

  1. Bring the system to the ok PROM prompt.

    For more information, see How to Shut Down a Stand-Alone System.

  2. Use the printenv command to determine the default boot device.


    ok printenv boot-device
    
    boot-device

    Identifies the parameter for setting the device from which to boot.

    device[n]

    Identifies the boot-device value such as a disk or the network. The n can be specified as the disk number.

    The default boot-device is displayed in a format that is similar to the following:

    boot-device = /pci@1f,4000/scsi@3/disk@1,0:a

    If the default boot-device is a network boot device, the output is similar to the following:

    boot-device = /sbus@1f,0/SUNW,fas@e,8800000/sd@a,0:a \
    /sbus@1f,0/SUNW,fas@e,8800000/sd@0,0:a disk net

ProcedureSPARC: How to Change the Default Boot Device by Using the Boot PROM

You might need to identify the devices on the system before you can change the default boot device to some other device. For information on identifying devices on the system, see SPARC: How to Identify Devices on a System.

  1. Change to run level 0.


    # init 0
    

    The ok PROM prompt is displayed. For more information, see the init(1M) man page.

  2. Change the value of the boot-device parameter.


    ok setenv boot-device device[n]

    Use one of the probe commands if you need help identifying the disk number.

  3. Verify that the default boot device has been changed.


    ok printenv boot-device
    
  4. Save the new boot-device value.


    ok reset-all
    

    The new boot-device value is written to the PROM.


Example 11–2 SPARC: Changing the Default Boot Device

In this example, the default boot device is set to disk.


# init 0
# 
INIT: New run level: 0
.
.
.
The system is down.
syncing file systems... done
Program terminated
ok setenv boot-device /pci@1f,4000/scsi@3/disk@1,0
boot-device =         /pci@1f,4000/scsi@3/disk@1,0
ok printenv boot-device
boot-device           /pci@1f,4000/scsi@3/disk@1,0
ok boot
Resetting ... 

screen not found.
Can't open input device.
Keyboard not present.  Using ttya for input and output.

Sun Enterprise 220R (2 X UltraSPARC-II 450MHz), No Keyboard
OpenBoot 3.23, 1024 MB memory installed, Serial #13116682.
Ethernet address 8:0:20:c8:25:a, Host ID: 80c8250a.

Rebooting with command: boot disk1                                    
Boot device: /pci@1f,4000/scsi@3/disk@1,0  File and args:

In this example, the default boot device is set to the network.


# init 0
# 
INIT: New run level: 0
.
.
.
The system is down.
syncing file systems... done
Program terminated
ok setenv boot-device net
boot-device =         net
ok printenv boot-device
boot-device           net                    disk
ok reset
Sun Ultra 5/10 UPA/PCI (UltraSPARC-IIi 333MHz), No Keyboard
OpenBoot 3.15, 128 MB memory installed, Serial #number.
Ethernet address number, Host ID: number.



Boot device: net  File and args:
.
.
.
pluto console login:

ProcedureSPARC: How to Change the Default Boot Device by Using the eeprom Command

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

  2. Specify the alternate kernel to boot.


    # eeprom boot-device new-boot-device
    
  3. Verify that the new parameter has been set.


    # eeprom boot-device
    

    The output should display the new eeprom value for the boot-device parameter.

SPARC: Resetting the System

Run the following command from the ok prompt:


ok reset-all

The self-test program, which runs diagnostic tests on the hardware, is executed. Then, if the auto-boot? parameter is set to true, the system is rebooted.

ProcedureSPARC: How to Change the Default Kernel by Using the Boot PROM

  1. Change to run level 0.


    # init 0
    

    The ok PROM prompt is displayed. For more information, see theinit(1M) man page.

  2. Set the boot-file property to an alternate kernel.


    ok setenv boot-file boot-file
    
  3. Verify that the default boot device has been changed.


    ok printenv boot-file
    
  4. Save the new boot-file value.


    ok reset-all
    

    The new boot-file value is written to the PROM.

ProcedureSPARC: How to Change the Default Kernel by Using the eeprom Command

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

  2. Specify the alternate kernel to boot.


    # eeprom boot-file new boot-file
    

    For example:


    # eeprom boot-file=kernel.name/sparcv9/unix
    
  3. Verify that the new parameter has been set.


    # eeprom boot-file
    

    The output should display the new eeprom value for the specified parameter.

SPARC Support for ITU Construction Tools

The ITU utility is used to convert software packages and patches into driver update (DU) format, and then patch the Oracle Solaris installation media, which enables you to boot your system with these new packages and patches. Starting with Oracle Solaris 10 9/10, the itu command has been modified to enable you to create and store an ITU on your SPARC based system, and then boot the system with the newly created ITU.

ProcedureSPARC: How to Boot a System With a Newly Created ITU

The ITU utility enables you to install out-of-box drivers and then apply bug fixes during the installation process. The following procedure describes the process of creating and storing an ITU on a SPARC based system, and then booting the system with the newly created ITU.

  1. On the system that you want to boot with an ITU, become superuser.

  2. Create the ITU by using the itu command with the following options:


    # itu makedu -r solaris-release -o iso-file package1-name package2-name...
    
    makedu

    Takes one or more driver packages as input and converts the package to DU format.

    -r solaris-release

    Specifies the Oracle Solaris release number for which the driver update is intended. The release number format that is used is 5.10.

    -o iso-file

    Specifies the path of the ISO image file to create.

    For more detailed information about the itu command and all of its options, see the itu(1M) man page.

  3. Bring the system to the ok PROM prompt.

  4. Disable the auto-boot property.


    ok setenv auto-boot?=false
    
  5. Reset the system.


    ok reset-all
    

    Note –

    The previous step is important, as it ensures that the itu-device string is not cleared when you boot the system.


  6. Locate the cdrom alias.


    ok devalias cdrom
    

    The alias is the device path for the CD or DVD drive that is attached to the system. Note that this output varies, depending on the system. For example, in this procedure, the location of the cdrom alias is as follows:


    /pci@8,700000/scsi@1/disk@6,0:f
  7. Configure the itu-device path that will be used for the installation of the ITU.

    Note that the output from Step 6 is used for the first portion of the config-string, as shown in the following example:


    ok> " /pci@8,700000/scsi@1/disk@6,0:f" d# 80 config-string itu-device
    

    Note –

    The 80 refers to the maximum allowable length for the string. If your modified cdrom alias is more than 80 characters, increase this number, as appropriate.


  8. Boot the system with the ITU.


    ok boot
    

    When you boot the system and the Solaris installation process begins, the system locates the ITU that is stored on the itu-device. The system components that are available on the itu-device are then identified and configured in the system. The devices for those drivers are also identified and configured. When the installation has completed, the devices become available as installation targets.

  9. After the installation has completed, restore the default value for the auto-boot property, then boot the system.


    ok setenv auto-boot?=true
    

    The preceding example assumes the default value for the auto-boot property is true.

  10. Boot the system.


    ok boot
    

Modifying Boot Behavior on x86 Based Systems (Task Map)

Task 

Description 

For Instructions 

Set boot file parameters by using the eeprom command.

Modify boot behavior on an x86 based system by using the eeprom command. Boot options that are set by using the eeprom command persist over a system reboot, unless these options are overridden by modifying kernel behavior in the GRUB menu at boot time.

x86: How to Modify Boot Behavior by Using the eeprom Command

Modify boot behavior by editing the GRUB menu at boot time. 

Modify boot behavior by editing GRUB menu at boot time. Boot options that are specified by modifying the boot behavior in the GRUB menu persist only until the next system reboot. 

x86: How to Modify Boot Behavior by Editing the GRUB Menu at Boot Time

Modify boot behavior by manually editing the menu.lst file.

Modify boot behavior by editing the menu.lst configuration file to add new OS entries or redirect the console. Changes you make to the file persist over system reboots.

x86: How to Modify Boot Behavior by Editing the menu.lst File

Modify the menu.lst file to include entries that support the findroot command.

Additional menu entries that use the findroot command can be added to the menu.lst file menu after an installation or upgrade.

x86: How to Add GRUB Menu Entries That Use the findroot Command

Modifying Boot Behavior on x86 Based Systems

The primary methods for modifying boot behavior on an x86 based system are as follows:

Procedurex86: How to Modify Boot Behavior by Using the eeprom Command

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

  2. Change the specified parameter.


    # eeprom parameter=new-value
    
  3. Verify that the new parameter has been set.


    # eeprom parameter
    

    The output should display the new eeprom value for the specified parameter.


Example 11–3 x86: Setting boot-file Parameters by Using the eeprom Command

This example shows how to manually specify that the system boot a 64-bit kernel. 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 auto detected boot behavior on a system.


# eeprom boot-file=""

x86: Modifying Boot Behavior by Editing the GRUB Menu at Boot Time

The following is an example of a GRUB main menu in an Oracle Solaris release that supports booting a system from a ZFS root file system. This menu is based on the contents of the menu.lst file, which includes menu entries for all of the bootable OS instances on the system. The first entry in the menu is the default, unless otherwise specified. To specify another boot entry as the default, add the default=n command to the menu.lst file, where n is a number, starting from 0 (the first boot entry).


GNU GRUB  version 0.95  (637K lower / 3144640K upper memory)
 +-------------------------------------------------------------------------+
be1)
be1 failsafe
be3
be3 failsafe
be2
be2 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.

Note –

The information that is contained in the menu.lst file varies, depending on the Oracle Solaris release and the installation method that was used.


To edit a boot entry in the GRUB menu, use the arrow keys to select the entry, then type e.


GNU GRUB  version 0.95  (637K lower / 3144640K upper memory)
 +-------------------------------------------------------------------------+
findroot (BE_be1,0,a)
bootfs rpool/ROOT/szboot_0508
kernel$ /platform/i86pc/multiboot -B $ZFS-BOOTFS 
module /platform/i86pc/boot_archive
 +-------------------------------------------------------------------------+
      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.

For instructions on editing the GRUB menu at boot time, see x86: How to Modify Boot Behavior by Editing the GRUB Menu at Boot Time.

Editing the GRUB Menu in Oracle Solaris 10

The following examples show the edit menu in the various GRUB implementations:

GRUB ZFS Support:


grub edit> kernel$ /platform/i86pc/multiboot -B $ZFS-BOOTFS,prop=value
[,prop=value...]][-asrvxk] [-m smf-options] [-i altinit]

Note –

When adding boot arguments on a system with ZFS support, include any additional -B options after the default -B $ZFS-BOOTFS argument.


GRUB UFS Support:


grub edit> kernel /platform/i86pc/multiboot [-asrvxk] [-m smf-options]
[-i altinit][-B prop=value [,prop=value...]]

Boot Arguments That Can Be Specified by Editing the GRUB Menu at Boot Time

The following list describes the boot arguments and options that you can specify by editing the GRUB menu at boot time:

multiboot

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 the system 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)

There 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]...

Specifies kernel boot properties.

The following are various ways you can modify boot behavior in the GRUB menu by using the -B prop=val 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,acpi-enum=off

Redirects the console to ttya and disables the ACPI enumeration of devices.

-B acpi-user-options=0x2

Disables ACPI entirely.


Note –

When properties are specified by using the eeprom command and on the GRUB command line, the GRUB command takes precedence.


Procedurex86: How to Modify Boot Behavior by Editing the GRUB Menu at Boot Time

When you modify the GRUB kernel behavior by editing the GRUB menu at boot time, the changes do not persist over a system reboot. Default boot behavior is restored the next time you boot the system.

  1. Reboot the system.

    When the boot sequence begins, the GRUB main menu is displayed.

  2. Use the arrow keys to select the boot entry to edit.

  3. Type e to access the GRUB edit menu.

  4. Select the kernel or kernel$ line in this menu.

  5. Type e to add boot arguments to the line.

  6. Type any additional boot arguments.

  7. Press Return to save your changes and return to the previous menu.


    Note –

    Pressing the Escape key returns you to the GRUB main menu without saving your changes.


  8. To boot the system, type b.

    Changes you make take affect when the system is booted.


Example 11–4 x86: Booting a 32-Bit Kernel on a 64-Bit Enabled System

To boot a 32-bit kernel on a 64-bit capable system, add the kernel/unix argument.


grub edit> kernel /platform/i86pc/multiboot kernel/unix


Example 11–5 x86: Redirecting the Serial Console

To redirect the serial console to ttyb, add the -B console=ttyb argument.


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 you would override the serial line speed:


grub edit> kernel /platform/i86pc/multiboot -B ttyb-mode="115200,8,n,1,-"

Caution: 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.


x86: Modifying Boot Behavior by Editing the menu.lst File

The GRUB menu, which is based on the menu.lst configuration file, can be customized. When you install or upgrade your system, the bootadm command automatically updates the menu.lst file to reflect menu entries that are supported for that particular release. Any newly installed OS that is listed in this file is displayed as a boot entry in the GRUB menu when the system is rebooted. Note that when installing an operating system other than Oracle Solaris, you need to manually add the menu entry to the menu.lst file afterwards.

The following is an example of a typical GRUB main menu, which is based on the contents of the menu.lst file. The GRUB main menu consists of all of the boot entries that are available, plus a failsafe archive.


GNU GRUB  version 0.95  (631K lower / 2095488K upper memory)
 +-------------------------------------------------------------------------+
 | Solaris 10.1 ... X86                                                    |
 | Solaris failsafe                                                        |
 |                                                                         |
 +-------------------------------------------------------------------------+

A configurable timeout is available to boot the default OS entry. The default OS boot entry that is booted is configurable through the default command. The installation software typically sets this command to boot one of the valid boot entries. To boot a different instance of the Oracle Solaris OS (if applicable), or to boot a different OS, use the arrow keys to highlight a different boot entry. Then press Enter to boot that entry. Note that if the default command is not set, the first boot entry in the GRUB menu is booted.

Only the active menu.lst file is used to boot the system. To modify the GRUB menu that is displayed when you boot the system, edit the active GRUB menu.lst file. Changing any other menu.lst file has no effect on the menu that is displayed when you boot the system To determine the location of the active menu.lst file, use the list-menu subcommand of the bootadm command. For more information about using the bootadm command, see Using the bootadm Command to Manage the Boot Archives.

For a complete description of the menu.lst file in each of the GRUB implementations in the Solaris OS, see x86: Supported GRUB Versions.

Procedurex86: How to Modify Boot Behavior by Editing the menu.lst File

You might need to modify the menu.lst file for one of the following reasons:

Before You Begin

Because only the active GRUB menu.lst file is used to boot the system, make sure you edit the correct file. Changing any other GRUB menu.lst file has no effect on the menu that is displayed when you boot the system.

The location of the active menu.lst file varies, depending on whether you have a system with a UFS root or a ZFS root.

You can determine the location of the active GRUB menu.lst file by using the bootadm command with the list-menu subcommand.


# bootadm list-menu

For more information about the bootadm command, see the bootadm(1M) man page.

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

  2. To add a new OS entry to the active menu.lst file, use a text editor to modify the file.

    The comments within the menu.lst file provide you with the necessary information for adding a new OS entry.

    The following is an example of a menu.lst file for a system that is running a release with ZFS boot support. Boot entries in the menu.lst file vary, depending on the Oracle Solaris release that you are running.


    #---------- ADDED BY BOOTADM - DO NOT EDIT ----------
    title Solaris Solaris 10 s10x_nbu6wos_nightly X86
    kernel$ /platform/i86pc/multiboot -B $ZFS-BOOTFS
    module /platform/i86pc/boot_archive
    #---------------------END BOOTADM--------------------

    Caution – Caution –

    Do not directly edit the original contents of the menu.lst file. To make changes to any of the OS entries in the file, manually edit the file to duplicate the existing content. Then, make the modifications to the duplicated content.

    Also note when manually adding new entries to the file, never include guard comments, for example, “Added by bootadm”. These comments are reserved for use by the system. Not using these comments ensures that these entries remain intact during a software upgrade.


    If you have added any additional entries, beyond the default entries, make any equivalent changes manually.

    The [-B *] and [*] flags must be preserved, if these flags exist in the original menu.lst file. Also, the failsafe entry should always have an -s flag.

  3. After adding the required information, save the file.

    Note that any changes you make to the file take effect at the next system reboot.


    Tip –

    If you are running Linux, and install Oracle Solaris, the Linux entry is not preserved in the GRUB menu when the system is rebooted. Before installing or upgrading your system, save a copy of the menu.lst file that contains the Linux information. After the installation, add the Linux information to the newly created menu.lst file in the Solaris partition.


    Because changes you make to the menu.lst file are not directly related to the Oracle Solaris OS, you cannot make them by using the eeprom command. You must edit the file directly. Note that the software upgrade process preserves any changes that you make to the menu.lst file.


    Caution – Caution –

    GRUB is capable of booting both Linux and Oracle Solaris. However, Linux GRUB is not capable of booting Oracle Solaris.

    Always ensure that one of the following conditions are met:

    • That the fdisk partition is active, that it has GRUB installed, and that the menu.lst file is the active GRUB menu.

    • That Oracle Solaris GRUB is installed to the Master Boot Record (MBR), and that it refers to the menu.lst in the fdisk partition.


    For a detailed description of the GRUB menu.lst that pertains to each Oracle Solaris release, see x86: Supported GRUB Versions.


Example 11–6 menu.lst File on a System With an Oracle Solaris ZFS Boot Loader

The following examples show what a menu.lst file looks like on a system that has an Oracle Solaris ZFS boot loader. By default, this system will boot from a ZFS root file system. Note that the contents of the file varies, depending on the installation type.

New installation or standard upgrade:


title Solaris 10 s10x_nbu6wos_nightly X86
findroot (pool_rpool,0,a)
kernel$  /platform/i86pc/multiboot  -B $ZFS-BOOTFS
module /platform/i86pc/boot_archive

title Solaris failsafe
findroot (pool_rpool,0,a)
kernel /boot/multiboot kernel/unix -s    -B console=ttyb
module /boot/x86.miniroot-safe

Oracle Solaris Live Upgrade


title be1
findroot (BE_be1,0,a)
bootfs rpool/ROOT/szboot_0508
kernel$  /platform/i86pc/multiboot  -B $ZFS-BOOTFS
module /platform/i86pc/boot_archive

title be1 failsafe
findroot (BE_be1,0,a)
kernel /boot/multiboot kernel/unix -s    -B console=ttyb
module /boot/x86.miniroot-sa


Example 11–7 menu.lst File on a System With a UFS Boot Loader

The following examples show what a menu.lst file looks like on a system that has a UFS root file system installed. By default, this system will boot from a UFS root file system.

New installation or standard upgrade:


title Solaris 10 s10x_nbu6wos_nightly X86
findroot (rootfs0,0,a)
kernel /platform/i86pc/multiboot
module /platform/i86pc/boot_archive

title Solaris failsafe
findroot (rootfs0,0,a)
kernel /boot/multiboot kernel/unix -s    -B console=ttyb
module /boot/x86.miniroot-safe

Oracle Solaris Live Upgrade:


title be1
findroot (BE_be1,0,a)
kernel /platform/i86pc/multiboot
module /platform/i86pc/boot_archive

title be1 failsafe
findroot (BE_be1,0,a)
kernel /boot/multiboot kernel/unix -s    -B console=ttyb
module /boot/x86.miniroot-safe

x86: Locating the Active GRUB menu.lst File

On systems that have a ZFS root, the active menu.lst file is typically located in /pool-name/boot/grub/menu.lst.

On systems that have a UFS root, the active menu.lst file is typically located in /boot/grub/menu.lst.

To locate the active GRUB menu, use the bootadm command with the list-menu subcommand:


# bootadm list-menu

This command also lists the contents of the active menu.lst file:


# bootadm list-menu
The location for the active GRUB menu is: /pool-name/boot/grub/menu.lst
default 0
timeout 10
0 be1
1 be1 failsafe
2 be3
3 be3 failsafe
4 be2
5 be2 failsafe

For further instructions on using the bootadm command, see Using the bootadm Command to Manage the Boot Archives.

x86: Implementation of the findroot Command

All installation methods, including Oracle Solaris Live Upgrade, now use the findroot command for specifying which disk slice on an x86 based system to boot. This enhancement supports booting systems with Oracle Solaris ZFS roots, as well as UFS roots. This information is located in the menu.lst file that is used by GRUB. Previously, the root command, root (hd0.0.a), was explicitly used to specify which disk slice to boot.

The installation methods include Oracle Solaris Live Upgrade, Oracle Solaris JumpStart, and the installation GUI program.

In addition to the findroot command, is a signature file on the slice, (mysign, 0, a), where mysign is the name of a signature file that is located in the /boot/grub/bootsign directory. When booting a system from a ZFS root, the ZFS GRUB plug-in looks for and tries to mount a ZFS file system in slice a of fdisk partition 0.

The name of the signature file varies, depending on the installation method that was used. For more information about the naming conventions that are used by the findroot command, see Naming Conventions That Are Used by the findroot Command.

Additional menu entries that also use the findroot command can be added to the GRUB menu after an installation or upgrade. For instructions, see x86: How to Add GRUB Menu Entries That Use the findroot Command.


Caution – Caution –

The boot signature must be unique. Do not use or remove system-generated signatures or user signatures that are duplicated across multiple instances of the Oracle Solaris software. Doing so might result in booting an incorrect OS instance or prevent the system from booting.


Note that the root command can still be used in the menu.lst file in certain instances, for example to boot Windows. However, do not use the root command in cases where the findroot command is the preferred choice.


Example 11–8 x86: Default menu.lst file on a System That Supports a UFS Boot Loader

The following example shows the format of a menu.lst file entry that uses the findroot command:


title Solaris 10 s10x_nbu6wos_nightly X86
findroot (pool_rpool,0,a)
kernel$  /platform/i86pc/multiboot  -B $ZFS-BOOTFS
module /platform/i86pc/boot_archive

title Solaris failsafe
findroot (pool_rpool,0,a)
kernel /boot/multiboot kernel/unix -s    -B console=ttyb
module /boot/x86.miniroot-safe


Example 11–9 x86: Default menu.lst file That Supports an Oracle Solaris ZFS Boot Loader

This is an example of a menu.lst file on system that supports an Oracle Solaris ZFS boot loader. The information for booting from a ZFS root file system is automatically added to the file when an Oracle Solaris Live Upgrade is performed.


title be1
findroot (BE_be1,0,a)
kernel$  /platform/i86pc/multiboot  -B $ZFS-BOOTFS
module /platform/i86pc/boot_archive

title be1 failsafe
findroot (BE_be1,0,a)
kernel /boot/multiboot kernel/unix -s    -B console=ttyb
module /boot/x86.miniroot-safe

Procedurex86: How to Add GRUB Menu Entries That Use the findroot Command

This procedure shows how to manually update the menu.lst file with user-defined entries that use the findroot command. Typically, these entries are added after an installation or an upgrade. For guidelines on adding user-defined entries that use the findroot command, see x86: Implementation of the findroot Command.

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

  2. Create a boot signature file on the root (/) file system or root pool that will be booted.

    • For a ZFS pool, my-pool, create the boot signature file in the /my-pool/boot/grub/bootsign directory.


      #  touch   /my-pool/boot/grub/bootsign/user-sign
      
    • For a UFS file system, create the boot signature file in the /boot/grub/bootsign directory of the root file system to be booted.


      #  touch   /boot/grub/bootsign/user-sign
      

    Note –

    Make sure the file name that you choose for the boot signature is unique. Do not use system-generated signature names or user signature names that are duplicated across multiple instances of Oracle Solaris. Doing so might prevent the system from booting or cause the wrong Oracle Solaris instance to boot.


  3. Add a menu entry that contains the findroot command.

    1. Locate the active menu.lst file:


      # bootadm list-menu
      
    2. Using a text editor, edit the active menu.lst file to add the following entry:


      title    User Solaris boot entry
      findroot  (user-sign, 3, c)
      kernel$   /platform/i86pc/multiboot
      module  /platform/i86pc/boot_archive

      In the preceding example, the 3 represents the 4th fdisk partition (partitions start at 0). The c represents the slice within a Solaris fdisk partition (slices start with a).

  4. Reboot the system.

    The new entry is displayed in the GRUB menu and can be selected to boot the specified Oracle Solaris OS instance.