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

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