]> git.saurik.com Git - apple/system_cmds.git/blame - nvram.tproj/nvram.8
system_cmds-336.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
A
43.SH OPTIONS
44.TP
45.B \-p
4c00c0ae 46Print all of the firmware variables.
1815bff5
A
47.TP
48.BI \-f " filename"
4c00c0ae 49Set firmware variables from a text file. The file must be a
1815bff5
A
50list name=value statements. If the last character of a line is
51\\, the value will be continued to the next line.
83f6dbe8
A
52.TP
53.BI \-d " name"
4c00c0ae 54Deletes the named firmware variable.
1815bff5
A
55.SH EXAMPLES
56.LP
57.RS
58example% nvram boot-args="-s rd=*hd:10"
59.RE
60.LP
b51d5b5f 61Set the boot-args variable to "-s rd=*hd:10". This would specify
1815bff5
A
62single user mode with the root device in hard drive partition 10.
63.LP
64.RS
65example% nvram my-variable="String One%00String Two%00%00"
66.RE
67.LP
b51d5b5f 68Create a new variable, my-variable, containing a list of two
1815bff5 69C-strings that is terminated by a NUL.
83f6dbe8
A
70.LP
71.RS
72example% nvram -d my-variable
73.RE
74.LP
75Deletes the variable named my-variable.
1815bff5 76.PD