1 |
.TH GRUBBY 8 "Tue Jan 18 2005" |
.TH GRUBBY 8 "Tue Jan 18 2005" |
2 |
|
|
3 |
.SH NAME |
.SH NAME |
4 |
grubby \- command line tool for configuring grub, lilo, and elilo |
|
5 |
|
grubby \- command line tool for configuring grub, lilo, elilo, yaboot and zipl |
6 |
|
|
7 |
.SH SYNOPSIS |
.SH SYNOPSIS |
8 |
\fBgrubby\fR [--add-kernel=\fIkernel-path\fR] [--args=\fIargs\fR] |
|
9 |
[--bad-image-okay] [--boot-filesystem=\fIbootfs\fR] |
\fBgrubby\fR [--add-kernel=\fIkernel-path\fR] [--args=\fIargs\fR] |
10 |
|
[--bad-image-okay] [--boot-filesystem=\fIbootfs\fR] |
11 |
[--bootloader-probe] [--config-file \fIpath\fR] [--copy-default] |
[--bootloader-probe] [--config-file \fIpath\fR] [--copy-default] |
12 |
[--default-kernel] [--default-index] [--default-title] |
[--debug] [--default-kernel] [--default-index] [--default-title] |
13 |
|
[--devtree=\fIdevicetree.dtb\fR] [--set-index=\fIentry-index\fR] |
14 |
[--grub] [--lilo] [--yaboot] [--silo] [--zipl] |
[--grub] [--lilo] [--yaboot] [--silo] [--zipl] |
15 |
[--info=\fIkernel-path\fR] [--initrd=\fIinitrd-path\fR] |
[--info=\fIkernel-path\fR] [--initrd=\fIinitrd-path\fR] |
16 |
[--make-default] [-o path] [--version] |
[--make-default] [-o path] [--version] |
17 |
[--remove-kernel=\fIkernel-path\fR] [--remove-args=\fIargs\fR] |
[--remove-kernel=\fIkernel-path\fR] [--remove-args=\fIargs\fR] |
18 |
[--set-default=\fIkernel-path\fR] [--title=entry-title] |
[--set-default=\fIkernel-path\fR] [--set-default-index=\fIentry-index\fR] |
19 |
[--add-multiboot=\fImultiboot-path\fR] [--mbargs=\fIargs\fR] |
[--title=entry-title] [--add-multiboot=\fImultiboot-path\fR] |
20 |
[--remove-multiboot=\fImultiboot-path\fR] [--remove-mbargs=\fIargs\fR] |
[--mbargs=\fIargs\fR] [--remove-multiboot=\fImultiboot-path\fR] |
21 |
|
[--remove-mbargs=\fIargs\fR] |
22 |
|
|
23 |
.SH DESCRIPTION |
.SH DESCRIPTION |
24 |
|
|
25 |
|
.SS General Information |
26 |
|
|
27 |
\fBgrubby\fR is a command line tool for updating and displaying information |
\fBgrubby\fR is a command line tool for updating and displaying information |
28 |
about the configuration files for the \fBgrub\fR, \fBlilo\fR, \fBelilo\fR |
about the configuration files for the \fBgrub\fR, \fBlilo\fR, \fBelilo\fR |
29 |
(ia64), \fByaboot\fR (powerpc) and \fBzipl\fR (s390) boot loaders. It |
(ia64), \fByaboot\fR (powerpc) and \fBzipl\fR (s390) boot loaders. It |
30 |
is primarily designed to be used from scripts which install new |
is primarily designed to be used from scripts which install new |
31 |
kernels and need to find information about the current boot environment. |
kernels and need to find information about the current boot environment. |
32 |
|
|
33 |
On Intel x86 platforms, \fBgrub\fR is the default bootloader and the |
.SS Architecture Support |
34 |
configuration file is in \fB/boot/grub/grub.conf\fR. On Intel ia64 platforms, |
|
35 |
\fBelilo\fR mode is used and the default location for the configuration file |
On BIOS-based Intel x86 platforms, \fBgrub2\fR is the default bootloader and |
36 |
is \fB/boot/grub/grub.conf\fR. On PowerPC platforms, \fByaboot\fR parsing |
the configuration file is in \fB/boot/grub2/grub.cfg\fR. On UEFI-based Intel |
37 |
is used and the configuration file should be in \fB/etc/yaboot.conf\fR. |
x86 platforms, \fBgrub2\fR is the default bootloader, and the configuration |
38 |
|
file is in \fB/boot/efi/EFI/redhat/grub.cfg\fR. On Intel ia64 platforms, |
39 |
|
\fBelilo\fR mode is used and the default location for the configuration file |
40 |
|
is \fB/boot/efi/EFI/redhat/elilo.conf\fR. On PowerPC platforms, systems based |
41 |
|
on Power8 now support \fBgrub2\fR as a bootloader and store using a default |
42 |
|
config stored in \fB/boot/grub2/grub.cfg\fR. The earlier Power7 systems use \fByaboot\fR |
43 |
|
parsing and the configuration file should be in \fB/etc/yaboot.conf\fR. On |
44 |
|
s390 platforms the \fBzipl bootloader\fR will read from \fB/etc/zipl.conf\fR. |
45 |
|
|
46 |
|
.SS Special Arguments |
47 |
|
|
48 |
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, |
49 |
\fB-\-remove-kernel\fR, and \fB-\-update-kernel\fR. Specificying \fBDEFAULT\fR |
\fB-\-remove-kernel\fR, and \fB-\-update-kernel\fR. Specificying \fBDEFAULT\fR |
54 |
with that title are used. |
with that title are used. |
55 |
|
|
56 |
.SH OPTIONS |
.SH OPTIONS |
57 |
|
|
58 |
|
.SS Basic Options |
59 |
|
|
60 |
.TP |
.TP |
61 |
\fB-\-add-kernel\fR=\fIkernel-path\fR |
\fB-\-add-kernel\fR=\fIkernel-path\fR |
62 |
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. |
63 |
|
|
64 |
.TP |
.TP |
65 |
|
\fB-\-remove-kernel\fR=\fIkernel-path\fR |
66 |
|
Removes all boot entries which match \fIkernel-path\fR. This may be used |
67 |
|
along with -\-add-kernel, in which case the new kernel being added will |
68 |
|
never be removed. |
69 |
|
|
70 |
|
.TP |
71 |
|
\fB-\-update-kernel\fR=\fIkernel-path\fR |
72 |
|
The entries for kernels matching \fRkernel-path\fR are updated. Currently |
73 |
|
the only items that can be updated is the kernel argument list, which is |
74 |
|
modified via the \fB-\-args\fR and \fB-\-remove-args\fR options. |
75 |
|
|
76 |
|
.TP |
77 |
\fB-\-args\fR=\fIkernel-args\fR |
\fB-\-args\fR=\fIkernel-args\fR |
78 |
When a new kernel is added, this specifies the command line arguments |
When a new kernel is added, this specifies the command line arguments |
79 |
which should be passed to the kernel by default (note they are merged |
which should be passed to the kernel by default (note they are merged |
86 |
lilo.conf does). |
lilo.conf does). |
87 |
|
|
88 |
.TP |
.TP |
89 |
\fB-\-bad-image-okay\fR |
\fB-\-remove-args\fR=\fIkernel-args\fR |
90 |
When \fBgrubby\fR is looking for a entry to use for something (such |
The arguments specified by \fIkernel-args\fR are removed from the |
91 |
as a template or a default boot entry) it uses sanity checks, such as |
kernels specified by \fB-\-update-kernel\fR. The \fBroot\fR argument |
92 |
ensuring that the kernel exists in the filesystem, to make sure |
gets special handling for configuration files that support separate root |
93 |
entries that obviously won't work aren't selected. This option overrides |
filesystem configuration. |
|
that behavior, and is designed primarily for testing. |
|
94 |
|
|
95 |
.TP |
.TP |
96 |
\fB-\-boot-filesystem\fR=\fIbootfs\fR |
\fB-\-copy-default\fR |
97 |
The \fBgrub\fR boot loader expects file paths listed in it's configuration |
\fBgrubby\fR will copy as much information (such as kernel arguments and |
98 |
path to be relative to the top of the filesystem they are on, rather then |
root device) as possible from the current default kernel. The kernel path |
99 |
relative to the current root filesystem. By default \fBgrubby\fR searches |
and initrd path will never be copied. |
|
the list of currently mounted filesystems to determine this. If this option |
|
|
is given \fBgrubby\fR acts as if the specified filesystem was the filesystem |
|
|
containing the kernel (this option is designed primarily for testing). |
|
100 |
|
|
101 |
.TP |
.TP |
102 |
\fB-\-bootloader-probe\fR |
\fB-\-title\fR=\fIentry-title\fR |
103 |
\fBgrubby\fR tries to determine if \fBgrub\fR or \fBlilo\fR is currently |
When a new kernel entry is added \fIentry-title\fR is used as the title |
104 |
installed. When one of those bootloaders is found the name of that bootloader |
(\fBlilo\fR label) for the entry. If \fIentry-title\fR is longer then maximum |
105 |
is displayed on stdout. Both could be installed (on different devices), and |
length allowed by the bootloader (15 for lilo, unlimited for grub and elilo) |
106 |
grubby will print out the names of both bootloaders, one per line. The probe |
the title is shortened to a (unique) entry. |
|
for \fBgrub\fR requires a commented out boot directive \fBgrub.conf\fR |
|
|
identical to the standard directive in the lilo configuration file. If this |
|
|
is not present \fBgrubby\fR will assume grub is not installed (note |
|
|
that \fBanaconda\fR places this directive in \fBgrub.conf\fR files it creates). |
|
|
This option is only available on ia32 platforms. |
|
107 |
|
|
108 |
|
.TP |
109 |
|
\fB-\-initrd\fR=\fIinitrd-path\fR |
110 |
|
Use \fIinitrd-path\fR as the path to an initial ram disk for a new kernel |
111 |
|
being added. |
112 |
|
|
113 |
.TP |
.TP |
114 |
\fB-\-config-file\fR=\fIpath\fR |
\fB-\-set-default\fR=\fIkernel-path\fR |
115 |
Use \fIpath\fR as the configuration file rather then the default. |
The first entry which boots the specified kernel is made the default |
116 |
|
boot entry. |
117 |
|
|
118 |
.TP |
.TP |
119 |
\fB-\-copy-default\fR |
\fB-\-set-default-index\fR=\fIentry-index\fR |
120 |
\fBgrubby\fR will copy as much information (such as kernel arguments and |
Makes the given entry number the default boot entry. |
121 |
root device) as possible from the current default kernel. The kernel path |
|
122 |
and initrd path will never be copied. |
.TP |
123 |
|
\fB-\-make-default\fR |
124 |
|
Make the new kernel entry being added the default entry. |
125 |
|
|
126 |
|
.TP |
127 |
|
\fB-\-set-index\fR=\fIentry-index\fR |
128 |
|
Set the position at which to add a new entry created with \fB-\-add-kernel\fR. |
129 |
|
|
130 |
|
.TP |
131 |
|
\fB-\-debug\fR |
132 |
|
Display extra debugging information for failures. |
133 |
|
|
134 |
|
.SS Display Options |
135 |
|
|
136 |
.TP |
.TP |
137 |
\fB-\-default-kernel\fR |
\fB-\-default-kernel\fR |
146 |
Display the title of the current default boot entry and exit. |
Display the title of the current default boot entry and exit. |
147 |
|
|
148 |
.TP |
.TP |
149 |
|
\fB-\-info\fR=\fIkernel-path\fR |
150 |
|
Display information on all boot entries which match \fIkernel-path\fR. I |
151 |
|
|
152 |
|
.TP |
153 |
|
\fB-\-bootloader-probe\fR |
154 |
|
\fBgrubby\fR tries to determine if \fBgrub\fR or \fBlilo\fR is currently |
155 |
|
installed. When one of those bootloaders is found the name of that bootloader |
156 |
|
is displayed on stdout. Both could be installed (on different devices), and |
157 |
|
grubby will print out the names of both bootloaders, one per line. The probe |
158 |
|
for \fBgrub\fR requires a commented out boot directive \fBgrub.conf\fR |
159 |
|
identical to the standard directive in the lilo configuration file. If this |
160 |
|
is not present \fBgrubby\fR will assume grub is not installed (note |
161 |
|
that \fBanaconda\fR places this directive in \fBgrub.conf\fR files it creates). |
162 |
|
This option is only available on ia32 platforms. |
163 |
|
|
164 |
|
.TP |
165 |
|
\fB-\-version\fR |
166 |
|
Display the version of \fBgrubby\fR being run and then exit immediately. |
167 |
|
|
168 |
|
.SS Output Format Options |
169 |
|
|
170 |
|
.TP |
171 |
\fB-\-elilo\fR |
\fB-\-elilo\fR |
172 |
Use an \fBelilo\fR style configuration file. |
Use an \fBelilo\fR style configuration file. |
173 |
|
|
177 |
is the default on ia32 platforms. |
is the default on ia32 platforms. |
178 |
|
|
179 |
.TP |
.TP |
|
\fB-\-info\fR=\fIkernel-path\fR |
|
|
Display information on all boot entries which match \fIkernel-path\fR. I |
|
|
|
|
|
.TP |
|
|
\fB-\-initrd\fR=\fIinitrd-path\fR |
|
|
Use \fIinitrd-path\fR as the path to an initial ram disk for a new kernel |
|
|
being added. |
|
|
|
|
|
.TP |
|
180 |
\fB-\-lilo\fR |
\fB-\-lilo\fR |
181 |
Use a \fBlilo\fR style configuration file. |
Use a \fBlilo\fR style configuration file. |
182 |
|
|
183 |
.TP |
.TP |
184 |
\fB-\-make-default\fR |
\fB-\-yaboot\fR |
185 |
Make the new kernel entry being added the default entry. |
Use an \fByaboot\fR style configuration file. |
186 |
|
|
187 |
.TP |
.TP |
188 |
\fB-\-remove-args\fR=\fIkernel-args\fR |
\fB-\-zipl\fR |
189 |
The arguments specified by \fIkernel-args\fR are removed from the |
Use an \fBzipl\fR style configuration file. |
|
kernels specified by \fB-\-update-kernel\fR. The \fBroot\fR argument |
|
|
gets special handling for configuration files that support separate root |
|
|
filesystem configuration. |
|
190 |
|
|
191 |
.TP |
.SS Override Options |
|
\fB-\-remove-kernel\fR=\fIkernel-path\fR |
|
|
Removes all boot entries which match \fIkernel-path\fR. This may be used |
|
|
along with -\-add-kernel, in which case the new kernel being added will |
|
|
never be removed. |
|
192 |
|
|
193 |
.TP |
.TP |
194 |
\fB-\-set-default\fR=\fIkernel-path\fR |
\fB-\-bad-image-okay\fR |
195 |
The first entry which boots the specified kernel is made the default |
When \fBgrubby\fR is looking for a entry to use for something (such |
196 |
boot entry. |
as a template or a default boot entry) it uses sanity checks, such as |
197 |
|
ensuring that the kernel exists in the filesystem, to make sure |
198 |
.TP |
entries that obviously won't work aren't selected. This option overrides |
199 |
\fB-\-title\fR=\fIentry-title\fR |
that behavior, and is designed primarily for testing. |
|
When a new kernel entry is added \fIentry-title\fR is used as the title |
|
|
(\fBlilo\fR label) for the entry. If \fIentry-title\fR is longer then maximum |
|
|
length allowed by the bootloader (15 for lilo, unlimited for grub and elilo) |
|
|
the title is shortened to a (unique) entry. |
|
200 |
|
|
201 |
.TP |
.TP |
202 |
\fB-\-update-kernel\fR=\fIkernel-path\fR |
\fB-\-boot-filesystem\fR=\fIbootfs\fR |
203 |
The entries for kernels matching \fRkernel-path\fR are updated. Currently |
The \fBgrub\fR boot loader expects file paths listed in it's configuration |
204 |
the only items that can be updated is the kernel argument list, which is |
path to be relative to the top of the filesystem they are on, rather then |
205 |
modified via the \fB-\-args\fR and \fB-\-remove-args\fR options. |
relative to the current root filesystem. By default \fBgrubby\fR searches |
206 |
|
the list of currently mounted filesystems to determine this. If this option |
207 |
|
is given \fBgrubby\fR acts as if the specified filesystem was the filesystem |
208 |
|
containing the kernel (this option is designed primarily for testing). |
209 |
|
|
210 |
.TP |
.TP |
211 |
\fB-\-version\fR |
\fB-\-config-file\fR=\fIpath\fR |
212 |
Display the version of \fBgrubby\fR being run and then exit immediately. |
Use \fIpath\fR as the configuration file rather then the default. |
213 |
|
|
214 |
.TP |
\fB-\-devtree\fR=\fIpath\fR |
215 |
\fB-\-yaboot\fR |
Use \fIpath\fR for device tree path in place of the path of any devicetree |
216 |
Use an \fByaboot\fR style configuration file. |
directive found in the template stanza. |
217 |
|
|
218 |
.TP |
.SS Multiboot Options |
|
\fB-\-zipl\fR |
|
|
Use an \fBzipl\fR style configuration file. |
|
219 |
|
|
|
.SH MULTIBOOT OPTIONS |
|
220 |
The Multiboot Specification provides a genreic interface for boot |
The Multiboot Specification provides a genreic interface for boot |
221 |
loaders and operating systems. It is supported by the GRUB bootloader. |
loaders and operating systems. It is supported by the GRUB bootloader. |
222 |
|
|
228 |
|
|
229 |
.TP |
.TP |
230 |
\fB-\-remove-multiboot\fR=\fImultiboot-path\fR |
\fB-\-remove-multiboot\fR=\fImultiboot-path\fR |
231 |
Removes all boot entries which match \fImultiboot-path\fR. |
Removes all boot entries which match \fImultiboot-path\fR. |
232 |
|
|
233 |
.TP |
.TP |
234 |
\fB-\-mbargs\fR=\fImultiboot-args\fR |
\fB-\-mbargs\fR=\fImultiboot-args\fR |
235 |
When a new multiboot kernel is added, this specifies the command line |
When a new multiboot kernel is added, this specifies the command line |
236 |
arguments which should be passed to that kernel by default |
arguments which should be passed to that kernel by default |
237 |
When \fB-\-update-kernel\fR is used, this specifies new arguments to add |
When \fB-\-update-kernel\fR is used, this specifies new arguments to add |
238 |
to the argument list. Multiple, space separated arguments may be used. If |
to the argument list. Multiple, space separated arguments may be used. If |
239 |
an argument already exists the new value replaces the old values. |
an argument already exists the new value replaces the old values. |
240 |
|
|
241 |
.TP |
.TP |
242 |
\fB-\-remove-mbargs\fR=\fImultiboot-args\fR |
\fB-\-remove-mbargs\fR=\fImultiboot-args\fR |
243 |
The arguments specified by \fImultiboot-args\fR are removed from the |
The arguments specified by \fImultiboot-args\fR are removed from the |
244 |
kernels specified by \fB-\-update-kernel\fR. |
kernels specified by \fB-\-update-kernel\fR. |
|
|
|
245 |
|
|
246 |
.SH "BUGS" |
.SH "BUGS" |
247 |
|
|
248 |
The command line syntax is more than a little baroque. This probably |
The command line syntax is more than a little baroque. This probably |
249 |
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 |
250 |
scripts which can get it right. |
scripts which can get it right. |
251 |
|
|
252 |
.SH "SEE ALSO" |
.SH "SEE ALSO" |
253 |
|
|
254 |
.BR grub (8), |
.BR grub (8), |
255 |
.BR lilo (8), |
.BR lilo (8), |
256 |
.BR yaboot (8), |
.BR yaboot (8), |
257 |
.BR mkinitrd (8) |
.BR mkinitrd (8) |
258 |
|
|
259 |
.SH AUTHORS |
.SH AUTHORS |
260 |
|
|
261 |
.nf |
.nf |
262 |
Erik Troan |
Erik Troan |
263 |
Jeremy Katz |
Jeremy Katz |