Man pages sections > man8 > nvsetenv

nvsetenv - change/view Open Firmware environment variables

NVSETENV(8) System Manager's Manual NVSETENV(8)


nvsetenv - change/view Open Firmware environment variables


nvsetenv [variable [value ]]


nvsetenv is a program to adjust or view the Open Firmware (OF) boot parameters stored in non-volatile (battery-powered) RAM. nvsetenv will show the current values of all OF's environment variables when no parameters are given.


nvsetenv will show current value of an OF's variable, if no value is given
variable value
nvsetenv will set variable to value


This example will set the boot device to the first SCSI disk on the internal SCSI bus, using /vmlinux as boot image, trying to use the third partition as root partition.
        > nvsetenv boot-device  "scsi-int/sd@0:0"
        > nvsetenv boot-file    " /vmlinux root=/dev/sda3"
Alternatives boot devices are:
        scsi/sd@1:0             SCSI disk at ID 1
        ata/ata-disk@0:0        Internal IDE disk
You can also boot from a floppy, you need a XCOFF-format kernel image (in this example: vmlinux.coff), copied to a HFS format high-density (1.44Mb) floppy.
        > nvsetenv boot-device  "fd:vmlinux.coff"
        > nvsetenv boot-file    " root=/dev/sda3"
To return to MacOS, do:
        > nvsetenv boot-device  "/AAPL,ROM"
Valid values for "input-devices" are:
        ttya                    Modem serial port
        ttyb                    Printer serial port
        kbd                     Keyboard
        enet                    Ethernet interface
Valid values for "output-devices" are (machine and/or OF dependent):
        screen                  Screen display (newer machines)
        /chaos/control          Screen display (7500, 7600 and 8500)
        /bandit/ATY,264GT-B     Screen display (6500)
OF is not designed to wait for your hard disk to spin up (remember MacOS boots from ROM). Use the following setting to have OF retry to boot from your disk until is has spun up:
        > nvsetenv boot-command "begin ['] boot catch 1000 ms cr again"
You only have to append an "S" to the "boot-file" variable to boot Linux in single user mode.
You can use install your own nvramrc patch using the following command:
        > nvsetenv nvramrc "`cat file.patch`"
(please note the backticks!), or:
        > nvsetenv nvramrc "$(cat file.patch)"


character device with major number 10 and minor number 144
to identify New/Old-World machines




Paul Mackerras <> (program)
Richard van Hees <> (documentation)
Klaus Halfmann  <> (NewWorld code)
Debian Sid