nvram.8   [plain text]

.\" Copyright (c) 2000 Apple Computer, Inc.  All rights reserved.
.TH nvram 8 "December 12, 2000"
nvram \- manipulate Open Firmware NVRAM variables
.B nvram
.B -p
] [
.B -f 
.IR filename
] [
.IR name
] [=
.IR value
] ...
.I nvram
command allows manipulation of Open Firmware NVRAM variables.  It
can be used to get or set a variable.  It can also be used to print
all of the variables or set a list of variables from a file.
In principle,
.IR name
can be any string.  In practice, not all strings will be accepted.
Old world machines have a fixed set of Open Firmware variables.
New World machines can create new variables as desired.  Some variables
require administrator privilege to get or set.
The given
.IR value
must match the data type required for
.IR name .
Binary data can be set using the %xx notation, where xx is the hex
value of the byte.  The type for new variables is always binary
Two Open Firmware variables have special treatment on old world
.IR boot-command
.IR boot-args .
As long as
.IR boot-command
starts with "# bootr," the
.IR boot-args
variable will be present.  Getting or setting
.IR boot-args
will get or set the
.IR boot-command
while preserving the "# bootr".  In most cases when setting boot arguments 
for the kernel, there is no need to test for old world and set
.IR boot-command .
Instead set
.IR boot-args
with the desired arguments.
.B \-p
Print all of the Open Firmware variables.
.BI \-f " filename"
Set Open Firmware variables from a text file.  The file must be a
list name=value statements.  If the last character of a line is
\\, the value will be continued to the next line.
example% nvram boot-args="-s rd=*hd:10"
Set the boot-args variable to "-s rd=*hd:10".  This would specify
single user mode with the root device in hard drive partition 10.
example% nvram my-variable="String One%00String Two%00%00"
Create a new variable, my-variable, containing a list of two
C-strings that is terminated by a NUL.
.PD 0
.TP 30
.B /usr/share/nvram
Files containing patches for old world machines.