|Skip Navigation Links|
|Exit Print View|
|Oracle Solaris Administration: Common Tasks Oracle Solaris 11 Information Library|
On SPARC platforms, the boot PROM is used to boot a SPARC based system and to modify boot parameters. For example, you might want to reset the device from which to boot, change the default boot file or kernel, or run hardware diagnostics before bringing the system to a multiuser state.
On x86 platforms, the primary methods for modifying boot parameters are as follows:
By using the eeprom command
The eeprom command is used to assign a different value to a standard set of parameters. 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 parameters 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 parameters (boot-file, boot-arguments, and console) cannot 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 default kernel usage 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 editing the GRUB configuration file (menu.lst)
For more information, see How to Shut Down a System by Using the init Command.
ok printenv boot-device
Identifies the parameter for setting the device from which to boot.
For more information, see the printenv(1B) man page.
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 boot-device parameter specifies 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
Before You Begin
You might need to identify the devices on the system before you can change the default boot device to some other device. For information about identifying devices on the system, see How to Identify Devices on a System in Booting and Shutting Down Oracle Solaris on SPARC Platforms.
# init 0
ok setenv boot-device device[n]
Identifies the boot-device value, such as disk or network. The n can be specified as a disk number. Use one of the probe commands if you need help identifying the disk number.
ok printenv boot-device
The new boot-device value is written to the PROM.
Example 4-6 SPARC: Changing the Default Boot Device by Using the Boot PROM
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. . . . 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 . . . Boot device: net File and args: pluto console login:
For instructions on using the eeprom utility to change the default boot device on a SPARC based system, see How to Change the Default Boot Device by Using the eeprom Utility in Booting and Shutting Down Oracle Solaris on SPARC Platforms.
# eeprom parameter=new-value
# eeprom parameter
The output should display the new eeprom value for the specified parameter.
Example 4-7 Setting the auto-boot Parameter by Using the eeprom Command
The following example shows how to set the auto-boot boot parameter to true.
# eeprom auto-boot?=true
When the eeprom command is run in user mode, any parameters that have a trailing question mark (?) need to be enclosed in double quotation marks to prevent the shell from interpreting the question mark. Preceding the question mark with an escape character (\) also prevents the shell from interpreting the question mark. For example:
# eeprom "auto-boot?"=true
When you modify the default kernel usage by editing the GRUB menu at boot time, the changes do not persist over a system reboot. The default boot parameters are restored the next time you boot the system.
For a detailed description of all of the boot parameters that you can specify at boot time, see Modifying Based Boot Parameters at Boot Time in Booting and Shutting Down Oracle Solaris on x86 Platforms.
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 effect when the system is booted.
If you are setting up a boot environment in such a way that you install Linux on one partition first and Oracle Solaris on another partition afterwards, you will need to follow certain instructions to ensure that the GRUB menu information from the new installation does not erase the GRUB menu information from a previous installation. For instructions, see How to Add a Linux Entry to the GRUB Menu After Installing Oracle Solaris in Booting and Shutting Down Oracle Solaris on x86 Platforms.
Note - Some Linux distributions now run on GRUB2, for example, Ubuntu and Mint Linux. You cannot boot GRUB2 partitions on the version of GRUB that is included in Oracle Solaris 11. In these instances, an alternate workaround is suggested.