Go to main content

Oracle® OpenBoot 4.x Administration Guide

Exit Print View

Updated: June 2020
 
 

NVRAMRC Overview

You can use the nvramrc configuration variable to store user-defined FORTH commands that are executed during start-up. Commands are stored in ASCII, just as you would type them at the console.

The contents of the variable are called the NVRAMRC script.

The NVRAMRC script can be used to save start-up configuration variables, to patch device driver code, or to define installation-specific device configurations. It can also be used for bug patches or for user-installed extensions.

You can use the NVRAMRC script to create an alias for a device (see Create a Device Alias).

The custom start-up script occupies the portion of configuration memory that is not dedicated to other purposes such as configuration variables. The size of custom start-up script is determined by an implementation and is usually up to 1024 characters long.

While it is possible to alter the contents of the NVRAMRC script with setenv or the $setenv command, use of the NVRAMRC script editor (nvedit) is preferred.

The contents of the NVRAMRC script are cleared by set-defaults. Under some circumstances cleared contents can be recovered with nvrecover.

If the use-nvramrc? configuration variable is true, the NVRAMRC script is evaluated during the OpenBoot start-up sequence as shown:

  1. Perform virtual machine initialization.

  2. Evaluate the script (if use-nvramrc? is true).

  3. Execute probe-all (evaluate FCode).

  4. Execute install-console.

  5. Execute banner.

  6. Execute secondary diagnostics.

  7. Perform default boot (if auto-boot? is true and auto-boot is enabled).

It is sometimes desirable to modify the sequence of probe-all, install-console, and banner. For example, commands that modify the characteristics of plug-in display devices might need to be executed after the plug-in devices have been probed, but before the console device has been selected. Such commands would need to be executed between probe-all and install-console. Commands that display output on the console would need to be placed after install-console or banner.

This is accomplished by creating a custom script which contains either banner or suppress-banner because the sequence probe-all install-console banner is not executed if either banner or suppress-banner is executed from the NVRAMRC script. This allows the use of probe-all, install-console, and banner inside the NVRAMRC script, possibly interspersed with other commands, without having those commands re-executed after the NVRAMRC script finishes.

Most OpenBoot commands can be used in the NVRAMRC script except for these commands:

  • boot

  • go

  • nvedit

  • password

  • reset-all

  • setenv security-mode


Caution

Caution  -  The Verified Boot policy setting of enforce does not allow the boot process to proceed if the OpenBoot use-nvramrc? variable is set to true. You can directly set the use-nvramrc? variable with the setenv command, or the variable is automatically set to true when you use the nvalias command. If you set the use-nvramrc? variable to false, you will not be able to create device aliases with the nvalias command. For further details, refer to https://docs.oracle.com/cd/E37444_01/html/E37446/z40001291613819.html.


Related Information