Blame SOURCES/0026-Update-grubby-man-page-contents-bz1232168.patch

cca0c4
From e08236e8d15ff0fc581d56efaf4d855c57d6d994 Mon Sep 17 00:00:00 2001
cca0c4
From: Robert Marshall <rmarshall@redhat.com>
cca0c4
Date: Fri, 1 Jul 2016 15:03:13 -0400
cca0c4
Subject: [PATCH 26/55] Update grubby man page contents (#bz1232168)
cca0c4
cca0c4
The grubby man page was missing several options that were added in
cca0c4
previous releases. Added those to the man page as well as updated the
cca0c4
text on others to provide further clarity.
cca0c4
cca0c4
Added an EXAMPLE section containing some basic use cases.
cca0c4
cca0c4
Resolves: rhbz#1232168
cca0c4
---
cca0c4
 grubby.8 | 218 +++++++++++++++++++++++++++++++++++++++++++------------
cca0c4
 1 file changed, 173 insertions(+), 45 deletions(-)
cca0c4
cca0c4
diff --git a/grubby.8 b/grubby.8
cca0c4
index a3033d87254..64a6984fba0 100644
cca0c4
--- a/grubby.8
cca0c4
+++ b/grubby.8
cca0c4
@@ -2,51 +2,69 @@
cca0c4
 
cca0c4
 .SH NAME
cca0c4
 
cca0c4
-grubby \- command line tool for configuring grub, lilo, elilo, yaboot and zipl
cca0c4
+grubby \- command line tool used to configure bootloader menu entries across multiple architectures
cca0c4
 
cca0c4
 .SH SYNOPSIS
cca0c4
 
cca0c4
-\fBgrubby\fR [--add-kernel=\fIkernel-path\fR] [--args=\fIargs\fR]
cca0c4
-       [--bad-image-okay] [--boot-filesystem=\fIbootfs\fR]
cca0c4
-       [--bootloader-probe] [--config-file \fIpath\fR] [--copy-default]
cca0c4
-       [--debug] [--default-kernel] [--default-index] [--default-title]
cca0c4
-       [--devtree=\fIdevicetree.dtb\fR] [--set-index=\fIentry-index\fR]
cca0c4
-       [--grub] [--lilo] [--yaboot] [--silo] [--zipl]
cca0c4
-       [--info=\fIkernel-path\fR] [--initrd=\fIinitrd-path\fR]
cca0c4
-       [--make-default] [-o path] [--version]
cca0c4
-       [--remove-kernel=\fIkernel-path\fR] [--remove-args=\fIargs\fR]
cca0c4
-       [--set-default=\fIkernel-path\fR] [--set-default-index=\fIentry-index\fR]
cca0c4
-       [--title=entry-title] [--add-multiboot=\fImultiboot-path\fR]
cca0c4
-       [--mbargs=\fIargs\fR] [--remove-multiboot=\fImultiboot-path\fR]
cca0c4
-       [--remove-mbargs=\fIargs\fR]
cca0c4
+\fBgrubby\fR [\fIOPTIONS...\fR]
cca0c4
 
cca0c4
 .SH DESCRIPTION
cca0c4
 
cca0c4
 .SS General Information
cca0c4
 
cca0c4
 \fBgrubby\fR is a command line tool for updating and displaying information
cca0c4
-about the configuration files for the \fBgrub\fR, \fBlilo\fR, \fBelilo\fR
cca0c4
-(ia64), \fByaboot\fR (powerpc) and \fBzipl\fR (s390) boot loaders. It
cca0c4
-is primarily designed to be used from scripts which install new
cca0c4
-kernels and need to find information about the current boot environment.
cca0c4
+about the configuration files for various architecture specific bootloaders.
cca0c4
+It is primarily designed to be used from scripts which install new kernels
cca0c4
+and need to find information about the current boot environment.
cca0c4
 
cca0c4
 .SS Architecture Support
cca0c4
 
cca0c4
-On BIOS-based Intel x86 platforms, \fBgrub2\fR is the default bootloader and
cca0c4
-the configuration file is in \fB/boot/grub2/grub.cfg\fR.  On UEFI-based Intel
cca0c4
-x86 platforms, \fBgrub2\fR is the default bootloader, and the configuration
cca0c4
-file is in \fB/boot/efi/EFI/redhat/grub.cfg\fR.  On Intel ia64 platforms,
cca0c4
-\fBelilo\fR mode is used and the default location for the configuration file
cca0c4
-is \fB/boot/efi/EFI/redhat/elilo.conf\fR. On PowerPC platforms, systems based
cca0c4
-on Power8 now support \fBgrub2\fR as a bootloader and store using a default
cca0c4
-config stored in \fB/boot/grub2/grub.cfg\fR. The earlier Power7 systems use \fByaboot\fR
cca0c4
-parsing and the configuration file should be in \fB/etc/yaboot.conf\fR.  On
cca0c4
-s390 platforms the \fBzipl bootloader\fR will read from \fB/etc/zipl.conf\fR.
cca0c4
+The \fBgrubby\fR executable has full support for the \fBgrub2\fR
cca0c4
+bootloader on \fBx86_64\fR systems using legacy BIOS or modern
cca0c4
+UEFI firmware and \fBppc64\fR and \fBppc64le\fR hardware using
cca0c4
+OPAL or SLOF as firmware.
cca0c4
+
cca0c4
+Legacy \fBs390\fR and the current \fBs390x\fR architectures
cca0c4
+and their \fBzipl\fR bootloader are fully supported.
cca0c4
+
cca0c4
+Support for \fByaboot\fR has been deprecated as all ppc architecture
cca0c4
+hardware since the Power8 system uses \fBgrub2\fR or petitboot
cca0c4
+which both use the grub2 configuration file format.
cca0c4
+
cca0c4
+Legacy bootloaders \fBLILO\fR, \fBSILO\fR, and \fBELILO\fR
cca0c4
+are deprecated in favor of previously mentioned bootloaders. The
cca0c4
+\fBSILO\fR bootloader should also be considered unsupported.
cca0c4
+
cca0c4
+.SS Default Behavior
cca0c4
+
cca0c4
+The default architecture is chosen at compile time. The grubby executable
cca0c4
+has a series of built in assumptions about what bootloader is being used and
cca0c4
+where its configuration file lives. If no output format option is specified
cca0c4
+on the command line then grubby will use these default settings to first
cca0c4
+search for an existing configuration and, if it is not found, assume that
cca0c4
+it should be placed in the standard location. These default assumptions are
cca0c4
+listed in the table below.
cca0c4
+
cca0c4
+.TS
cca0c4
+allbox;
cca0c4
+lbw6 lbw10 lbw18
cca0c4
+l l l.
cca0c4
+ Arch	Bootloader	Configuration File
cca0c4
+ x86_64 [BIOS]	grub2	/boot/grub2/grub.cfg
cca0c4
+ x86_64 [UEFI]	grub2	/boot/efi/EFI/redhat/grub.cfg
cca0c4
+ i386	grub2	/boot/grub2/grub.cfg
cca0c4
+ ia64	elilo	/boot/efi/EFI/redhat/elilo.conf
cca0c4
+ ppc [>=Power8]	grub2	/boot/grub2/grub.cfg
cca0c4
+ ppc [<=Power7]	yaboot	/etc/yaboot.conf
cca0c4
+ s390	zipl	/etc/zipl.conf
cca0c4
+ s390x	zipl	/etc/zipl.conf
cca0c4
+.TE
cca0c4
+
cca0c4
 
cca0c4
 .SS Special Arguments
cca0c4
 
cca0c4
 There are a number of ways to specify the kernel used for \fB-\-info\fR,
cca0c4
-\fB-\-remove-kernel\fR, and \fB-\-update-kernel\fR. Specificying \fBDEFAULT\fR
cca0c4
+\fB-\-remove-kernel\fR, and \fB-\-update-kernel\fR. Specifying \fBDEFAULT\fR
cca0c4
 or \fBALL\fR selects the default entry and all of the entries, respectively.
cca0c4
 If a comma separated list of numbers is given, the boot entries indexed
cca0c4
 by those numbers are selected. Finally, the title of a boot entry may
cca0c4
@@ -59,12 +77,17 @@ with that title are used.
cca0c4
 
cca0c4
 .TP
cca0c4
 \fB-\-add-kernel\fR=\fIkernel-path\fR
cca0c4
-Add a new boot entry for the kernel located at \fIkernel-path\fR.
cca0c4
+Add a new boot entry for the kernel located at \fIkernel-path\fR. A title for
cca0c4
+the boot entry must be set using \fB-\-title\fR. Most invocations should also
cca0c4
+include \fB-\-initrd\fR with memtest86 as a notable exception.
cca0c4
+
cca0c4
+The \fB-\-update-kernel\fR
cca0c4
+option may not be used in the same invocation. 
cca0c4
 
cca0c4
 .TP
cca0c4
 \fB-\-remove-kernel\fR=\fIkernel-path\fR
cca0c4
 Removes all boot entries which match \fIkernel-path\fR. This may be used
cca0c4
-along with -\-add-kernel, in which case the new kernel being added will
cca0c4
+along with \fB-\-add-kernel\fR, in which case the new kernel being added will
cca0c4
 never be removed.
cca0c4
 
cca0c4
 .TP
cca0c4
@@ -110,14 +133,19 @@ the title is shortened to a (unique) entry.
cca0c4
 Use \fIinitrd-path\fR as the path to an initial ram disk for a new kernel
cca0c4
 being added.
cca0c4
 
cca0c4
+.TP
cca0c4
+\fB-\-efi\fR
cca0c4
+Use linuxefi and initrdefi when constructing bootloader stanzas instead of linux and initrd.
cca0c4
+
cca0c4
 .TP
cca0c4
 \fB-\-set-default\fR=\fIkernel-path\fR
cca0c4
 The first entry which boots the specified kernel is made the default
cca0c4
-boot entry.
cca0c4
+boot entry. This may not be invoked with \fB-\-set-default-index\fR.
cca0c4
 
cca0c4
 .TP
cca0c4
 \fB-\-set-default-index\fR=\fIentry-index\fR
cca0c4
-Makes the given entry number the default boot entry.
cca0c4
+Makes the given entry number the default boot entry. This may not
cca0c4
+be invoked with \fB-\-set-default\fR.
cca0c4
 
cca0c4
 .TP
cca0c4
 \fB-\-make-default\fR
cca0c4
@@ -131,8 +159,17 @@ Set the position at which to add a new entry created with \fB-\-add-kernel\fR.
cca0c4
 \fB-\-debug\fR
cca0c4
 Display extra debugging information for failures.
cca0c4
 
cca0c4
+.TP
cca0c4
+\fB-i\fR, \fB-\-extra-initrd\fR=\fIinitrd-path\fR
cca0c4
+Use \fIinitrd-path\fR as the path for an auxiliary initrd image.
cca0c4
+
cca0c4
 .SS Display Options
cca0c4
 
cca0c4
+Passing the display option to grubby will cause it to print out the
cca0c4
+requested information about the current bootloader configuration and
cca0c4
+then immediately exit.  These options should not be used in any
cca0c4
+script intended to update the bootloader configuration.
cca0c4
+
cca0c4
 .TP
cca0c4
 \fB-\-default-kernel\fR
cca0c4
 Display the full path to the current default kernel and exit.
cca0c4
@@ -159,34 +196,56 @@ for \fBgrub\fR requires a commented out boot directive \fBgrub.conf\fR
cca0c4
 identical to the standard directive in the lilo configuration file. If this
cca0c4
 is not present \fBgrubby\fR will assume grub is not installed (note
cca0c4
 that \fBanaconda\fR places this directive in \fBgrub.conf\fR files it creates).
cca0c4
-This option is only available on ia32 platforms.
cca0c4
+
cca0c4
+\fIThis option is only available on i386 platforms.\fR
cca0c4
 
cca0c4
 .TP
cca0c4
-\fB-\-version\fR
cca0c4
+\fB-v\fR, \fB-\-version\fR
cca0c4
 Display the version of \fBgrubby\fR being run and then exit immediately.
cca0c4
 
cca0c4
 .SS Output Format Options
cca0c4
 
cca0c4
+Sane default options for the current platform are compiled into grubby on
cca0c4
+a per platform basis. These defaults determine the format and layout of
cca0c4
+the generated bootloader configuration file. A different configuration file
cca0c4
+format may be specified on the command line if the system uses a supported
cca0c4
+alternative bootloader.
cca0c4
+
cca0c4
 .TP
cca0c4
 \fB-\-elilo\fR
cca0c4
-Use an \fBelilo\fR style configuration file.
cca0c4
+Use an \fBelilo\fR style configuration file. This is the default on ia64 platforms. This format is deprecated.
cca0c4
+
cca0c4
+.TP
cca0c4
+\fB-\-extlinux\fR
cca0c4
+Use an \fBextlinux\fR style configuration file. This format is deprecated.
cca0c4
 
cca0c4
 .TP
cca0c4
 \fB-\-grub\fR
cca0c4
-Use a \fBgrub\fR style configuration file instead of \fBlilo\fR style. This
cca0c4
-is the default on ia32 platforms.
cca0c4
+Use a \fBgrub\fR style configuration file. This is the default on ia32 platforms.
cca0c4
+
cca0c4
+.TP
cca0c4
+\fB-\-grub2\fR
cca0c4
+Use a \fBgrub2\fR style configuration file. This is the default on \fBx86_64\fR
cca0c4
+architecture as well as the \fBppc64\fR and \fBppc64le\fR architectures
cca0c4
+running on Power8 or later hardware.
cca0c4
 
cca0c4
 .TP
cca0c4
 \fB-\-lilo\fR
cca0c4
 Use a \fBlilo\fR style configuration file.
cca0c4
 
cca0c4
+.TP
cca0c4
+\fB-\-silo\fR
cca0c4
+Use a \fBsilo\fR style configuration file. This is the default on SPARC systems. This format is legacy, deprecated, and unsupported.
cca0c4
+
cca0c4
 .TP
cca0c4
 \fB-\-yaboot\fR
cca0c4
-Use an \fByaboot\fR style configuration file.
cca0c4
+Use a \fByaboot\fR style configuration file. This is the default for
cca0c4
+the \fBppc\fR architecture on on Power7 and earlier hardware.
cca0c4
 
cca0c4
 .TP
cca0c4
 \fB-\-zipl\fR
cca0c4
-Use an \fBzipl\fR style configuration file.
cca0c4
+Use a \fBzipl\fR style configuration file. This is the default on the
cca0c4
+legacy s390 and current s390x architectures.
cca0c4
 
cca0c4
 .SS Override Options
cca0c4
 
cca0c4
@@ -200,7 +259,7 @@ that behavior, and is designed primarily for testing.
cca0c4
 
cca0c4
 .TP
cca0c4
 \fB-\-boot-filesystem\fR=\fIbootfs\fR
cca0c4
-The \fBgrub\fR boot loader expects file paths listed in it's configuration
cca0c4
+The \fBgrub\fR boot loader expects file paths listed in its configuration
cca0c4
 path to be relative to the top of the filesystem they are on, rather then
cca0c4
 relative to the current root filesystem. By default \fBgrubby\fR searches
cca0c4
 the list of currently mounted filesystems to determine this. If this option
cca0c4
@@ -208,23 +267,39 @@ is given \fBgrubby\fR acts as if the specified filesystem was the filesystem
cca0c4
 containing the kernel (this option is designed primarily for testing).
cca0c4
 
cca0c4
 .TP
cca0c4
-\fB-\-config-file\fR=\fIpath\fR
cca0c4
+\fB-\-env\fR=\fIpath\fR
cca0c4
+Path for the file where grub environment data is stored.
cca0c4
+
cca0c4
+.TP
cca0c4
+\fB-c\fR, \fB-\-config-file\fR=\fIpath\fR
cca0c4
 Use \fIpath\fR as the configuration file rather then the default.
cca0c4
 
cca0c4
-\fB-\-devtree\fR=\fIpath\fR
cca0c4
+.TP
cca0c4
+\fB-o\fR, \fB-\-output-file\fR=\fIfile_path\fR
cca0c4
+The destination path for the updated configuration file. Use "-" to
cca0c4
+send it to stdout.
cca0c4
+
cca0c4
+.TP
cca0c4
+\fB-\-devtree\fR=\fIfile_path\fR
cca0c4
 Use \fIpath\fR for device tree path in place of the path of any devicetree
cca0c4
 directive found in the template stanza.
cca0c4
 
cca0c4
+.TP
cca0c4
+\fB-\-devtreedir\fR=\fIfile_path\fR
cca0c4
+Use the specified \fIfile path\fR to load the devicetree definition. This is for
cca0c4
+platforms where a flat file is used instead of firmware to instruct the kernel
cca0c4
+how to communicate with devices.
cca0c4
+
cca0c4
 .SS Multiboot Options
cca0c4
 
cca0c4
-The Multiboot Specification provides a genreic interface for boot
cca0c4
+The Multiboot Specification provides a generic interface for boot
cca0c4
 loaders and operating systems.  It is supported by the GRUB bootloader.
cca0c4
 
cca0c4
 .TP
cca0c4
 \fB-\-add-multiboot\fR=\fImultiboot-path\fR
cca0c4
 Add a new boot entry for the multiboot kernel located at
cca0c4
 \fImultiboot-path\fR.  Note that this is generally accompanied with a
cca0c4
-\fI--add-kernel\fR option.
cca0c4
+\fB--add-kernel\fR option.
cca0c4
 
cca0c4
 .TP
cca0c4
 \fB-\-remove-multiboot\fR=\fImultiboot-path\fR
cca0c4
@@ -249,11 +324,63 @@ The command line syntax is more than a little baroque. This probably
cca0c4
 won't be fixed as \fBgrubby\fR is only intended to be called from shell
cca0c4
 scripts which can get it right.
cca0c4
 
cca0c4
+.SH EXAMPLE
cca0c4
+
cca0c4
+The following examples assume the following:
cca0c4
+
cca0c4
+.TS
cca0c4
+allbox;
cca0c4
+rbw15 l.
cca0c4
+cfg_file	Full path to bootloader config file
cca0c4
+new_kernel	Full path to kernel image to be installed
cca0c4
+old_kernel	Full path to old kernel image to be removed
cca0c4
+current_kernel	Full path to a currently installed kernel
cca0c4
+entry_title	Title that appears on bootloader menu
cca0c4
+new_initrd	Full path to initrd for a new kernel
cca0c4
+kernel_args	Set of arguments for the kernel
cca0c4
+menu_index	Index number of a menu entry
cca0c4
+.TE
cca0c4
+
cca0c4
+The examples below quote strings that may have spaces or other whitespace in them. It is also
cca0c4
+perfectly valid to backslash escape these strings if that is more convenient.
cca0c4
+
cca0c4
+.PP
cca0c4
+Add a new kernel entry and copy all options from the current default kernel. This is the behavior
cca0c4
+that most users will want.
cca0c4
+.IP
cca0c4
+\fBgrubby\fR --add-kernel=\fInew_kernel\fR --title="\fIentry_title\fR" --initrd="\fInew_initrd\fR" --copy-default
cca0c4
+.PP
cca0c4
+Add a new kernel entry with custom arguments
cca0c4
+.IP
cca0c4
+\fBgrubby\fR --add-kernel=\fInew_kernel\fR --title="\fIentry_title\fR" --initrd="\fInew_initrd\fR" --args=\fIkernel_args\fR
cca0c4
+.PP
cca0c4
+Remove \fBall menu entries\fR for a specified kernel.
cca0c4
+.IP
cca0c4
+\fBgrubby\fR --remove-kernel=\fIold_kernel\fR
cca0c4
+.PP
cca0c4
+Target a single menu entry to remove without targetting other entries with the same kernel.
cca0c4
+.IP
cca0c4
+\fBgrubby\fR --info=\fIold_kernel\fR
cca0c4
+
cca0c4
+\fBgrubby\fR --remove-kernel=\fImenu_index\fR
cca0c4
+.PP
cca0c4
+Update the arguments for all entries of a specific kernel. New arguments get added while existing arguments get updated values.
cca0c4
+.IP
cca0c4
+\fBgrubby\fR --update-kernel=\fIcurrent_kernel\fR --args="\fIkernel_args\fR"
cca0c4
+.PP
cca0c4
+Remove the arguments for a single entry of a specific kernel.
cca0c4
+.IP
cca0c4
+\fBgrubby\fR --info=\fIcurrent_kernel\fR
cca0c4
+
cca0c4
+\fBgrubby\fR --remove-args=\fImenu_index\fR --args="\fIkernel_args\fR"
cca0c4
+
cca0c4
 .SH "SEE ALSO"
cca0c4
 
cca0c4
 .BR grub (8),
cca0c4
 .BR lilo (8),
cca0c4
 .BR yaboot (8),
cca0c4
+.BR zipl (8),
cca0c4
+.BR dracut (8),
cca0c4
 .BR mkinitrd (8)
cca0c4
 
cca0c4
 .SH AUTHORS
cca0c4
@@ -262,4 +389,5 @@ scripts which can get it right.
cca0c4
 Erik Troan
cca0c4
 Jeremy Katz
cca0c4
 Peter Jones
cca0c4
+Robert Marshall
cca0c4
 .fi
cca0c4
-- 
cca0c4
2.17.1
cca0c4