Solaris 11 – How to Modify Boot parameters in Solaris X86 and Sparc

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 commandThe 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.
    Caution 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 timeChanges 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.
  • By editing the GRUB configuration file (menu.lst)

SPARC: How to Determine the Default Boot Device

  1. Bring the system to the ok PROM prompt.
  2. Determine the default boot device.
    ok printenv boot-device
    boot-device
    Identifies the parameter for setting the device from which to boot.

    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

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

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.

  1. Bring the system to the ok PROM prompt.
    # init 0
  2. Change the value of the boot-device parameter.
    ok setenv boot-device device[n]
    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.
  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 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:

 

x86: How to Modify Boot Parameters by Using theeeprom Command

  1. Become the root role.
  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 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

x86: How to Modify Boot Parameters at Boot Time

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.

  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$ line in the 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 effect when the system is booted.

Adding a Linux Entry to the GRUB Menu After an Installation

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.

 

Ramdev

Ramdev

I have started unixadminschool.com ( aka gurkulindia.com) in 2009 as my own personal reference blog, and later sometime i have realized that my leanings might be helpful for other unixadmins if I manage my knowledge-base in more user friendly format. And the result is today's' unixadminschool.com. You can connect me at - https://www.linkedin.com/in/unixadminschool/

2 Responses

  1. September 2, 2015

    […] Solaris 11 – How to Modify Boot parameters in Solaris X86 and Sparc […]

  2. September 16, 2015

    […] Read – How to Modify Boot parameters in Solaris X86 and Sparc […]

What is in your mind, about this post ? Leave a Reply

Close
  Our next learning article is ready, subscribe it in your email

What is your Learning Goal for Next Six Months ? Talk to us