Home > Articles > Operating Systems, Server > Solaris

  • Print
  • + Share This
This chapter is from the book

OpenBoot NVRAM

Objective: List, change, and restore default NVRAM parameters.

  • View and change NVRAM parameters from the shell.

System configuration variables are stored in system NVRAM. These OpenBoot variables determine the startup machine configuration and related communication characteristics. If you modify the values of the configuration variables, any changes you make remain in effect even after a power cycle. Configuration variables should be adjusted cautiously, however, because incorrect settings can prevent a system from booting.

Table 3.7 describes OpenBoot’s NVRAM configuration variables, their default values, and their functions.

Table 3.7 NVRAM Variables

Variable

Default

Description

auto-boot?

true

The system starts up automatically after power-on or reset if auto-boot? is true. If it is set to false, the system stops at the OpenBoot prompt (ok) after power-on or reset.

boot-command

boot

The command that is executed if auto-boot? is true.

boot-device

disk or net

The device from which to start up.

boot-file

Empty string

Arguments passed to the started program.

diag-device

net

The diagnostic startup source device.

diag-file

Empty string

Arguments passed to the startup program in diagnostic mode.

diag-switch?

false

Whether to run in diagnostic mode.

fcode-debug?

false

Whether name fields are included for plug-in device FCodes.

input-device

keyboard

A console input device (usually keyboard, ttya, or ttyb).

nvramrc

Empty

The contents of NVRAMRC.

oem-banner

Empty string

A custom original equipment manufacturer (OEM) banner (enabled with oem-banner? true).

oem-banner?

false

If true, use custom OEM banner.

oem-logo

No default

A byte array custom OEM logo (enabled with oem-logo? true). Displayed in hexadecimal.

oem-logo?

false

If true, use custom OEM logo; otherwise, use the Sun logo.

output-device

screen

A console output device (usually screen, ttya, or ttyb).

sbus-probe-list

0123

Which SBus slots to probe and in what order.

screen-#columns

80

The number of onscreen columns (characters/line).

screen-#rows

34

The number of onscreen rows (lines).

security-#badlogins

No default

The number of incorrect security password attempts.

security-mode

none

The firmware security level (options: none, command, or full).

security-password

No default

The firmware security password (which is never displayed).

use-nvramrc?

false

If true, execute commands in NVRAMRC during system startup.

You can view and change the NVRAM configuration variables by using the commands listed in Table 3.8.

Table 3.8 Commands for Viewing and Modifying Configuration Variables

Command

Description

password

Sets the security password.

printenv

Displays the current value and the default value for each variable. To show the current value of a named variable, you type the following:

 

printenv <parameter-name>

setenv <variable> <value>

Sets <variable> to the given decimal or text <value>. Changes are permanent, but they often take effect only after a reset.

set-default <variable>

Resets the value of a specified <variable> to the factory default.

set-defaults

Resets ALL OpenBoot variable values to the factory defaults.

The following examples illustrate the use of the commands described in Table 3.8. All commands are entered at the ok OpenBoot prompt.

You use the printenv command, with no argument, to display the current value and the default value for each variable:

ok printenv

The system responds with this:

Variable Name   	 Value       	  	 Default Value
tpe-link-test?  	 true       	   	 true
scsi-initiator-id  7        		   	 7
keyboard-click?  	 false       	   	 false
keymap
ttyb-rts-dtr-off    false       	   	 false
ttyb-ignore-cd  	  true       	   	 true
ttya-rts-dtr-off    false       	   	 false
ttya-ignore-cd  	  true       	   	 true
ttyb-mode    		  9600,8,n,1,-     	 9600,8,n,1,-
ttya-mode    		  9600,8,n,1,-     	 9600,8,n,1,-
pcia-probe-list  	  1,2,3,4      	   	 1,2,3,4
pcib-probe-list  	  1,2,3       	   	 1,2,3
mfg-mode    		  off       	   	 off
diag-level   		  max       	   	 max
#power-cycles   	  89
system-board-serial#
system-board-date
fcode-debug?   	  false       	  	 false
output-device    	  screen          	 screen
input-device   	  keyboard        	 keyboard
load-base    		  16384       	  	 16384
boot-command   	  boot       	  	 boot
auto-boot?   		  false       	  	 true
watchdog-reboot?    false           	 false
diag-file
diag-device  		  net       	     net
boot-file
boot-device   	  disk:a disk net    disk net
local-mac-address?  false       		 false
ansi-terminal?  	  true       		 true
screen-#columns  	  80        		 80
screen-#rows   	  34        		 34
silent-mode?   	  false       		 false
use-nvramrc?   	  false       		 false
nvramrc
security-mode   	  none
security-password
security-#badlogins 0
oem-logo
oem-logo?   		  false       		 false
oem-banner
oem-banner?  		  false       		 false
hardware-revision
last-hardware-update
diag-switch?        false       		 false

To set the auto-boot? variable to false, you type the following:

ok setenv auto-boot? false

The system responds with this:

auto-boot? = false

You can verify the setting by typing the following:

ok printenv auto-boot?

The system responds with this:

auto-boot? =  false

To reset the variable to its default setting, you type the following:

ok set-default auto-boot?

The system does not respond with a message—only another OpenBoot prompt. You can verify the setting by typing the following:

ok printenv auto-boot?

The system responds with this:

auto-boot? =  true

To reset all variables to their default settings, you type the following:

ok set-defaults

The system responds with this:

Setting NVRAM parameters to default values.

It’s possible to set variables from the Unix command line by issuing the eeprom command. You must be logged in as root to issue this command, and although anyone can view a parameter, only root can change the value of a parameter. For example, to set the auto-boot? variable to true, you type the following at the Unix prompt (note the use of quotes to escape the ? from expansion by the shell):

eeprom ‘auto-boot?=true’

Any non-root user can view the OpenBoot configuration variables from a Unix prompt by typing the following:

/usr/sbin/eeprom

For example, to change the OpenBoot parameter security-password from the command line, you must be logged in as root and issue the following command:

example# eeprom security-password=
Changing PROM password:
New password:
Retype new password:

The security mode password you assign must be between zero and eight characters. Any characters after the eighth are ignored. You do not have to reset the system after you set a password; the security feature takes effect as soon as you type the command.

With no parameters, the eeprom command displays all the OpenBoot configuration settings, similar to the OpenBoot printenv command.

Use the prtconf command with the -vp options to view OpenBoot parameters from the shell prompt as follows:

prtconf -vp

The system responds with a great deal of output, but you'll see the following OpenBoot information embedded in the output:

. . . . <output truncated>
ansi-terminal?: 'true'
  screen-#columns: '80'
  screen-#rows: '34'
  silent-mode?: 'false'
  use-nvramrc?: 'false'
  nvramrc:
  security-mode: 'none'
  security-password:
  security-#badlogins: '0'
  oem-logo:
  oem-logo?: 'false'
  oem-banner:
  oem-banner?: 'false'
  hardware-revision:
  last-hardware-update:
  diag-switch?: 'false'
  name: 'options'

 Node 0xf002ce38
  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'
. . . <output truncated>

You can use the NVRAM commands listed in Table 3.9 to modify device aliases so that they remain permanent, even after a restart.

Table 3.9 NVRAM Commands

Command

Description

nvalias <alias> <device-path>

Stores the command devalias <alias> <device-path> in NVRAMRC. (The alias persists until the nvunalias or set-defaults command is executed.) This command turns on use-nvramrc?.

nvunalias <alias>

Deletes the corresponding alias from NVRAMRC.

For example, to permanently create a device alias named bootdisk that represents a SCSI disk with a target ID of 3 on an Ultra 5 system, you type the following:

nvalias bootdisk /pci@1f,0/pci@1,1/ide@3/disk@3,0

Because disk device pathnames can be long and complex, the show-disks command is provided to assist you in creating device aliases. Type the show-disks command and a list of disk devices is shown as follows:

ok show-disks
a) /pci@1f,0/pci@1,1/ide@3/cdrom
b) /pci@1f,0/pci@1,1/ide@3/disk
c) /pci@1f,0/pci@1,1/ebus@1/fdthree@14,3023f0
q) NO SELECTION
Enter Selection, q to quit:

Type b to select an IDE disk and the system responds with the following message:

/pci@1f,0/pci@1,1/ide@3/disk has been selected.
Type ^Y ( Control-Y ) to insert it in the command line.
e.g. ok nvalias mydev ^Y for creating devalias mydev for
/pci@1f,0/pci@1,1/ide@3/disk

Now create a device alias named mydisk followed by ctrl+y as follows:

nvalias mydisk ^Y 

The system pastes the selected device path as follows:

ok nvalias mydisk /pci@1f,0/pci@1,1/ide@3/disk

Now all you need to do is add the target number and logical unit number (for example, sd@0,0 or disk@0,0) to the end of the device name as follows:

ok nvalias mydisk /pci@1f,0/pci@1,1/ide@3/disk@0,0

To remove an alias, type nvunalias <aliasname>. For example, to remove the devalias named mydisk, type

ok nvunalias mydisk

The alias named mydisk will no longer be listed after the next OpenBoot reset.

The nvedit Line Editor

Optionally, you can use nvedit to create your device aliases. On systems with a PROM version of 1.x or 2.x, the nvalias command might not be available and you must use nvedit to create custom device aliases. nvedit is an OpenBoot line editor that edits the NVRAMRC directly, has a set of editing commands, and operates in a temporary buffer. The following is a sample nvedit session:

ok setenv use-nvramrc? true

The system responds with the following:

use-nvramrc? =  true
ok nvedit

 0: devalias bootdisk /pci@1f,0/pci@1,1/ide@3/disk@0,0
1: <Control-C>
ok nvstore
ok reset-all
 Resetting ......
ok boot bootdisk

The preceding example uses nvedit to create a permanent device alias named bootdisk. The example uses Ctrl+C to exit the editor. It also uses the nvstore command to make the change permanent in the NVRAMRC. Then, it issues the reset-all command to reset the system and then boots the system from bootdisk by using the boot bootdisk command.

Table 3.10 lists some of the basic commands you can use while in the nvedit line editor.

Table 3.10 nvedit Commands

Command

Meaning

Ctrl+A

Moves backward to beginning of the line.

Ctrl+B

Moves backward one character.

Esc+B

Moves backward one word.

Ctrl+C

Exits the script editor, returning to the OpenBoot command interpreter. The temporary buffer is preserved but is not written back to the script. You use nvstore afterward to write it back.

Ctrl+D

Erases the next character.

Esc+D

Erases from the cursor to the end of the word, storing the erased characters in a save buffer.

Ctrl+E

Moves forward to the end of the line.

Ctrl+F

Moves forward one character.

Esc+F

Moves forward one word.

Ctrl+H

Erases the previous character.

Esc+H

Erases from the beginning of the word to just before the cursor, storing erased characters in a save buffer.

Ctrl+K

Erases from the cursor position to the end of the line, storing the erased characters in a save buffer. If at the end of a line, it joins the next line to the current line (that is, deletes the new line).

Ctrl+L

Displays the entire contents of the editing buffer.

Ctrl+N

Moves to the next line of the script-editing buffer.

Ctrl+O

Inserts a new line at the cursor position and stays on the current line.

Ctrl+P

Moves to the previous line of the script-editing buffer.

Ctrl+Q

Quotes the next character (that is, allows you to insert control characters).

Ctrl+R

Retypes the line.

Ctrl+U

Erases the entire line, storing the erased characters in a save buffer.

Ctrl+W

Erases from the beginning of the word to just before the cursor, storing erased characters in a save buffer.

Ctrl+Y

Inserts the contents of the save buffer before the cursor.

Return (Enter)

Inserts a new line at the cursor position and advances to the next line.

Delete

Erases the previous character.

Backspace

Erases the previous character.

  • + Share This
  • 🔖 Save To Your Account

InformIT Promotional Mailings & Special Offers

I would like to receive exclusive offers and hear about products from InformIT and its family of brands. I can unsubscribe at any time.

Overview


Pearson Education, Inc., 221 River Street, Hoboken, New Jersey 07030, (Pearson) presents this site to provide information about products and services that can be purchased through this site.

This privacy notice provides an overview of our commitment to privacy and describes how we collect, protect, use and share personal information collected through this site. Please note that other Pearson websites and online products and services have their own separate privacy policies.

Collection and Use of Information


To conduct business and deliver products and services, Pearson collects and uses personal information in several ways in connection with this site, including:

Questions and Inquiries

For inquiries and questions, we collect the inquiry or question, together with name, contact details (email address, phone number and mailing address) and any other additional information voluntarily submitted to us through a Contact Us form or an email. We use this information to address the inquiry and respond to the question.

Online Store

For orders and purchases placed through our online store on this site, we collect order details, name, institution name and address (if applicable), email address, phone number, shipping and billing addresses, credit/debit card information, shipping options and any instructions. We use this information to complete transactions, fulfill orders, communicate with individuals placing orders or visiting the online store, and for related purposes.

Surveys

Pearson may offer opportunities to provide feedback or participate in surveys, including surveys evaluating Pearson products, services or sites. Participation is voluntary. Pearson collects information requested in the survey questions and uses the information to evaluate, support, maintain and improve products, services or sites, develop new products and services, conduct educational research and for other purposes specified in the survey.

Contests and Drawings

Occasionally, we may sponsor a contest or drawing. Participation is optional. Pearson collects name, contact information and other information specified on the entry form for the contest or drawing to conduct the contest or drawing. Pearson may collect additional personal information from the winners of a contest or drawing in order to award the prize and for tax reporting purposes, as required by law.

Newsletters

If you have elected to receive email newsletters or promotional mailings and special offers but want to unsubscribe, simply email information@informit.com.

Service Announcements

On rare occasions it is necessary to send out a strictly service related announcement. For instance, if our service is temporarily suspended for maintenance we might send users an email. Generally, users may not opt-out of these communications, though they can deactivate their account information. However, these communications are not promotional in nature.

Customer Service

We communicate with users on a regular basis to provide requested services and in regard to issues relating to their account we reply via email or phone in accordance with the users' wishes when a user submits their information through our Contact Us form.

Other Collection and Use of Information


Application and System Logs

Pearson automatically collects log data to help ensure the delivery, availability and security of this site. Log data may include technical information about how a user or visitor connected to this site, such as browser type, type of computer/device, operating system, internet service provider and IP address. We use this information for support purposes and to monitor the health of the site, identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents and appropriately scale computing resources.

Web Analytics

Pearson may use third party web trend analytical services, including Google Analytics, to collect visitor information, such as IP addresses, browser types, referring pages, pages visited and time spent on a particular site. While these analytical services collect and report information on an anonymous basis, they may use cookies to gather web trend information. The information gathered may enable Pearson (but not the third party web trend services) to link information with application and system log data. Pearson uses this information for system administration and to identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents, appropriately scale computing resources and otherwise support and deliver this site and its services.

Cookies and Related Technologies

This site uses cookies and similar technologies to personalize content, measure traffic patterns, control security, track use and access of information on this site, and provide interest-based messages and advertising. Users can manage and block the use of cookies through their browser. Disabling or blocking certain cookies may limit the functionality of this site.

Do Not Track

This site currently does not respond to Do Not Track signals.

Security


Pearson uses appropriate physical, administrative and technical security measures to protect personal information from unauthorized access, use and disclosure.

Children


This site is not directed to children under the age of 13.

Marketing


Pearson may send or direct marketing communications to users, provided that

  • Pearson will not use personal information collected or processed as a K-12 school service provider for the purpose of directed or targeted advertising.
  • Such marketing is consistent with applicable law and Pearson's legal obligations.
  • Pearson will not knowingly direct or send marketing communications to an individual who has expressed a preference not to receive marketing.
  • Where required by applicable law, express or implied consent to marketing exists and has not been withdrawn.

Pearson may provide personal information to a third party service provider on a restricted basis to provide marketing solely on behalf of Pearson or an affiliate or customer for whom Pearson is a service provider. Marketing preferences may be changed at any time.

Correcting/Updating Personal Information


If a user's personally identifiable information changes (such as your postal address or email address), we provide a way to correct or update that user's personal data provided to us. This can be done on the Account page. If a user no longer desires our service and desires to delete his or her account, please contact us at customer-service@informit.com and we will process the deletion of a user's account.

Choice/Opt-out


Users can always make an informed choice as to whether they should proceed with certain services offered by InformIT. If you choose to remove yourself from our mailing list(s) simply visit the following page and uncheck any communication you no longer want to receive: www.informit.com/u.aspx.

Sale of Personal Information


Pearson does not rent or sell personal information in exchange for any payment of money.

While Pearson does not sell personal information, as defined in Nevada law, Nevada residents may email a request for no sale of their personal information to NevadaDesignatedRequest@pearson.com.

Supplemental Privacy Statement for California Residents


California residents should read our Supplemental privacy statement for California residents in conjunction with this Privacy Notice. The Supplemental privacy statement for California residents explains Pearson's commitment to comply with California law and applies to personal information of California residents collected in connection with this site and the Services.

Sharing and Disclosure


Pearson may disclose personal information, as follows:

  • As required by law.
  • With the consent of the individual (or their parent, if the individual is a minor)
  • In response to a subpoena, court order or legal process, to the extent permitted or required by law
  • To protect the security and safety of individuals, data, assets and systems, consistent with applicable law
  • In connection the sale, joint venture or other transfer of some or all of its company or assets, subject to the provisions of this Privacy Notice
  • To investigate or address actual or suspected fraud or other illegal activities
  • To exercise its legal rights, including enforcement of the Terms of Use for this site or another contract
  • To affiliated Pearson companies and other companies and organizations who perform work for Pearson and are obligated to protect the privacy of personal information consistent with this Privacy Notice
  • To a school, organization, company or government agency, where Pearson collects or processes the personal information in a school setting or on behalf of such organization, company or government agency.

Links


This web site contains links to other sites. Please be aware that we are not responsible for the privacy practices of such other sites. We encourage our users to be aware when they leave our site and to read the privacy statements of each and every web site that collects Personal Information. This privacy statement applies solely to information collected by this web site.

Requests and Contact


Please contact us about this Privacy Notice or if you have any requests or questions relating to the privacy of your personal information.

Changes to this Privacy Notice


We may revise this Privacy Notice through an updated posting. We will identify the effective date of the revision in the posting. Often, updates are made to provide greater clarity or to comply with changes in regulatory requirements. If the updates involve material changes to the collection, protection, use or disclosure of Personal Information, Pearson will provide notice of the change through a conspicuous notice on this site or other appropriate way. Continued use of the site after the effective date of a posted revision evidences acceptance. Please contact us if you have questions or concerns about the Privacy Notice or any objection to any revisions.

Last Update: November 17, 2020