]> git.saurik.com Git - apple/system_cmds.git/blob - nvram.tproj/nvram.8
system_cmds-279.tar.gz
[apple/system_cmds.git] / nvram.tproj / nvram.8
1 .\"
2 .\" Copyright (c) 2000 Apple Computer, Inc. All rights reserved.
3 .\"
4 .TH nvram 8 "December 12, 2000"
5 .SH NAME
6 nvram \- manipulate Open Firmware NVRAM variables
7 .SH SYNOPSIS
8 .B nvram
9 [
10 .B -p
11 ] [
12 .B -f
13 .IR filename
14 ] [
15 .IR name
16 ] [=
17 .IR value
18 ] ...
19 .SH DESCRIPTION
20 The
21 .I nvram
22 command allows manipulation of Open Firmware NVRAM variables. It
23 can be used to get or set a variable. It can also be used to print
24 all of the variables or set a list of variables from a file.
25 Changes to NVRAM variables are only saved by clean restart or shutdown.
26 .LP
27 In principle,
28 .IR name
29 can be any string. In practice, not all strings will be accepted.
30 New World machines can create new variables as desired. Some variables
31 require administrator privilege to get or set.
32 .LP
33 The given
34 .IR value
35 must match the data type required for
36 .IR name .
37 Binary data can be set using the %xx notation, where xx is the hex
38 value of the byte. The type for new variables is always binary
39 data.
40 .SH OPTIONS
41 .TP
42 .B \-p
43 Print all of the Open Firmware variables.
44 .TP
45 .BI \-f " filename"
46 Set Open Firmware variables from a text file. The file must be a
47 list name=value statements. If the last character of a line is
48 \\, the value will be continued to the next line.
49 .SH EXAMPLES
50 .LP
51 .RS
52 example% nvram boot-args="-s rd=*hd:10"
53 .RE
54 .LP
55 Set the boot-args variable to "-s rd=*hd:10". This would specify
56 single user mode with the root device in hard drive partition 10.
57 .LP
58 .RS
59 example% nvram my-variable="String One%00String Two%00%00"
60 .RE
61 .LP
62 Create a new variable, my-variable, containing a list of two
63 C-strings that is terminated by a NUL.
64 .PD