24fce8
From 9073de7c059fcc9fd5ca837068d96cb0246f3c99 Mon Sep 17 00:00:00 2001
24fce8
From: Robert Marshall <rmarshall@redhat.com>
24fce8
Date: Fri, 1 Jul 2016 14:03:38 -0400
24fce8
Subject: [PATCH 25/55] Reorganize grubby man page (#1232168)
24fce8
24fce8
Broke the grubby man page into clearer sections and re-organized the
24fce8
content by general use case for easier reading.
24fce8
24fce8
Related: rhbz#1232168
24fce8
---
24fce8
 grubby.8 | 220 ++++++++++++++++++++++++++++++-------------------------
24fce8
 1 file changed, 120 insertions(+), 100 deletions(-)
24fce8
24fce8
diff --git a/grubby.8 b/grubby.8
24fce8
index f1bfb9336e9..a3033d87254 100644
24fce8
--- a/grubby.8
24fce8
+++ b/grubby.8
24fce8
@@ -1,15 +1,18 @@
24fce8
 .TH GRUBBY 8 "Tue Jan 18 2005"
24fce8
+
24fce8
 .SH NAME
24fce8
+
24fce8
 grubby \- command line tool for configuring grub, lilo, elilo, yaboot and zipl
24fce8
 
24fce8
 .SH SYNOPSIS
24fce8
-\fBgrubby\fR [--add-kernel=\fIkernel-path\fR] [--args=\fIargs\fR] 
24fce8
-       [--bad-image-okay] [--boot-filesystem=\fIbootfs\fR] 
24fce8
+
24fce8
+\fBgrubby\fR [--add-kernel=\fIkernel-path\fR] [--args=\fIargs\fR]
24fce8
+       [--bad-image-okay] [--boot-filesystem=\fIbootfs\fR]
24fce8
        [--bootloader-probe] [--config-file \fIpath\fR] [--copy-default]
24fce8
        [--debug] [--default-kernel] [--default-index] [--default-title]
24fce8
        [--devtree=\fIdevicetree.dtb\fR] [--set-index=\fIentry-index\fR]
24fce8
        [--grub] [--lilo] [--yaboot] [--silo] [--zipl]
24fce8
-       [--info=\fIkernel-path\fR] [--initrd=\fIinitrd-path\fR] 
24fce8
+       [--info=\fIkernel-path\fR] [--initrd=\fIinitrd-path\fR]
24fce8
        [--make-default] [-o path] [--version]
24fce8
        [--remove-kernel=\fIkernel-path\fR] [--remove-args=\fIargs\fR]
24fce8
        [--set-default=\fIkernel-path\fR] [--set-default-index=\fIentry-index\fR]
24fce8
@@ -18,12 +21,17 @@ grubby \- command line tool for configuring grub, lilo, elilo, yaboot and zipl
24fce8
        [--remove-mbargs=\fIargs\fR]
24fce8
 
24fce8
 .SH DESCRIPTION
24fce8
+
24fce8
+.SS General Information
24fce8
+
24fce8
 \fBgrubby\fR is a command line tool for updating and displaying information
24fce8
 about the configuration files for the \fBgrub\fR, \fBlilo\fR, \fBelilo\fR
24fce8
 (ia64), \fByaboot\fR (powerpc) and \fBzipl\fR (s390) boot loaders. It
24fce8
 is primarily designed to be used from scripts which install new
24fce8
 kernels and need to find information about the current boot environment.
24fce8
 
24fce8
+.SS Architecture Support
24fce8
+
24fce8
 On BIOS-based Intel x86 platforms, \fBgrub2\fR is the default bootloader and
24fce8
 the configuration file is in \fB/boot/grub2/grub.cfg\fR.  On UEFI-based Intel
24fce8
 x86 platforms, \fBgrub2\fR is the default bootloader, and the configuration
24fce8
@@ -35,6 +43,8 @@ config stored in \fB/boot/grub2/grub.cfg\fR. The earlier Power7 systems use \fBy
24fce8
 parsing and the configuration file should be in \fB/etc/yaboot.conf\fR.  On
24fce8
 s390 platforms the \fBzipl bootloader\fR will read from \fB/etc/zipl.conf\fR.
24fce8
 
24fce8
+.SS Special Arguments
24fce8
+
24fce8
 There are a number of ways to specify the kernel used for \fB-\-info\fR,
24fce8
 \fB-\-remove-kernel\fR, and \fB-\-update-kernel\fR. Specificying \fBDEFAULT\fR
24fce8
 or \fBALL\fR selects the default entry and all of the entries, respectively.
24fce8
@@ -44,13 +54,24 @@ be specified by using \fBTITLE=\fItitle\fR as the argument; all entries
24fce8
 with that title are used.
24fce8
 
24fce8
 .SH OPTIONS
24fce8
+
24fce8
+.SS Basic Options
24fce8
+
24fce8
 .TP
24fce8
 \fB-\-add-kernel\fR=\fIkernel-path\fR
24fce8
 Add a new boot entry for the kernel located at \fIkernel-path\fR.
24fce8
 
24fce8
 .TP
24fce8
-\fB-\-set-index\fR=\fIentry-index\fR
24fce8
-Set the position at which to add a new entry created with \fB-\-add-kernel\fR.
24fce8
+\fB-\-remove-kernel\fR=\fIkernel-path\fR
24fce8
+Removes all boot entries which match \fIkernel-path\fR. This may be used
24fce8
+along with -\-add-kernel, in which case the new kernel being added will
24fce8
+never be removed.
24fce8
+
24fce8
+.TP
24fce8
+\fB-\-update-kernel\fR=\fIkernel-path\fR
24fce8
+The entries for kernels matching \fRkernel-path\fR are updated. Currently
24fce8
+the only items that can be updated is the kernel argument list, which is
24fce8
+modified via the \fB-\-args\fR and \fB-\-remove-args\fR options.
24fce8
 
24fce8
 .TP
24fce8
 \fB-\-args\fR=\fIkernel-args\fR
24fce8
@@ -65,38 +86,11 @@ file has special handling for specifying the root filesystem (like
24fce8
 lilo.conf does).
24fce8
 
24fce8
 .TP
24fce8
-\fB-\-bad-image-okay\fR
24fce8
-When \fBgrubby\fR is looking for a entry to use for something (such
24fce8
-as a template or a default boot entry) it uses sanity checks, such as
24fce8
-ensuring that the kernel exists in the filesystem, to make sure
24fce8
-entries that obviously won't work aren't selected. This option overrides
24fce8
-that behavior, and is designed primarily for testing.
24fce8
-
24fce8
-.TP
24fce8
-\fB-\-boot-filesystem\fR=\fIbootfs\fR
24fce8
-The \fBgrub\fR boot loader expects file paths listed in it's configuration
24fce8
-path to be relative to the top of the filesystem they are on, rather then
24fce8
-relative to the current root filesystem. By default \fBgrubby\fR searches
24fce8
-the list of currently mounted filesystems to determine this. If this option
24fce8
-is given \fBgrubby\fR acts as if the specified filesystem was the filesystem
24fce8
-containing the kernel (this option is designed primarily for testing).
24fce8
-
24fce8
-.TP
24fce8
-\fB-\-bootloader-probe\fR
24fce8
-\fBgrubby\fR tries to determine if \fBgrub\fR or \fBlilo\fR is currently 
24fce8
-installed. When one of those bootloaders is found the name of that bootloader
24fce8
-is displayed on stdout.  Both could be installed (on different devices), and
24fce8
-grubby will print out the names of both bootloaders, one per line. The probe
24fce8
-for \fBgrub\fR requires a commented out boot directive \fBgrub.conf\fR
24fce8
-identical to the standard directive in the lilo configuration file. If this
24fce8
-is not present \fBgrubby\fR will assume grub is not installed (note 
24fce8
-that \fBanaconda\fR places this directive in \fBgrub.conf\fR files it creates).
24fce8
-This option is only available on ia32 platforms. 
24fce8
-
24fce8
-
24fce8
-.TP
24fce8
-\fB-\-config-file\fR=\fIpath\fR
24fce8
-Use \fIpath\fR as the configuration file rather then the default.
24fce8
+\fB-\-remove-args\fR=\fIkernel-args\fR
24fce8
+The arguments specified by \fIkernel-args\fR are removed from the
24fce8
+kernels specified by \fB-\-update-kernel\fR. The \fBroot\fR argument
24fce8
+gets special handling for configuration files that support separate root
24fce8
+filesystem configuration.
24fce8
 
24fce8
 .TP
24fce8
 \fB-\-copy-default\fR
24fce8
@@ -104,10 +98,41 @@ Use \fIpath\fR as the configuration file rather then the default.
24fce8
 root device) as possible from the current default kernel. The kernel path
24fce8
 and initrd path will never be copied.
24fce8
 
24fce8
+.TP
24fce8
+\fB-\-title\fR=\fIentry-title\fR
24fce8
+When a new kernel entry is added \fIentry-title\fR is used as the title
24fce8
+(\fBlilo\fR label) for the entry. If \fIentry-title\fR is longer then maximum
24fce8
+length allowed by the bootloader (15 for lilo, unlimited for grub and elilo)
24fce8
+the title is shortened to a (unique) entry.
24fce8
+
24fce8
+.TP
24fce8
+\fB-\-initrd\fR=\fIinitrd-path\fR
24fce8
+Use \fIinitrd-path\fR as the path to an initial ram disk for a new kernel
24fce8
+being added.
24fce8
+
24fce8
+.TP
24fce8
+\fB-\-set-default\fR=\fIkernel-path\fR
24fce8
+The first entry which boots the specified kernel is made the default
24fce8
+boot entry.
24fce8
+
24fce8
+.TP
24fce8
+\fB-\-set-default-index\fR=\fIentry-index\fR
24fce8
+Makes the given entry number the default boot entry.
24fce8
+
24fce8
+.TP
24fce8
+\fB-\-make-default\fR
24fce8
+Make the new kernel entry being added the default entry.
24fce8
+
24fce8
+.TP
24fce8
+\fB-\-set-index\fR=\fIentry-index\fR
24fce8
+Set the position at which to add a new entry created with \fB-\-add-kernel\fR.
24fce8
+
24fce8
 .TP
24fce8
 \fB-\-debug\fR
24fce8
 Display extra debugging information for failures.
24fce8
 
24fce8
+.SS Display Options
24fce8
+
24fce8
 .TP
24fce8
 \fB-\-default-kernel\fR
24fce8
 Display the full path to the current default kernel and exit.
24fce8
@@ -121,9 +146,26 @@ Display the numeric index of the current default boot entry and exit.
24fce8
 Display the title of the current default boot entry and exit.
24fce8
 
24fce8
 .TP
24fce8
-\fB-\-devtree\fR=\fIpath\fR
24fce8
-Use \fIpath\fR for device tree path in place of the path of any devicetree
24fce8
-directive found in the template stanza.
24fce8
+\fB-\-info\fR=\fIkernel-path\fR
24fce8
+Display information on all boot entries which match \fIkernel-path\fR. I
24fce8
+
24fce8
+.TP
24fce8
+\fB-\-bootloader-probe\fR
24fce8
+\fBgrubby\fR tries to determine if \fBgrub\fR or \fBlilo\fR is currently
24fce8
+installed. When one of those bootloaders is found the name of that bootloader
24fce8
+is displayed on stdout.  Both could be installed (on different devices), and
24fce8
+grubby will print out the names of both bootloaders, one per line. The probe
24fce8
+for \fBgrub\fR requires a commented out boot directive \fBgrub.conf\fR
24fce8
+identical to the standard directive in the lilo configuration file. If this
24fce8
+is not present \fBgrubby\fR will assume grub is not installed (note
24fce8
+that \fBanaconda\fR places this directive in \fBgrub.conf\fR files it creates).
24fce8
+This option is only available on ia32 platforms.
24fce8
+
24fce8
+.TP
24fce8
+\fB-\-version\fR
24fce8
+Display the version of \fBgrubby\fR being run and then exit immediately.
24fce8
+
24fce8
+.SS Output Format Options
24fce8
 
24fce8
 .TP
24fce8
 \fB-\-elilo\fR
24fce8
@@ -134,62 +176,10 @@ Use an \fBelilo\fR style configuration file.
24fce8
 Use a \fBgrub\fR style configuration file instead of \fBlilo\fR style. This
24fce8
 is the default on ia32 platforms.
24fce8
 
24fce8
-.TP
24fce8
-\fB-\-info\fR=\fIkernel-path\fR
24fce8
-Display information on all boot entries which match \fIkernel-path\fR. I
24fce8
-
24fce8
-.TP
24fce8
-\fB-\-initrd\fR=\fIinitrd-path\fR
24fce8
-Use \fIinitrd-path\fR as the path to an initial ram disk for a new kernel
24fce8
-being added.
24fce8
-
24fce8
 .TP
24fce8
 \fB-\-lilo\fR
24fce8
 Use a \fBlilo\fR style configuration file.
24fce8
 
24fce8
-.TP
24fce8
-\fB-\-make-default\fR
24fce8
-Make the new kernel entry being added the default entry.
24fce8
-
24fce8
-.TP
24fce8
-\fB-\-remove-args\fR=\fIkernel-args\fR
24fce8
-The arguments specified by \fIkernel-args\fR are removed from the 
24fce8
-kernels specified by \fB-\-update-kernel\fR. The \fBroot\fR argument
24fce8
-gets special handling for configuration files that support separate root
24fce8
-filesystem configuration.
24fce8
-
24fce8
-.TP
24fce8
-\fB-\-remove-kernel\fR=\fIkernel-path\fR
24fce8
-Removes all boot entries which match \fIkernel-path\fR. This may be used
24fce8
-along with -\-add-kernel, in which case the new kernel being added will
24fce8
-never be removed.
24fce8
-
24fce8
-.TP
24fce8
-\fB-\-set-default\fR=\fIkernel-path\fR
24fce8
-The first entry which boots the specified kernel is made the default
24fce8
-boot entry.
24fce8
-
24fce8
-.TP
24fce8
-\fB-\-set-default-index\fR=\fIentry-index\fR
24fce8
-Makes the given entry number the default boot entry.
24fce8
-
24fce8
-.TP
24fce8
-\fB-\-title\fR=\fIentry-title\fR
24fce8
-When a new kernel entry is added \fIentry-title\fR is used as the title
24fce8
-(\fBlilo\fR label) for the entry. If \fIentry-title\fR is longer then maximum
24fce8
-length allowed by the bootloader (15 for lilo, unlimited for grub and elilo)
24fce8
-the title is shortened to a (unique) entry.
24fce8
-
24fce8
-.TP
24fce8
-\fB-\-update-kernel\fR=\fIkernel-path\fR
24fce8
-The entries for kernels matching \fRkernel-path\fR are updated. Currently
24fce8
-the only items that can be updated is the kernel argument list, which is
24fce8
-modified via the \fB-\-args\fR and \fB-\-remove-args\fR options.
24fce8
-
24fce8
-.TP
24fce8
-\fB-\-version\fR
24fce8
-Display the version of \fBgrubby\fR being run and then exit immediately.
24fce8
-
24fce8
 .TP
24fce8
 \fB-\-yaboot\fR
24fce8
 Use an \fByaboot\fR style configuration file.
24fce8
@@ -198,7 +188,35 @@ Use an \fByaboot\fR style configuration file.
24fce8
 \fB-\-zipl\fR
24fce8
 Use an \fBzipl\fR style configuration file.
24fce8
 
24fce8
-.SH MULTIBOOT OPTIONS
24fce8
+.SS Override Options
24fce8
+
24fce8
+.TP
24fce8
+\fB-\-bad-image-okay\fR
24fce8
+When \fBgrubby\fR is looking for a entry to use for something (such
24fce8
+as a template or a default boot entry) it uses sanity checks, such as
24fce8
+ensuring that the kernel exists in the filesystem, to make sure
24fce8
+entries that obviously won't work aren't selected. This option overrides
24fce8
+that behavior, and is designed primarily for testing.
24fce8
+
24fce8
+.TP
24fce8
+\fB-\-boot-filesystem\fR=\fIbootfs\fR
24fce8
+The \fBgrub\fR boot loader expects file paths listed in it's configuration
24fce8
+path to be relative to the top of the filesystem they are on, rather then
24fce8
+relative to the current root filesystem. By default \fBgrubby\fR searches
24fce8
+the list of currently mounted filesystems to determine this. If this option
24fce8
+is given \fBgrubby\fR acts as if the specified filesystem was the filesystem
24fce8
+containing the kernel (this option is designed primarily for testing).
24fce8
+
24fce8
+.TP
24fce8
+\fB-\-config-file\fR=\fIpath\fR
24fce8
+Use \fIpath\fR as the configuration file rather then the default.
24fce8
+
24fce8
+\fB-\-devtree\fR=\fIpath\fR
24fce8
+Use \fIpath\fR for device tree path in place of the path of any devicetree
24fce8
+directive found in the template stanza.
24fce8
+
24fce8
+.SS Multiboot Options
24fce8
+
24fce8
 The Multiboot Specification provides a genreic interface for boot
24fce8
 loaders and operating systems.  It is supported by the GRUB bootloader.
24fce8
 
24fce8
@@ -210,34 +228,36 @@ Add a new boot entry for the multiboot kernel located at
24fce8
 
24fce8
 .TP
24fce8
 \fB-\-remove-multiboot\fR=\fImultiboot-path\fR
24fce8
-Removes all boot entries which match \fImultiboot-path\fR. 
24fce8
+Removes all boot entries which match \fImultiboot-path\fR.
24fce8
 
24fce8
 .TP
24fce8
 \fB-\-mbargs\fR=\fImultiboot-args\fR
24fce8
-When a new multiboot kernel is added, this specifies the command line 
24fce8
-arguments which should be passed to that kernel by default 
24fce8
+When a new multiboot kernel is added, this specifies the command line
24fce8
+arguments which should be passed to that kernel by default
24fce8
 When \fB-\-update-kernel\fR is used, this specifies new arguments to add
24fce8
 to the argument list. Multiple, space separated arguments may be used. If
24fce8
-an argument already exists the new value replaces the old values. 
24fce8
+an argument already exists the new value replaces the old values.
24fce8
 
24fce8
 .TP
24fce8
 \fB-\-remove-mbargs\fR=\fImultiboot-args\fR
24fce8
-The arguments specified by \fImultiboot-args\fR are removed from the 
24fce8
-kernels specified by \fB-\-update-kernel\fR. 
24fce8
-
24fce8
+The arguments specified by \fImultiboot-args\fR are removed from the
24fce8
+kernels specified by \fB-\-update-kernel\fR.
24fce8
 
24fce8
 .SH "BUGS"
24fce8
+
24fce8
 The command line syntax is more than a little baroque. This probably
24fce8
 won't be fixed as \fBgrubby\fR is only intended to be called from shell
24fce8
 scripts which can get it right.
24fce8
 
24fce8
 .SH "SEE ALSO"
24fce8
+
24fce8
 .BR grub (8),
24fce8
 .BR lilo (8),
24fce8
 .BR yaboot (8),
24fce8
 .BR mkinitrd (8)
24fce8
 
24fce8
 .SH AUTHORS
24fce8
+
24fce8
 .nf
24fce8
 Erik Troan
24fce8
 Jeremy Katz
24fce8
-- 
24fce8
2.17.1
24fce8