Skip Navigation Links | |
Exit Print View | |
System Administration Guide: Basic Administration Oracle Solaris 11 Express 11/10 |
1. Managing User Accounts and Groups (Overview)
2. Managing User Accounts and Groups (Tasks)
3. Introduction to Shutting Down and Booting a System
4. Shutting Down and Booting a System (Overview)
5. Shutting Down a System (Tasks)
6. Modifying Oracle Solaris Boot Behavior (Tasks)
Modifying Boot Behavior on SPARC Based Systems (Task Map)
Modifying Boot Behavior on SPARC Based Systems
SPARC: How to Find the PROM Revision Number for a System
SPARC: How to Identify Devices on a System
SPARC: How to Determine the Default Boot Device
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
SPARC: How to Change the Default Kernel by Using the Boot PROM
SPARC: How to Change the Default Kernel by Using the eeprom Command
Modifying Boot Behavior on x86 Based Systems (Task Map)
Modifying Boot Behavior on x86 Based Systems
x86: How to Modify Boot Behavior by Using the eeprom Command
x86: Modifying Boot Behavior by Editing the GRUB Menu at Boot Time
Boot Arguments That Can Be Specified by Editing the GRUB Menu at Boot Time
x86: How to Modify Boot Behavior by Editing the GRUB Menu at Boot Time
x86: Modifying Boot Behavior by Editing the menu.lst File
x86: How to Modify Boot Behavior by Editing the menu.lst File
x86: Locating the Active GRUB menu.lst File
x86: Implementation of the findroot Command
x86: How to Add GRUB Menu Entries That Use the findroot Command
7. Booting an Oracle Solaris System (Tasks)
8. Troubleshooting Booting an Oracle Solaris System (Tasks)
9. Managing the Oracle Solaris Boot Archives (Tasks)
10. x86: GRUB Based Booting (Reference)
The primary methods for modifying boot behavior on an x86 based system are as follows:
By using the eeprom command.
The eeprom command is used to assign a different value to a standard set of properties. These values, which are equivalent to the SPARC OpenBoot PROM NVRAM variables, are stored either in the /boot/solaris/bootenv.rc file or in the menu.lst file. Changes that are made to boot behavior by using the eeprom command persist over each system reboot and are preserved during a software upgrade. See the eeprom(1M) man page for more information.
Caution - If you directly edit the menu.lst file, certain boot properties (boot-file, boot-args, and console) may not be changed at a later time by using the eeprom command. |
By editing the GRUB menu at boot time.
Changes that are made by modifying the GRUB kernel behavior at boot time override options that you set by using the eeprom command. However, these changes only remain in effect until the next time you boot the system. See the kernel(1M) man page for more information.
By manually editing the GRUB menu.lst file.
Caution - Any system-generated changes that are made to menu.lst entries are changed or lost during a system upgrade. However, any new boot entries that were manually added remain after an upgrade. You can override eeprom settings by editing the GRUB menu at boot time or by editing the menu.lst file. Changes made by editing the GRUB menu at boot time do not persist. Whereas, changes that are made by editing the menu.lst file persist over system reboots. |
For more information, see How to Obtain Administrative Rights in System Administration Guide: Security Services.
# eeprom parameter=new-value
# eeprom parameter
The output should display the new eeprom value for the specified parameter.
Example 6-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=""
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/kernel/$ISADIR/unix -B $ZFS-BOOTFS module$ /platform/i86pc/$ISADIR/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.
The following list describes the boot arguments and options that you can specify by editing the GRUB menu at boot time:
Specifies the kernel to boot
Prompts the user for configuration information
Boots the system in single-user mode
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.
Boots the system with verbose messages enabled
Does not boot the system in clustered mode
Boots the system with the kernel debugger enabled
Controls the boot behavior of the Service Management Facility (SMF)
There are two categories of options: recovery options and messages options.
Specifies an alternative executable as the primordial process. altinit is a valid path to an executable.
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:
Redirects the console to ttya.
Disables Advanced Configuration and Power Interface (ACPI) enumeration of devices.
Redirects the console to ttya and disables the ACPI enumeration of devices.
Disables ACPI entirely.
Note - When properties are specified by using the eeprom command and on the GRUB command line, the GRUB command takes precedence.
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.
When the boot sequence begins, the GRUB main menu is displayed.
Note - Pressing the Escape key returns you to the GRUB main menu without saving your changes.
Changes you make take affect when the system is booted.
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.
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.
You might need to modify the menu.lst file for one of the following reasons:
To add new OS entries
To add GRUB console redirection information
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 for systems that have a ZFS root is /pool-name/boot/grub/menu.lst.
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.
$ su - Password: #
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 11 s10x_90 X86 findroot (pool_rpool,0,a) kernel$ /platform/i86pc/kernel/$ISADIR/unix -B $ZFS-BOOTFS module$ /platform/i86pc/$ISADIR/boot_archive #---------------------END BOOTADM--------------------
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.
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 - 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:
|
Example 6-4 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:
findroot (pool_rpool,0,a) bootfs rpool/ROOT/nwambe-1 splashimage /boot/solaris.xpm foreground d25f00 background 115d93 kernel$ /platform/i86pc/kernel/$ISADIR/unix -B $ZFS-BOOTFS module$ /platform/i86pc/$ISADIR/boot_archive
On systems that have a ZFS root, the active menu.lst file is typically located in /pool-name/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:
For example:
# bootadm list-menu The location for the active GRUB menu is: /rpool/boot/grub/menu.ls default 1 timeout 30 0 oraclesolaris 11 1 nwambe-1 2 nwambe-2 3 newbet
For further instructions on using the bootadm command, see Using the bootadm Command to Manage the Boot Archives.
All installation methods 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. 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 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 - 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 6-5 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.
findroot (pool_rpool,0,a) bootfs rpool/ROOT/nwambe-1 kernel$ /platform/i86pc/kernel/$ISADIR/unix -B $ZFS-BOOTFS module$ /platform/i86pc/$ISADIR/boot_archive
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.
# touch /my-pool/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.
# bootadm list-menu
title User Solaris boot entry findroot (user-sign, 3, c) kernel$ /platform/i86pc/kernel/$ISADIR/unix module$ /platform/i86pc/$ISADIR/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).
The new entry is displayed in the GRUB menu and can be selected to boot the specified Oracle Solaris instance.