2 |
|
|
3 |
.SH NAME |
.SH NAME |
4 |
|
|
5 |
grubby \- command line tool for configuring grub, lilo, elilo, yaboot and zipl |
grubby \- command line tool used to configure bootloader menu entries across |
6 |
|
multiple architectures |
7 |
|
|
8 |
.SH SYNOPSIS |
.SH SYNOPSIS |
9 |
|
|
10 |
\fBgrubby\fR [--add-kernel=\fIkernel-path\fR] [--args=\fIargs\fR] |
\fBgrubby\fR [\fIOPTIONS\fR] |
|
[--bad-image-okay] [--boot-filesystem=\fIbootfs\fR] |
|
|
[--bootloader-probe] [--config-file \fIpath\fR] [--copy-default] |
|
|
[--debug] [--default-kernel] [--default-index] [--default-title] |
|
|
[--devtree=\fIdevicetree.dtb\fR] [--set-index=\fIentry-index\fR] |
|
|
[--grub] [--lilo] [--yaboot] [--silo] [--zipl] |
|
|
[--info=\fIkernel-path\fR] [--initrd=\fIinitrd-path\fR] |
|
|
[--make-default] [-o path] [--version] |
|
|
[--remove-kernel=\fIkernel-path\fR] [--remove-args=\fIargs\fR] |
|
|
[--set-default=\fIkernel-path\fR] [--set-default-index=\fIentry-index\fR] |
|
|
[--title=entry-title] [--add-multiboot=\fImultiboot-path\fR] |
|
|
[--mbargs=\fIargs\fR] [--remove-multiboot=\fImultiboot-path\fR] |
|
|
[--remove-mbargs=\fIargs\fR] |
|
11 |
|
|
12 |
.SH DESCRIPTION |
.SH DESCRIPTION |
13 |
|
|
14 |
.SS General Information |
.SS General Information |
15 |
|
|
16 |
\fBgrubby\fR is a command line tool for updating and displaying information |
\fBgrubby\fR is a command line tool for updating and displaying information |
17 |
about the configuration files for the \fBgrub\fR, \fBlilo\fR, \fBelilo\fR |
about the configuration files for various architecture specific bootloaders. |
18 |
(ia64), \fByaboot\fR (powerpc) and \fBzipl\fR (s390) boot loaders. It |
It is primarily designed to be used from scripts which install new kernels |
19 |
is primarily designed to be used from scripts which install new |
and need to find information about the current boot environment. |
|
kernels and need to find information about the current boot environment. |
|
20 |
|
|
21 |
.SS Architecture Support |
.SS Architecture Support |
22 |
|
|
23 |
On BIOS-based Intel x86 platforms, \fBgrub2\fR is the default bootloader and |
The \fBgrubby\fR executable has full support for the \fBgrub2\fR |
24 |
the configuration file is in \fB/boot/grub2/grub.cfg\fR. On UEFI-based Intel |
bootloader on \fBx86_64\fR systems using legacy BIOS or modern |
25 |
x86 platforms, \fBgrub2\fR is the default bootloader, and the configuration |
UEFI firmware and \fBppc64\fR and \fBppc64le\fR hardware using |
26 |
file is in \fB/boot/efi/EFI/redhat/grub.cfg\fR. On Intel ia64 platforms, |
OPAL or SLOF as firmware. |
27 |
\fBelilo\fR mode is used and the default location for the configuration file |
|
28 |
is \fB/boot/efi/EFI/redhat/elilo.conf\fR. On PowerPC platforms, systems based |
Legacy \fBs390\fR and the current \fBs390x\fR architectures |
29 |
on Power8 now support \fBgrub2\fR as a bootloader and store using a default |
and their \fBzipl\fR bootloader are fully supported. |
30 |
config stored in \fB/boot/grub2/grub.cfg\fR. The earlier Power7 systems use \fByaboot\fR |
|
31 |
parsing and the configuration file should be in \fB/etc/yaboot.conf\fR. On |
Support for \fByaboot\fR has been deprecated as all ppc architecture |
32 |
s390 platforms the \fBzipl bootloader\fR will read from \fB/etc/zipl.conf\fR. |
hardware since the Power8 uses \fBgrub2\fR or petitboot |
33 |
|
which both use the grub2 configuration file format. |
34 |
|
|
35 |
|
Legacy bootloaders \fBLILO\fR, \fBSILO\fR, and \fBELILO\fR |
36 |
|
are deprecated and no longer receiving active support in favor of |
37 |
|
previously mentioned bootloaders. |
38 |
|
|
39 |
|
.SS Default Behavior |
40 |
|
|
41 |
|
The default bootloader target is primarily determined by the architecture |
42 |
|
for which grubby has been built. Each architecture has a preferred |
43 |
|
bootloader, and each bootloader has its own configuration file. If no |
44 |
|
bootloader is selected on the command line, grubby will use these default |
45 |
|
settings to search for an existing configuration. If no bootloader |
46 |
|
configuration file is found, grubby will use the default value for that |
47 |
|
architecture. These defaults are listed in the table below. |
48 |
|
|
49 |
|
.TS |
50 |
|
allbox; |
51 |
|
lbw6 lbw10 lbw18 |
52 |
|
l l l. |
53 |
|
Arch Bootloader Configuration File |
54 |
|
x86_64 [BIOS] grub2 /boot/grub2/grub.cfg |
55 |
|
x86_64 [UEFI] grub2 /boot/efi/EFI/redhat/grub.cfg |
56 |
|
i386 grub2 /boot/grub2/grub.cfg |
57 |
|
ia64 elilo /boot/efi/EFI/redhat/elilo.conf |
58 |
|
ppc [>=Power8] grub2 /boot/grub2/grub.cfg |
59 |
|
ppc [<=Power7] yaboot /etc/yaboot.conf |
60 |
|
s390 zipl /etc/zipl.conf |
61 |
|
s390x zipl /etc/zipl.conf |
62 |
|
.TE |
63 |
|
|
64 |
|
|
65 |
.SS Special Arguments |
.SS Special Arguments |
66 |
|
|
67 |
There are a number of ways to specify the kernel used for \fB-\-info\fR, |
There are a number of ways to specify the kernel used for \fB-\-info\fR, |
68 |
\fB-\-remove-kernel\fR, and \fB-\-update-kernel\fR. Specificying \fBDEFAULT\fR |
\fB-\-remove-kernel\fR, and \fB-\-update-kernel\fR. Specifying \fBDEFAULT\fR |
69 |
or \fBALL\fR selects the default entry and all of the entries, respectively. |
or \fBALL\fR selects the default entry and all of the entries, respectively. |
70 |
If a comma separated list of numbers is given, the boot entries indexed |
If a comma separated list of numbers is given, the boot entries indexed |
71 |
by those numbers are selected. Finally, the title of a boot entry may |
by those numbers are selected. Finally, the title of a boot entry may |
78 |
|
|
79 |
.TP |
.TP |
80 |
\fB-\-add-kernel\fR=\fIkernel-path\fR |
\fB-\-add-kernel\fR=\fIkernel-path\fR |
81 |
Add a new boot entry for the kernel located at \fIkernel-path\fR. |
Add a new boot entry for the kernel located at \fIkernel-path\fR. A title for |
82 |
|
the boot entry must be set using \fB-\-title\fR. Most invocations should also |
83 |
|
include \fB-\-initrd\fR with memtest86 as a notable exception. |
84 |
|
|
85 |
|
The \fB-\-update-kernel\fR option may not be used in the same invocation. |
86 |
|
|
87 |
.TP |
.TP |
88 |
\fB-\-remove-kernel\fR=\fIkernel-path\fR |
\fB-\-remove-kernel\fR=\fIkernel-path\fR |
89 |
Removes all boot entries which match \fIkernel-path\fR. This may be used |
Remove all boot entries which match \fIkernel-path\fR. This may be used |
90 |
along with -\-add-kernel, in which case the new kernel being added will |
along with \fB-\-add-kernel\fR, in which case the new entry being added will |
91 |
never be removed. |
not be removed. |
92 |
|
|
93 |
.TP |
.TP |
94 |
\fB-\-update-kernel\fR=\fIkernel-path\fR |
\fB-\-update-kernel\fR=\fIkernel-path\fR |
95 |
The entries for kernels matching \fRkernel-path\fR are updated. Currently |
Update the entries for kernels matching \fRkernel-path\fR. Currently |
96 |
the only items that can be updated is the kernel argument list, which is |
the only item that can be updated is the kernel argument list, which is |
97 |
modified via the \fB-\-args\fR and \fB-\-remove-args\fR options. |
modified via the \fB-\-args\fR and \fB-\-remove-args\fR options. |
98 |
|
|
99 |
.TP |
.TP |
134 |
being added. |
being added. |
135 |
|
|
136 |
.TP |
.TP |
137 |
|
\fB-\-efi\fR |
138 |
|
Use appropriate bootloader commands for EFI on this architecture. |
139 |
|
|
140 |
|
.TP |
141 |
\fB-\-set-default\fR=\fIkernel-path\fR |
\fB-\-set-default\fR=\fIkernel-path\fR |
142 |
The first entry which boots the specified kernel is made the default |
The first entry which boots the specified kernel is made the default |
143 |
boot entry. |
boot entry. This may not be invoked with \fB-\-set-default-index\fR. |
144 |
|
|
145 |
.TP |
.TP |
146 |
\fB-\-set-default-index\fR=\fIentry-index\fR |
\fB-\-set-default-index\fR=\fIentry-index\fR |
147 |
Makes the given entry number the default boot entry. |
Makes the given entry number the default boot entry. This may not be invoked |
148 |
|
with \fB-\-set-default\fR. The given value represents the index in the |
149 |
|
post-modification boot entry list. |
150 |
|
|
151 |
.TP |
.TP |
152 |
\fB-\-make-default\fR |
\fB-\-make-default\fR |
160 |
\fB-\-debug\fR |
\fB-\-debug\fR |
161 |
Display extra debugging information for failures. |
Display extra debugging information for failures. |
162 |
|
|
163 |
|
.TP |
164 |
|
\fB-i\fR, \fB-\-extra-initrd\fR=\fIinitrd-path\fR |
165 |
|
Use \fIinitrd-path\fR as the path for an auxiliary initrd image. |
166 |
|
|
167 |
.SS Display Options |
.SS Display Options |
168 |
|
|
169 |
|
Passing the display option to grubby will cause it to print out the |
170 |
|
requested information about the current bootloader configuration and |
171 |
|
then immediately exit. These options should not be used in any |
172 |
|
script intended to update the bootloader configuration. |
173 |
|
|
174 |
.TP |
.TP |
175 |
\fB-\-default-kernel\fR |
\fB-\-default-kernel\fR |
176 |
Display the full path to the current default kernel and exit. |
Display the full path to the current default kernel and exit. |
189 |
|
|
190 |
.TP |
.TP |
191 |
\fB-\-bootloader-probe\fR |
\fB-\-bootloader-probe\fR |
192 |
|
Attempt to probe for installed bootloaders. If this option is specified, |
193 |
\fBgrubby\fR tries to determine if \fBgrub\fR or \fBlilo\fR is currently |
\fBgrubby\fR tries to determine if \fBgrub\fR or \fBlilo\fR is currently |
194 |
installed. When one of those bootloaders is found the name of that bootloader |
installed. When one of those bootloaders is found the name of that |
195 |
is displayed on stdout. Both could be installed (on different devices), and |
bootloader is displayed on stdout. Both could be installed (on different |
196 |
grubby will print out the names of both bootloaders, one per line. The probe |
devices), and grubby will print out the names of both bootloaders, one per |
197 |
for \fBgrub\fR requires a commented out boot directive \fBgrub.conf\fR |
line. The probe for \fBgrub\fR requires a commented out boot directive |
198 |
identical to the standard directive in the lilo configuration file. If this |
\fBgrub.conf\fR identical to the standard directive in the lilo |
199 |
is not present \fBgrubby\fR will assume grub is not installed (note |
configuration file. If this is not present \fBgrubby\fR will assume grub is |
200 |
that \fBanaconda\fR places this directive in \fBgrub.conf\fR files it creates). |
not installed (note that \fBanaconda\fR places this directive in |
201 |
This option is only available on ia32 platforms. |
\fBgrub.conf\fR files it creates). |
202 |
|
|
203 |
|
\fIThis option is only available on x86 BIOS platforms.\fR |
204 |
|
|
205 |
.TP |
.TP |
206 |
\fB-\-version\fR |
\fB-v\fR, \fB-\-version\fR |
207 |
Display the version of \fBgrubby\fR being run and then exit immediately. |
Display the version of \fBgrubby\fR being run and then exit immediately. |
208 |
|
|
209 |
.SS Output Format Options |
.SS Output Format Options |
210 |
|
|
211 |
|
Sane default options for the current platform are compiled into grubby on |
212 |
|
a per platform basis. These defaults determine the format and layout of |
213 |
|
the generated bootloader configuration file. A different configuration file |
214 |
|
format may be specified on the command line if the system uses a supported |
215 |
|
alternative bootloader. |
216 |
|
|
217 |
.TP |
.TP |
218 |
\fB-\-elilo\fR |
\fB-\-elilo\fR |
219 |
Use an \fBelilo\fR style configuration file. |
Use an \fBelilo\fR style configuration file. This is the default on ia64 |
220 |
|
platforms. This format is deprecated. |
221 |
|
|
222 |
|
.TP |
223 |
|
\fB-\-extlinux\fR |
224 |
|
Use an \fBextlinux\fR style configuration file. This format is deprecated. |
225 |
|
|
226 |
.TP |
.TP |
227 |
\fB-\-grub\fR |
\fB-\-grub\fR |
228 |
Use a \fBgrub\fR style configuration file instead of \fBlilo\fR style. This |
Use a \fBgrub\fR style configuration file. This is the default on the i386 |
229 |
is the default on ia32 platforms. |
architecture. |
230 |
|
|
231 |
|
.TP |
232 |
|
\fB-\-grub2\fR |
233 |
|
Use a \fBgrub2\fR style configuration file. This is the default on |
234 |
|
\fBx86_64\fR architecture as well as the \fBppc64\fR and \fBppc64le\fR |
235 |
|
architectures running on Power8 or later hardware. |
236 |
|
|
237 |
.TP |
.TP |
238 |
\fB-\-lilo\fR |
\fB-\-lilo\fR |
239 |
Use a \fBlilo\fR style configuration file. |
Use a \fBlilo\fR style configuration file. |
240 |
|
|
241 |
.TP |
.TP |
242 |
|
\fB-\-silo\fR |
243 |
|
Use a \fBsilo\fR style configuration file. This is the default on SPARC |
244 |
|
systems. This format is legacy, deprecated, and unsupported. |
245 |
|
|
246 |
|
.TP |
247 |
\fB-\-yaboot\fR |
\fB-\-yaboot\fR |
248 |
Use an \fByaboot\fR style configuration file. |
Use a \fByaboot\fR style configuration file. This is the default for |
249 |
|
the \fBppc\fR architecture on on Power7 and earlier hardware. |
250 |
|
|
251 |
.TP |
.TP |
252 |
\fB-\-zipl\fR |
\fB-\-zipl\fR |
253 |
Use an \fBzipl\fR style configuration file. |
Use a \fBzipl\fR style configuration file. This is the default on the |
254 |
|
legacy s390 and current s390x architectures. |
255 |
|
|
256 |
.SS Override Options |
.SS Override Options |
257 |
|
|
265 |
|
|
266 |
.TP |
.TP |
267 |
\fB-\-boot-filesystem\fR=\fIbootfs\fR |
\fB-\-boot-filesystem\fR=\fIbootfs\fR |
268 |
The \fBgrub\fR boot loader expects file paths listed in it's configuration |
The \fBgrub\fR boot loader expects file paths listed in its configuration |
269 |
path to be relative to the top of the filesystem they are on, rather then |
path to be relative to the top of the filesystem they are on, rather then |
270 |
relative to the current root filesystem. By default \fBgrubby\fR searches |
relative to the current root filesystem. By default \fBgrubby\fR searches |
271 |
the list of currently mounted filesystems to determine this. If this option |
the list of currently mounted filesystems to determine this. If this option |
273 |
containing the kernel (this option is designed primarily for testing). |
containing the kernel (this option is designed primarily for testing). |
274 |
|
|
275 |
.TP |
.TP |
276 |
\fB-\-config-file\fR=\fIpath\fR |
\fB-\-env\fR=\fIpath\fR |
277 |
|
Path for the file where grub environment data is stored. |
278 |
|
|
279 |
|
.TP |
280 |
|
\fB-c\fR, \fB-\-config-file\fR=\fIpath\fR |
281 |
Use \fIpath\fR as the configuration file rather then the default. |
Use \fIpath\fR as the configuration file rather then the default. |
282 |
|
|
283 |
\fB-\-devtree\fR=\fIpath\fR |
.TP |
284 |
|
\fB-o\fR, \fB-\-output-file\fR=\fIfile_path\fR |
285 |
|
The destination path for the updated configuration file. Use "-" to |
286 |
|
send it to stdout. |
287 |
|
|
288 |
|
.TP |
289 |
|
\fB-\-devtree\fR=\fIfile_path\fR |
290 |
Use \fIpath\fR for device tree path in place of the path of any devicetree |
Use \fIpath\fR for device tree path in place of the path of any devicetree |
291 |
directive found in the template stanza. |
directive found in the template stanza. |
292 |
|
|
293 |
|
.TP |
294 |
|
\fB-\-devtreedir\fR=\fIfile_path\fR |
295 |
|
Use the specified \fIfile path\fR to load the devicetree definition. This is |
296 |
|
for platforms where a flat file is used instead of firmware to instruct the |
297 |
|
kernel how to communicate with devices. |
298 |
|
|
299 |
.SS Multiboot Options |
.SS Multiboot Options |
300 |
|
|
301 |
The Multiboot Specification provides a genreic interface for boot |
The Multiboot Specification provides a generic interface for boot |
302 |
loaders and operating systems. It is supported by the GRUB bootloader. |
loaders and operating systems. It is supported by the GRUB bootloader. |
303 |
|
|
304 |
.TP |
.TP |
305 |
\fB-\-add-multiboot\fR=\fImultiboot-path\fR |
\fB-\-add-multiboot\fR=\fImultiboot-path\fR |
306 |
Add a new boot entry for the multiboot kernel located at |
Add a new boot entry for the multiboot kernel located at |
307 |
\fImultiboot-path\fR. Note that this is generally accompanied with a |
\fImultiboot-path\fR. Note that this is generally accompanied with a |
308 |
\fI--add-kernel\fR option. |
\fB--add-kernel\fR option. |
309 |
|
|
310 |
.TP |
.TP |
311 |
\fB-\-remove-multiboot\fR=\fImultiboot-path\fR |
\fB-\-remove-multiboot\fR=\fImultiboot-path\fR |
330 |
won't be fixed as \fBgrubby\fR is only intended to be called from shell |
won't be fixed as \fBgrubby\fR is only intended to be called from shell |
331 |
scripts which can get it right. |
scripts which can get it right. |
332 |
|
|
333 |
|
.SH EXAMPLE |
334 |
|
|
335 |
|
The following examples assume the following: |
336 |
|
|
337 |
|
.TS |
338 |
|
allbox; |
339 |
|
rbw15 l. |
340 |
|
cfg_file Full path to bootloader config file |
341 |
|
new_kernel Full path to kernel image to be installed |
342 |
|
old_kernel Full path to old kernel image to be removed |
343 |
|
current_kernel Full path to a currently installed kernel |
344 |
|
entry_title Title that appears on bootloader menu |
345 |
|
new_initrd Full path to initrd for a new kernel |
346 |
|
kernel_args Set of arguments for the kernel |
347 |
|
menu_index Index number of a menu entry |
348 |
|
.TE |
349 |
|
|
350 |
|
The examples below quote strings that may have spaces or other whitespace in |
351 |
|
them. It is also perfectly valid to backslash escape these strings if that |
352 |
|
is more convenient. |
353 |
|
|
354 |
|
.PP |
355 |
|
Add a new kernel entry and copy all options from the current default kernel. |
356 |
|
This is the behavior that most users will want. |
357 |
|
.IP |
358 |
|
\fBgrubby\fR --add-kernel=\fInew_kernel\fR --title="\fIentry_title\fR" --initrd="\fInew_initrd\fR" --copy-default |
359 |
|
.PP |
360 |
|
Add a new kernel entry with custom arguments |
361 |
|
.IP |
362 |
|
\fBgrubby\fR --add-kernel=\fInew_kernel\fR --title="\fIentry_title\fR" --initrd="\fInew_initrd\fR" --args=\fIkernel_args\fR |
363 |
|
.PP |
364 |
|
Remove \fBall menu entries\fR for a specified kernel. |
365 |
|
.IP |
366 |
|
\fBgrubby\fR --remove-kernel=\fIold_kernel\fR |
367 |
|
.PP |
368 |
|
Target a single menu entry to remove without targetting other entries with |
369 |
|
the same kernel. |
370 |
|
.IP |
371 |
|
\fBgrubby\fR --info=\fIold_kernel\fR |
372 |
|
|
373 |
|
\fBgrubby\fR --remove-kernel=\fImenu_index\fR |
374 |
|
.PP |
375 |
|
Update the arguments for all entries of a specific kernel. New arguments get |
376 |
|
added while existing arguments get updated values. |
377 |
|
.IP |
378 |
|
\fBgrubby\fR --update-kernel=\fIcurrent_kernel\fR --args="\fIkernel_args\fR" |
379 |
|
.PP |
380 |
|
Remove the arguments for a single entry of a specific kernel. |
381 |
|
.IP |
382 |
|
\fBgrubby\fR --info=\fIcurrent_kernel\fR |
383 |
|
|
384 |
|
\fBgrubby\fR --remove-args=\fImenu_index\fR --args="\fIkernel_args\fR" |
385 |
|
|
386 |
.SH "SEE ALSO" |
.SH "SEE ALSO" |
387 |
|
|
388 |
.BR grub (8), |
.BR grub (8), |
389 |
.BR lilo (8), |
.BR lilo (8), |
390 |
.BR yaboot (8), |
.BR yaboot (8), |
391 |
|
.BR zipl (8), |
392 |
|
.BR dracut (8), |
393 |
.BR mkinitrd (8) |
.BR mkinitrd (8) |
394 |
|
|
395 |
.SH AUTHORS |
.SH AUTHORS |
398 |
Erik Troan |
Erik Troan |
399 |
Jeremy Katz |
Jeremy Katz |
400 |
Peter Jones |
Peter Jones |
401 |
|
Robert Marshall |
402 |
.fi |
.fi |