|
||||||||||||||||
1. Solaris Management Tools (Road Map) 2. Working With the Solaris Management Console (Tasks) 3. Working With the Sun Java Web Console (Tasks) 4. Managing User Accounts and Groups (Overview) 5. Managing User Accounts and Groups (Tasks) 6. Managing Client-Server Support (Overview) 7. Managing Diskless Clients (Tasks) 8. Introduction to Shutting Down and Booting a System 9. Shutting Down and Booting a System (Overview) 10. Shutting Down a System (Tasks) 11. Modifying Solaris Boot Behavior (Tasks) Modifying Boot Behavior on SPARC Based Systems (Task Map) 12. Booting a Solaris System (Tasks) 13. Troubleshooting Booting a Solaris System (Tasks) 14. Managing the Solaris Boot Archives (Tasks) 15. x86: GRUB Based Booting (Reference) 16. Managing Services (Overview) 18. Managing Software (Overview) 19. Managing Software With Solaris System Administration Tools (Tasks) 20. Managing Software by Using Package Commands (Tasks) 21. Managing Solaris Patches by Using the patchadd Command (Tasks) |
Modifying Solaris Boot Behavior on x86 Based Systems (Task Map)Table 11-1 x86: Modifying Boot Behavior: Task Map
Modifying Boot Behavior on x86 Based SystemsThe primary methods for modifying boot behavior on an x86 based system are as follows:
x86: How to Modify Boot Behavior by Using the eeprom CommandYou can display or set boot parameters by using the eeprom command. These parameters are found in the /boot/solaris/bootenv.rc file. Changes that are made by using the eeprom command persist over a system reboot. You can override eeprom settings by editing the GRUB menu at boot time to specify alternative boot behavior. See x86: How to Modify Boot Behavior by Editing the GRUB Menu at Boot Time. For more information about changes to the eeprom command in this release, see the eeprom(1M) man page.
Example 11-3 x86: Setting boot-file Parameters by Using the eeprom CommandThis 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 auto detected boot behavior on a system. # eeprom boot-file="" x86: Modifying Boot Behavior by Editing the GRUB Menu at Boot TimeThe following is an example of a GRUB main menu in a Solaris release that supports booting a system from a ZFS root file system. This menu is based on the contents of the menu.lst configuration file and 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 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. Description of the GRUB Edit MenuThe following examples show the edit menu in the various GRUB implementations: GRUB ZFS Support: grub edit> kernel$ /platform/i86pc/kernel/$ISADIR/unix -B $ZFS-BOOTFS,prop=value [,prop=value...]][-asrvxk] [-m smf-options] [-i altinit] Note - When adding boot arguments on a system with ZFS support, any additional -B options should be added after the default -B $ZFS-BOOTFS argument. GRUB hypervisor Support: grub edit> module$ /platform/i86xpv/$ISADIR/unix /platform/i86xpv/$ISADIR/unix -B $ZFS-BOOTFS,\ prop=value [,prop=value...]][-asrvxk] [-m smf-options] [-i altinit] GRUB UFS Support: grub edit> kernel$ /platform/i86pc/kernel/$ISADIR/unix [-asrvxk] [-m smf-options] [-i altinit][-B prop=value [,prop=value...]] Boot Arguments You Can Specify When Editing the GRUB Menu at Boot TimeThe following list describes the boot arguments and options that can be specified by editing the GRUB menu at boot time:
The following are various ways you can modify boot behavior in the GRUB menu by using the -B prop=val option:
Note - When properties are specified by using the eeprom command and on the GRUB command line, the GRUB command takes precedence. x86: How to Modify Boot Behavior by Editing the GRUB Menu at Boot TimeWhen 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.
Example 11-4 x86: Booting a 32-Bit Kernel on a 64-Bit Enabled SystemTo 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 ConsoleTo 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 FileThe GRUB menu, which is based on the menu.lst configuration file, can be customized. When you install or upgrade the Solaris release, the bootadm command automatically updates the menu.lst file to reflect menu entries that are supported for that particular GRUB implementation. 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 the Solaris OS, you will need to manually add the menu entry to the menu.lst file afterwards. The following is an example of a typical GRUB main menu, based on the contents of the menu.lst file. The GRUB main menu consists of 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 Solaris installation software typically sets this command to boot one of the valid Solaris boot entries. To boot a different instance of the 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 Implementations. x86: How to Modify Boot Behavior by Editing the menu.lst FileYou might need to modify the menu.lst file for one of the following reasons:
Before You BeginBecause 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.
Example 11-6 menu.lst File on a System With a ZFS Boot LoaderThe following examples show what a menu.lst file looks like on a system that has a 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 11 s10x_90 X86 findroot (pool_rpool,0,a) kernel$ /platform/i86pc/kernel/$ISADIR/unix -B $ZFS-BOOTFS module$ /platform/i86pc/$ISADIR/boot_archive title Solaris 11 failsafe findroot (pool_rpool,0,a) kernel /boot/platform/i86pc/kernel/unix -B console=ttyb module /boot/x86.miniroot-safe Solaris Live Upgrade: title be1 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 title be1 failsafe findroot (BE_be1,0,a) kernel /boot/platform/i86pc/kernel/unix -s -B console=ttyb module /boot/x86.miniroot-safe Example 11-7 menu.lst File on a System With a UFS Boot LoaderThe 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 11 s10x_90 X86 findroot (rootfs0,0,a) kernel$ /platform/i86pc/kernel/$ISADIR/unix module$ /platform/i86pc/$ISADIR/boot_archive title Solaris 11 failsafe findroot (rootfs0,0,a) kernel /boot/platform/i86pc/kernel/unix -s -B console=ttyb module /boot/x86.miniroot-safe Solaris Live Upgrade: title be1 findroot (BE_be1,0,a) kernel$ /platform/i86pc/kernel/$ISADIR/unix module$ /platform/i86pc/$ISADIR/boot_archive title be1 failsafe findroot (BE_be1,0,a) kernel /boot/platform/i86pc/kernel/unix -s -B console=ttyb module /boot/x86.miniroot-safe Example 11-8 x86: menu.lst File With Hypervisor SupportThe following examples are for a GRUB implementation that supports booting the Solaris OS as a dom0, with hypervisor support. In this example, the menu.lst file has been modified to enable a 64-bit capable system to boot the Solaris OS as a dom0, in 32-bit mode. This modification includes removing all instances of $ISADIR from the file. title 32-bit Solaris on xVM kernel$ /boot/xen.gz module$ /platform/i86xpv/kernel/unix /platform/i86xpv/kernel/unix -B $ZFS-BOOTFS [*] module$ /platform/i86pc/boot_archive In this example, the menu.lst file has been modified to direct the hypervisor to use the serial console. Note that the serial console is also shared by the Solaris OS dom0 console. title Solaris on xVM kernel$ /boot/$ISADIR/xen.gz console=com1 com1=9600,8n1 module$ /platform/i86xpv/kernel/$ISADIR/unix /platform/i86xpv/kernel/$ISADIR/unix \ -B $ZFS-BOOTFS console=hypervisor module$ /platform/i86pc/$ISADIR/boot_archive x86: Locating the Active GRUB menu.lst FileOn 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 CommandAll Solaris installation methods, including Solaris Live Upgrade, now use the findroot command for specifying which disk slice on an x86 based system to boot. This implementation supports booting systems with 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 used to explicitly specify which disk slice to boot. The installation methods include Solaris Live Upgrade, JumpStart, and the installation GUI program. In addition to the findroot command, is the additional of 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 type of installation that was used. For more information about the naming convention that is used by the findroot command, see Naming Conventions That Are Used by the findroot Command. Additional menu entries, which 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 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, use of the root command in cases where the findroot command is preferred is discouraged. Example 11-9 x86: Default menu.lst file on a System That Uses the findroot CommandThe following example shows the format of a menu.lst file entry that implements the findroot command: # title Solaris version findroot (foosignpartition-no,slice-no,x) --x = Solaris root slice kernel$ /platform/i86pc/kernel/$ISADIR/unix module$ /platform/i86pc/$ISADIR/boot_archive Example 11-10 x86: Default menu.lst file That Supports ZFS Boot LoaderThis is an example of a menu.lst file on system that supports a ZFS boot loader. The information for booting from a ZFS root file system is automatically added to the file when a Solaris Live Upgrade is performed. title be1 findroot (BE_be1,0,a) kernel$ /platform/i86pc/kernel/$ISADIR/unix -B $ZFS-BOOTFS module$ /platform/i86pc/$ISADIR/boot_archive title be1 failsafe findroot (BE_be1,0,a) bootfs rpool/ROOT/szboot_0508 kernel /boot/platform/i86pc/kernel/unix -s -B console=ttyb module /boot/x86.miniroot-safe x86: How to Add GRUB Menu Entries That Use the findroot CommandThis 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.
|
|||||||||||||||
|