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

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