Annotation of /trunk/grubby/grubby.8
Parent Directory | Revision Log
Revision 1720 -
(hide annotations)
(download)
Sat Feb 18 00:51:28 2012 UTC (12 years, 7 months ago) by niro
File size: 8130 byte(s)
Sat Feb 18 00:51:28 2012 UTC (12 years, 7 months ago) by niro
File size: 8130 byte(s)
Add new '--default-index' feature. This displays the (numeric) index of the default entry directly from the parsed configuration file. Signed-off-by: Cleber Rosa <crosa@redhat.com>
1 | niro | 532 | .TH GRUBBY 8 "Tue Jan 18 2005" |
2 | .SH NAME | ||
3 | grubby \- command line tool for configuring grub, lilo, and elilo | ||
4 | |||
5 | .SH SYNOPSIS | ||
6 | \fBgrubby\fR [--add-kernel=\fIkernel-path\fR] [--args=\fIargs\fR] | ||
7 | [--bad-image-okay] [--boot-filesystem=\fIbootfs\fR] | ||
8 | niro | 1720 | [--bootloader-probe] [--config-file \fIpath\fR] [--copy-default] |
9 | [--default-kernel] [--default-index] | ||
10 | niro | 532 | [--grub] [--lilo] [--yaboot] [--silo] [--zipl] |
11 | [--info=\fIkernel-path\fR] [--initrd=\fIinitrd-path\fR] | ||
12 | [--make-default] [-o path] [--version] | ||
13 | [--remove-kernel=\fIkernel-path\fR] [--remove-args=\fIargs\fR] | ||
14 | [--set-default=\fIkernel-path\fR] [--title=entry-title] | ||
15 | [--add-multiboot=\fImultiboot-path\fR] [--mbargs=\fIargs\fR] | ||
16 | [--remove-multiboot=\fImultiboot-path\fR] [--remove-mbargs=\fIargs\fR] | ||
17 | |||
18 | .SH DESCRIPTION | ||
19 | \fBgrubby\fR is a command line tool for updating and displaying information | ||
20 | about the configuration files for the \fBgrub\fR, \fBlilo\fR, \fBelilo\fR | ||
21 | (ia64), \fByaboot\fR (powerpc) and \fBzipl\fR (s390) boot loaders. It | ||
22 | is primarily designed to be used from scripts which install new | ||
23 | kernels and need to find information about the current boot environment. | ||
24 | |||
25 | On Intel x86 platforms, \fBgrub\fR is the default bootloader and the | ||
26 | configuration file is in \fB/boot/grub/grub.conf\fR. On Intel ia64 platforms, | ||
27 | \fBelilo\fR mode is used and the default location for the configuration file | ||
28 | is \fB/boot/grub/grub.conf\fR. On PowerPC platforms, \fByaboot\fR parsing | ||
29 | is used and the configuration file should be in \fB/etc/yaboot.conf\fR. | ||
30 | |||
31 | There are a number of ways to specify the kernel used for \fB-\-info\fR, | ||
32 | \fB-\-remove-kernel\fR, and \fB-\-update-kernel\fR. Specificying \fBDEFAULT\fR | ||
33 | or \fBALL\fR selects the default entry and all of the entries, respectively. | ||
34 | If a comma separated list of numbers is given, the boot entries indexed | ||
35 | by those numbers are selected. Finally, the title of a boot entry may | ||
36 | be specified by using \fBTITLE=\fItitle\fR as the argument; all entries | ||
37 | with that title are used. | ||
38 | |||
39 | .SH OPTIONS | ||
40 | .TP | ||
41 | \fB-\-add-kernel\fR=\fIkernel-path\fR | ||
42 | Add a new boot entry for the kernel located at \fIkernel-path\fR. | ||
43 | |||
44 | .TP | ||
45 | \fB-\-args\fR=\fIkernel-args\fR | ||
46 | When a new kernel is added, this specifies the command line arguments | ||
47 | which should be passed to the kernel by default (note they are merged | ||
48 | with the arguments from the template if \fB-\-copy-default\fR is used). | ||
49 | When \fB-\-update-kernel\fR is used, this specifies new arguments to add | ||
50 | to the argument list. Multiple, space separated arguments may be used. If | ||
51 | an argument already exists the new value replaces the old values. The | ||
52 | \fBroot=\fR kernel argument gets special handling if the configuration | ||
53 | file has special handling for specifying the root filesystem (like | ||
54 | lilo.conf does). | ||
55 | |||
56 | .TP | ||
57 | \fB-\-bad-image-okay\fR | ||
58 | When \fBgrubby\fR is looking for a entry to use for something (such | ||
59 | as a template or a default boot entry) it uses sanity checks, such as | ||
60 | ensuring that the kernel exists in the filesystem, to make sure | ||
61 | entries that obviously won't work aren't selected. This option overrides | ||
62 | that behavior, and is designed primarily for testing. | ||
63 | |||
64 | .TP | ||
65 | \fB-\-boot-filesystem\fR=\fIbootfs\fR | ||
66 | The \fBgrub\fR boot loader expects file paths listed in it's configuration | ||
67 | path to be relative to the top of the filesystem they are on, rather then | ||
68 | relative to the current root filesystem. By default \fBgrubby\fR searches | ||
69 | the list of currently mounted filesystems to determine this. If this option | ||
70 | is given \fBgrubby\fR acts as if the specified filesystem was the filesystem | ||
71 | containing the kernel (this option is designed primarily for testing). | ||
72 | |||
73 | .TP | ||
74 | \fB-\-bootloader-probe\fR | ||
75 | \fBgrubby\fR tries to determine if \fBgrub\fR or \fBlilo\fR is currently | ||
76 | installed. When one of those bootloaders is found the name of that bootloader | ||
77 | is displayed on stdout. Both could be installed (on different devices), and | ||
78 | grubby will print out the names of both bootloaders, one per line. The probe | ||
79 | for \fBgrub\fR requires a commented out boot directive \fBgrub.conf\fR | ||
80 | identical to the standard directive in the lilo configuration file. If this | ||
81 | is not present \fBgrubby\fR will assume grub is not installed (note | ||
82 | that \fBanaconda\fR places this directive in \fBgrub.conf\fR files it creates). | ||
83 | This option is only available on ia32 platforms. | ||
84 | |||
85 | |||
86 | .TP | ||
87 | \fB-\-config-file\fR=\fIpath\fR | ||
88 | Use \fIpath\fR as the configuration file rather then the default. | ||
89 | |||
90 | .TP | ||
91 | \fB-\-copy-default\fR | ||
92 | \fBgrubby\fR will copy as much information (such as kernel arguments and | ||
93 | root device) as possible from the current default kernel. The kernel path | ||
94 | and initrd path will never be copied. | ||
95 | |||
96 | .TP | ||
97 | \fB-\-default-kernel\fR | ||
98 | Display the full path to the current default kernel and exit. | ||
99 | |||
100 | .TP | ||
101 | niro | 1720 | \fB-\-default-index\fR |
102 | Display the numeric index of the current default boot entry and exit. | ||
103 | |||
104 | .TP | ||
105 | niro | 532 | \fB-\-elilo\fR |
106 | Use an \fBelilo\fR style configuration file. | ||
107 | |||
108 | .TP | ||
109 | \fB-\-grub\fR | ||
110 | Use a \fBgrub\fR style configuration file instead of \fBlilo\fR style. This | ||
111 | is the default on ia32 platforms. | ||
112 | |||
113 | .TP | ||
114 | \fB-\-info\fR=\fIkernel-path\fR | ||
115 | Display information on all boot entries which match \fIkernel-path\fR. I | ||
116 | |||
117 | .TP | ||
118 | \fB-\-initrd\fR=\fIinitrd-path\fR | ||
119 | Use \fIinitrd-path\fR as the path to an initial ram disk for a new kernel | ||
120 | being added. | ||
121 | |||
122 | .TP | ||
123 | \fB-\-lilo\fR | ||
124 | Use a \fBlilo\fR style configuration file. | ||
125 | |||
126 | .TP | ||
127 | \fB-\-make-default\fR | ||
128 | Make the new kernel entry being added the default entry. | ||
129 | |||
130 | .TP | ||
131 | \fB-\-remove-args\fR=\fIkernel-args\fR | ||
132 | The arguments specified by \fIkernel-args\fR are removed from the | ||
133 | kernels specified by \fB-\-update-kernel\fR. The \fBroot\fR argument | ||
134 | gets special handling for configuration files that support separate root | ||
135 | filesystem configuration. | ||
136 | |||
137 | .TP | ||
138 | \fB-\-remove-kernel\fR=\fIkernel-path\fR | ||
139 | Removes all boot entries which match \fIkernel-path\fR. This may be used | ||
140 | along with -\-add-kernel, in which case the new kernel being added will | ||
141 | never be removed. | ||
142 | |||
143 | .TP | ||
144 | \fB-\-set-default\fR=\fIkernel-path\fR | ||
145 | The first entry which boots the specified kernel is made the default | ||
146 | boot entry. | ||
147 | |||
148 | .TP | ||
149 | \fB-\-title\fR=\fIentry-title\fR | ||
150 | When a new kernel entry is added \fIentry-title\fR is used as the title | ||
151 | (\fBlilo\fR label) for the entry. If \fIentry-title\fR is longer then maximum | ||
152 | length allowed by the bootloader (15 for lilo, unlimited for grub and elilo) | ||
153 | the title is shortened to a (unique) entry. | ||
154 | |||
155 | .TP | ||
156 | \fB-\-update-kernel\fR=\fIkernel-path\fR | ||
157 | The entries for kernels matching \fRkernel-path\fR are updated. Currently | ||
158 | the only items that can be updated is the kernel argument list, which is | ||
159 | modified via the \fB-\-args\fR and \fB-\-remove-args\fR options. | ||
160 | |||
161 | .TP | ||
162 | \fB-\-version\fR | ||
163 | Display the version of \fBgrubby\fR being run and then exit immediately. | ||
164 | |||
165 | .TP | ||
166 | \fB-\-yaboot\fR | ||
167 | Use an \fByaboot\fR style configuration file. | ||
168 | |||
169 | .TP | ||
170 | \fB-\-zipl\fR | ||
171 | Use an \fBzipl\fR style configuration file. | ||
172 | |||
173 | .SH MULTIBOOT OPTIONS | ||
174 | The Multiboot Specification provides a genreic interface for boot | ||
175 | loaders and operating systems. It is supported by the GRUB bootloader. | ||
176 | |||
177 | .TP | ||
178 | \fB-\-add-multiboot\fR=\fImultiboot-path\fR | ||
179 | Add a new boot entry for the multiboot kernel located at | ||
180 | \fImultiboot-path\fR. Note that this is generally accompanied with a | ||
181 | \fI--add-kernel\fR option. | ||
182 | |||
183 | .TP | ||
184 | \fB-\-remove-multiboot\fR=\fImultiboot-path\fR | ||
185 | Removes all boot entries which match \fImultiboot-path\fR. | ||
186 | |||
187 | .TP | ||
188 | \fB-\-mbargs\fR=\fImultiboot-args\fR | ||
189 | When a new multiboot kernel is added, this specifies the command line | ||
190 | arguments which should be passed to that kernel by default | ||
191 | When \fB-\-update-kernel\fR is used, this specifies new arguments to add | ||
192 | to the argument list. Multiple, space separated arguments may be used. If | ||
193 | an argument already exists the new value replaces the old values. | ||
194 | |||
195 | .TP | ||
196 | \fB-\-remove-mbargs\fR=\fImultiboot-args\fR | ||
197 | The arguments specified by \fImultiboot-args\fR are removed from the | ||
198 | kernels specified by \fB-\-update-kernel\fR. | ||
199 | |||
200 | |||
201 | .SH "BUGS" | ||
202 | niro | 1152 | The command line syntax is more than a little baroque. This probably |
203 | niro | 532 | won't be fixed as \fBgrubby\fR is only intended to be called from shell |
204 | scripts which can get it right. | ||
205 | |||
206 | .SH "SEE ALSO" | ||
207 | .BR grub (8), | ||
208 | .BR lilo (8), | ||
209 | .BR yaboot (8), | ||
210 | .BR mkinitrd (8) | ||
211 | |||
212 | .SH AUTHORS | ||
213 | .nf | ||
214 | niro | 1306 | Erik Troan |
215 | Jeremy Katz | ||
216 | Peter Jones | ||
217 | niro | 532 | .fi |