]> git.saurik.com Git - apple/system_cmds.git/blob - nvram.tproj/nvram.8
system_cmds-433.8.tar.gz
[apple/system_cmds.git] / nvram.tproj / nvram.8
1 .\"
2 .\" Copyright (c) 2000-2003 Apple Computer, Inc. All rights reserved.
3 .\"
4 .TH nvram 8 "October 28, 2003"
5 .SH NAME
6 nvram \- manipulate firmware NVRAM variables
7 .SH SYNOPSIS
8 .B nvram
9 [
10 .B -p
11 ] [
12 .B -f
13 .IR filename
14 ] [
15 .B -d
16 .IR name
17 ] [
18 .IR name
19 [=
20 .IR value
21 ]] ...
22 .SH DESCRIPTION
23 The
24 .I nvram
25 command allows manipulation of firmware NVRAM variables. It
26 can be used to get or set a variable. It can also be used to print
27 all of the variables or set a list of variables from a file.
28 Changes to NVRAM variables are only saved by clean restart or shutdown.
29 .LP
30 In principle,
31 .IR name
32 can be any string. In practice, not all strings will be accepted.
33 New World machines can create new variables as desired. Some variables
34 require administrator privilege to get or set.
35 .LP
36 The given
37 .IR value
38 must match the data type required for
39 .IR name .
40 Binary data can be set using the %xx notation, where xx is the hex
41 value of the byte. The type for new variables is always binary
42 data.
43 .SH OPTIONS
44 .\" ==========
45 .TP
46 .BI \-d " name"
47 Deletes the named firmware variable.
48 .\" ==========
49 .TP
50 .BI \-f " filename"
51 Set firmware variables from a text file. The file must be a
52 list of "name value" statements. The first space on each line
53 is taken to be the separator between "name" and "value". If
54 the last character of a line is \\, the value extends to the next line.
55 .\" ==========
56 .TP
57 .B \-x
58 Use XML format for reading and writing variables.
59 This option must be used before the
60 .B \-p
61 or
62 .B \-f
63 options, since arguments are processed in order.
64 .TP
65 .B \-p
66 Print all of the firmware variables.
67 .SH EXAMPLES
68 .LP
69 .RS
70 example% nvram boot-args="-s rd=*hd:10"
71 .RE
72 .LP
73 Set the boot-args variable to "-s rd=*hd:10". This would specify
74 single user mode with the root device in hard drive partition 10.
75 .LP
76 .RS
77 example% nvram my-variable="String One%00String Two%00%00"
78 .RE
79 .LP
80 Create a new variable, my-variable, containing a list of two
81 C-strings that is terminated by a NUL.
82 .LP
83 .RS
84 example% nvram -d my-variable
85 .RE
86 .LP
87 Deletes the variable named my-variable.
88 .PD