Booting into Open Firmware

Boot into your machine's Open Firmware my restarting and holding the keys Command + Option + O + F
 

Resetting Open Firmware

When making changes to the NVRAMRC you can come across some unintended results, or your machine may no longer boot. If you corrupt the NVRAM your machine may be unbootable and Command + Option + P + R won't work.

To re-load Open Firmware's defaults follow these steps:

Desktops

  • When your machine is off hold the power button - you will hear the "programmer's tone", but keep holding.
  • Keep holding the power button, you will hear a boot chime and the system will enter Open Firmware with the defaults loaded.
  • Run the command reset-nvram.

Portables

  • Hold the Power + Apple key - you will hear the "programmer's tone", but keep holding.
  • Keep holding the power button, you will hear a boot chime and the system will enter Open Firmware with the defaults loaded.
  • Run the command reset-nvram.

Thank you to darthnVader from MacOS9Lives for the above tips.

If you come across any other problems the following commands can help:

reset-nvram
set-defaults
reset-all

 

Open Firmware Commands

Help

  • help - List main help categories.
  • help [category] - Show help for all commands in the category. Use only the first word of the category description.
  • help [command] - Show help for individual command (where available).

Device Aliases

  • devalias - Display all current device alias names for key hardware devices.
  • devalias [alias] - Display the device path name corresponding to alias.
  • devalias [alias device-path] - Define an alias representing the device path. If an alias with the same name already exists, the new value supersedes the old.

Device Tree Browsing

  • .properties - Display the names and values of the current node’s properties.
  • dev [device-path] - Select the indicated device node, making it the current node.
  • dev [node-name] - Search for a node with the given name in the subtree below the current node, and select the first such node found.
  • dev .. - Select the device node that is the parent of the current node.
  • dev / - Select the root machine node.
  • device-end - De-select the current device node, leaving no node selected.
  • ls - Display the names of the current node’s children.
  • pwd - Display the device path name that names the current node.
  • show-devs [device-path] - Display all the devices known to the system directly beneath a given level in the device hierarchy. (Without a device-path, it shows the entire device tree.)
  • words - Display the names of the current node’s methods/forth scripts.
  • see - Displays the source code for a particular forth script.
  • sift-devs [ccc] - Search all device nodes and show all method names that contain the sequence of characters ccc.

NVRAMRC Script Editor

  • nvedit - Enter the NVRAMRC editor. If data remains in the temporary buffer from a previous nvedit session, resume editing those previous contents. If not, read the contents of NVRAMRC into the temporary buffer and begin editing it.
    Press Control + C to exit the NVRAMRC editor.
  • nvalias [alias device-path] - Define a persistent alias (stored in NVRAM). The alias persists until the nvunalias or set-defaults commands are executed.
  • nvunalias [alias] - Delete a persistent alias from NVRAM.
  • nvrun - Execute the contents of the temporary buffer.

Configuration Variable Commands

  • printenv [variable] - If variable is given, show its current value. Otherwise show all configuration variables and their current and default values.
  • setenv [variable value] - Set variable to the given decimal or text value. Changes are permanent, but sometimes they only take effect after a reset. Some systems let you create new user-defined configuration variables.
  • set-default [variable] - Set variable to its default value.
  • set-defaults - Set all configuration variables to their default values.
  • unsetenv [variable] - Delete a user-defined configuration variable.
  • nvramrc - Contents of NVRAMRC script.
  • use-nvramrc? [true/false] - If true, execute commands in NVRAMRC during system start-up.

Diagnostics

  • probe-scsi - Identify devices attached to the built-in SCSI bus.
  • probe-scsi-all [device-path] - Perform probe-scsi on all SCSI buses installed in the system below the specified node. (If device-path is absent, the root node is used.)
  • diag-switch? [true/false] - If true, run in diagnostic mode.
  • selftest-[#megs] - Megabytes of RAM to test. Ignored if diag-switch? is true.
  • test [device-specifier] - Execute the specified device’s self-test method.
    Examples:
    test floppy - test the floppy drive, if installed.
    test /memory - test number of megabytes specified in selftest-#megs; or test all of memory if diag-switch? is true.
    test net - test the network connection.
  • test-all [device-specifier] Test all devices (that have a built-in self-test method) below the specified node. (If device-specifier is absent, the root node is used.)
  • watch-clock - Test the clock function.
  • watch-net - Monitor the network connection passively. Displays a period for each packet received.

File Loading

  • source - Executes a particular forth script.
  • load - Loads a image from disk, cd, network or another device.
  • go - Begin executing a previously-loaded binary program, or resume executing an interrupted program. (Called automatically by boot .)
  • byte-load [adr span --] - Interpret a loaded FCode binary file. span is usually 1.
  • dl - Load a Forth file over a serial line with TIP and interpret. Type:~C cat filename^-D
  • dlbin - Load a binary file over a serial line with TIP. Type: ~C cat filename
  • dload [filename] - Load specified file over Ethernet at given address.
  • init-program - Prepare a loaded program for execution. (Called automatically by load and boot.)
  • load-base - Address where load first places the data it reads from a device. The program image may be moved elsewhere as init-program prepares it for execution.

Resources

  • IEEE Standard for Boot (Initialization Configuration)Firmware: Core Requirements and Practices - Download
  • PPC Open Firmware IEE 1275-1994 - Download