]>
Commit | Line | Data |
---|---|---|
1815bff5 A |
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 | .LP | |
26 | In principle, | |
27 | .IR name | |
28 | can be any string. In practice, not all strings will be accepted. | |
29 | Old world machines have a fixed set of Open Firmware variables. | |
b51d5b5f A |
30 | New World machines can create new variables as desired. Some variables |
31 | require administrator privilege to get or set. | |
1815bff5 A |
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 | .LP | |
41 | Two Open Firmware variables have special treatment on old world | |
42 | machines: | |
43 | .IR boot-command | |
44 | and | |
45 | .IR boot-args . | |
46 | As long as | |
47 | .IR boot-command | |
48 | starts with "# bootr," the | |
49 | .IR boot-args | |
50 | variable will be present. Getting or setting | |
51 | .IR boot-args | |
52 | will get or set the | |
53 | .IR boot-command | |
54 | while preserving the "# bootr". In most cases when setting boot arguments | |
55 | for the kernel, there is no need to test for old world and set | |
56 | .IR boot-command . | |
57 | Instead set | |
58 | .IR boot-args | |
59 | with the desired arguments. | |
60 | .SH OPTIONS | |
61 | .TP | |
62 | .B \-p | |
63 | Print all of the Open Firmware variables. | |
64 | .TP | |
65 | .BI \-f " filename" | |
66 | Set Open Firmware variables from a text file. The file must be a | |
67 | list 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 | |
72 | example% nvram boot-args="-s rd=*hd:10" | |
73 | .RE | |
74 | .LP | |
b51d5b5f | 75 | Set the boot-args variable to "-s rd=*hd:10". This would specify |
1815bff5 A |
76 | single user mode with the root device in hard drive partition 10. |
77 | .LP | |
78 | .RS | |
79 | example% nvram my-variable="String One%00String Two%00%00" | |
80 | .RE | |
81 | .LP | |
b51d5b5f | 82 | Create a new variable, my-variable, containing a list of two |
1815bff5 A |
83 | C-strings that is terminated by a NUL. |
84 | .SH FILES | |
85 | .PD 0 | |
86 | .TP 30 | |
87 | .B /usr/share/nvram | |
88 | Files containing patches for old world machines. | |
89 | .PD |