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