]> git.saurik.com Git - apple/system_cmds.git/blame - nvram.tproj/nvram.8
system_cmds-230.7.tar.gz
[apple/system_cmds.git] / nvram.tproj / nvram.8
CommitLineData
1815bff5
A
1.\"
2.\" Copyright (c) 2000 Apple Computer, Inc. All rights reserved.
3.\"
4.TH nvram 8 "December 12, 2000"
5.SH NAME
6nvram \- 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
20The
21.I nvram
22command allows manipulation of Open Firmware NVRAM variables. It
23can be used to get or set a variable. It can also be used to print
24all of the variables or set a list of variables from a file.
25.LP
26In principle,
27.IR name
28can be any string. In practice, not all strings will be accepted.
29Old world machines have a fixed set of Open Firmware variables.
b51d5b5f
A
30New World machines can create new variables as desired. Some variables
31require administrator privilege to get or set.
1815bff5
A
32.LP
33The given
34.IR value
35must match the data type required for
36.IR name .
37Binary data can be set using the %xx notation, where xx is the hex
38value of the byte. The type for new variables is always binary
39data.
40.LP
41Two Open Firmware variables have special treatment on old world
42machines:
43.IR boot-command
44and
45.IR boot-args .
46As long as
47.IR boot-command
48starts with "# bootr," the
49.IR boot-args
50variable will be present. Getting or setting
51.IR boot-args
52will get or set the
53.IR boot-command
54while preserving the "# bootr". In most cases when setting boot arguments
55for the kernel, there is no need to test for old world and set
56.IR boot-command .
57Instead set
58.IR boot-args
59with the desired arguments.
60.SH OPTIONS
61.TP
62.B \-p
63Print all of the Open Firmware variables.
64.TP
65.BI \-f " filename"
66Set Open Firmware variables from a text file. The file must be a
67list name=value statements. If the last character of a line is
68\\, the value will be continued to the next line.
69.SH EXAMPLES
70.LP
71.RS
72example% nvram boot-args="-s rd=*hd:10"
73.RE
74.LP
b51d5b5f 75Set the boot-args variable to "-s rd=*hd:10". This would specify
1815bff5
A
76single user mode with the root device in hard drive partition 10.
77.LP
78.RS
79example% nvram my-variable="String One%00String Two%00%00"
80.RE
81.LP
b51d5b5f 82Create a new variable, my-variable, containing a list of two
1815bff5
A
83C-strings that is terminated by a NUL.
84.SH FILES
85.PD 0
86.TP 30
87.B /usr/share/nvram
88Files containing patches for old world machines.
89.PD