174643
.TH GRUBBY 8 "Wed Apr 29 2020"
174643
.SH NAME
174643
grubby \- command line tool for configuring grub and zipl
174643
174643
.SH SYNOPSIS
174643
\fBgrubby\fR [--add-kernel=\fIkernel-path\fR] [--args=\fIargs\fR]
174643
       [--bad-image-okay] [--config-file=\fIpath\fR] [--copy-default]
174643
       [--default-kernel] [--default-index] [--default-title]
174643
       [--env=\fIpath\fR] [--grub2] [--info=\fIkernel-path\fR]
174643
       [--initrd=\fIinitrd-path\fR] [--extra-initrd=\fIinitrd-path\fR]
174643
       [--make-default] [--remove-args=\fIargs\fR]
174643
       [--remove-kernel=\fIkernel-path\fR] [--set-default=\fIkernel-path\fR]
174643
       [--set-default-index=\fientry-index\fR] [--title=\fentry-title\fR]
174643
       [--update-kernel=\fIkernel-path\fR] [--zipl] [--bls-directory=\fIpath\fR]
174643
174643
.SH DESCRIPTION
174643
\fBgrubby\fR is a command line tool for updating and displaying information
174643
about the configuration files for the \fBgrub2\fR and \fBzipl\fR boot loaders.
174643
It is primarily designed to be used from scripts which install new kernels and
174643
need to find information about the current boot environment.
174643
174643
On BIOS-based Intel x86 platforms, \fBgrub2\fR is the default bootloader and
174643
the configuration file is in \fB/boot/grub2/grub.cfg\fR. On UEFI-based Intel
174643
x86 platforms, \fBgrub2\fR is the default bootloader, and the configuration
174643
file is in \fB/boot/efi/EFI/redhat/grub.cfg\fR. On PowerPC platforms, systems
174643
based on Power8 and Power9 support \fBgrub2\fR as a bootloader and use a
174643
configuration stored in \fB/boot/grub2/grub.cfg\fR. On s390x platforms the
174643
\fBzipl\fR bootloader use a default configuration in \fB/etc/zipl.conf\fR.
174643
174643
All bootloaders define the boot entries as individual configuration fragments
174643
that are stored by default in \fB/boot/loader/entries\fR. The format for the
174643
config files is specified at \fBhttps://systemd.io/BOOT_LOADER_SPECIFICATION\fR.
174643
The \fBgrubby\fR tool is used to update and display the configuration defined
174643
in the BootLoaderSpec fragment files.
174643
174643
There are a number of ways to specify the kernel used for \fB-\-info\fR,
174643
\fB-\-remove-kernel\fR, and \fB-\-update-kernel\fR. Specificying \fBDEFAULT\fR
174643
or \fBALL\fR selects the default entry and all of the entries, respectively.
174643
Also, the title of a boot entry may be specified by using \fBTITLE=\fItitle\fR
174643
as the argument; all entries with that title are used.
174643
174643
.SH OPTIONS
174643
.TP
174643
\fB-\-add-kernel\fR=\fIkernel-path\fR
174643
Add a new boot entry for the kernel located at \fIkernel-path\fR.
174643
174643
.TP
174643
\fB-\-args\fR=\fIkernel-args\fR
174643
When a new kernel is added, this specifies the command line arguments
174643
which should be passed to the kernel by default (note they are merged
174643
with the arguments of the default entry if \fB-\-copy-default\fR is used).
174643
When \fB-\-update-kernel\fR is used, this specifies new arguments to add
174643
to the argument list. Multiple, space separated arguments may be used. If
174643
an argument already exists the new value replaces the old values. The
174643
\fBroot=\fR kernel argument gets special handling if the configuration
174643
file has special handling for specifying the root filesystem.
174643
174643
.TP
174643
\fB-\-bad-image-okay\fR
174643
When \fBgrubby\fR is looking for an entry to use for something (such
174643
as a default boot entry) it uses sanity checks, such as ensuring that
174643
the kernel exists in the filesystem, to make sure entries that obviously
174643
won't work aren't selected. This option overrides that behavior, and is
174643
designed primarily for testing.
174643
174643
.TP
174643
\fB-\-config-file\fR=\fIpath\fR
174643
Use \fIpath\fR as the configuration file rather then the default.
174643
174643
.TP
174643
\fB-\-copy-default\fR
174643
\fBgrubby\fR will copy as much information (such as kernel arguments and
174643
root device) as possible from the current default kernel. The kernel path
174643
and initrd path will never be copied.
174643
174643
.TP
174643
\fB-\-default-kernel\fR
174643
Display the full path to the current default kernel and exit.
174643
174643
.TP
174643
\fB-\-default-index\fR
174643
Display the numeric index of the current default boot entry and exit.
174643
174643
.TP
174643
\fB-\-default-title\fR
174643
Display the title of the current default boot entry and exit.
174643
174643
.TP
174643
\fB-\-env\fR=\fIpath\fR
174643
Use \fIpath\fR as the grub2 environment block file rather then the default path.
174643
174643
.TP
174643
\fB-\-grub2\fR
174643
Configure \fBgrub2\fR bootloader.
174643
174643
.TP
174643
\fB-\-info\fR=\fIkernel-path\fR
174643
Display information on all boot entries which match \fIkernel-path\fR. If
174643
\fIkernel-path\fR is \fBDEFAULT\fR, then information on the default kernel
174643
is displayed. If \fIkernel-path\fR is \fBALL\fR, then information on all boot
174643
entries are displayed.
174643
174643
.TP
174643
\fB-\-initrd\fR=\fIinitrd-path\fR
174643
Use \fIinitrd-path\fR as the path to an initial ram disk for a new kernel
174643
being added.
174643
174643
.TP
174643
\fB-\-extrainitrd\fR=\fIinitrd-path\fR
174643
Use \fIinitrd-path\fR as the path to an auxiliary init ram disk image to be
174643
added to the boot entry.
174643
174643
.TP
174643
\fB-\-make-default\fR
174643
Make the new kernel entry being added the default entry.
174643
174643
.TP
174643
\fB-\-remove-args\fR=\fIkernel-args\fR
174643
The arguments specified by \fIkernel-args\fR are removed from the kernels
174643
specified by \fB-\-update-kernel\fR. The \fBroot\fR argument gets special
174643
handling for configuration files that support separate root filesystem
174643
configuration.
174643
174643
.TP
174643
\fB-\-remove-kernel\fR=\fIkernel-path\fR
174643
Removes all boot entries which match \fIkernel-path\fR. This may be used
174643
along with -\-add-kernel, in which case the new kernel being added will
174643
never be removed.
174643
174643
.TP
174643
\fB-\-set-default\fR=\fIkernel-path\fR
174643
The first entry which boots the specified kernel is made the default
174643
boot entry.
174643
174643
.TP
174643
\fB-\-set-default-index\fR=\fIentry-index\fR
174643
Makes the given entry number the default boot entry.
174643
174643
.TP
174643
\fB-\-title\fR=\fIentry-title\fR
174643
When a new kernel entry is added \fIentry-title\fR is used as the title
174643
for the entry.
174643
174643
.TP
174643
\fB-\-update-kernel\fR=\fIkernel-path\fR
174643
The entries for kernels matching \fRkernel-path\fR are updated. Currently
174643
the only items that can be updated is the kernel argument list, which is
174643
modified via the \fB-\-args\fR and \fB-\-remove-args\fR options. If the
174643
\fBALL\fR argument is used the variable \fB GRUB_CMDLINE_LINUX\fR in
174643
\fB/etc/default/grub\fR is updated with the latest kernel argument list,
174643
unless the \fB-\-no-etc-grub-update\fR option is used.
174643
174643
.TP
174643
\fB-\-zipl\fR
174643
Configure \fBzipl\fR bootloader.
174643
174643
.TP
174643
\fB-\-bls-directory\fR=\fIpath\fR
174643
Use \fIpath\fR as the directory for the BootLoaderSpec config files rather
174643
than the default \fB/boot/loader/entries\fR.
174643
174643
.TP
174643
\fB-\-no-etc-grub-update\fR
174643
Makes grubby to not update the \fBGRUB_CMDLINE_LINUX\fR variable in
174643
\fB/etc/default/grub\fR when the \fB-\-update-kernel\fR option is
174643
used with the \fBALL\fR argument.
174643
174643
.SH "SEE ALSO"
174643
.BR zipl (8),
174643
.BR mkinitrd (8),
174643
.BR kernel-install (8)
174643
174643
.SH AUTHORS
174643
.nf
174643
Erik Troan
174643
Jeremy Katz
174643
Peter Jones
174643
Javier Martinez
174643
.fi