commit ad9967173a0171a0610ee525308e4059ac58b251
Author: Stephen Wadeley <swadeley(a)redhat.com>
Date: Mon Aug 31 07:08:46 2015 +0200
Configuring GRUB 2 Using the grubby Tool
Changing examples to bridgeheads
en-US/Working_with_the_GRUB_2_Boot_Loader.xml | 48 ++++++++++++++-----------
1 files changed, 27 insertions(+), 21 deletions(-)
---
diff --git a/en-US/Working_with_the_GRUB_2_Boot_Loader.xml
b/en-US/Working_with_the_GRUB_2_Boot_Loader.xml
index 9ac2fb2..f7ca789 100644
--- a/en-US/Working_with_the_GRUB_2_Boot_Loader.xml
+++ b/en-US/Working_with_the_GRUB_2_Boot_Loader.xml
@@ -144,11 +144,14 @@ The <option>rhgb</option> and
<option>quiet</option> parameters can be removed i
</step>
</procedure>
</section>
+
+<section id="sec-Configuring_GRUB_2_Using_the_grubby_Tool">
+<title>Configuring GRUB 2 Using the grubby Tool</title>
<para>
- The <command>grubby</command> tool can be used to read information from,
and make persistent changes to, the <filename>grub.cfg</filename> file. It
enables, for example, changing GRUB menu entries to specify what arguments to pass to a
kernel on system start and changing the default kernel.<remark> IS THIS BIT
TRUE?</remark> In Red Hat Enterprise Linux 7,
<command>grubby</command> defaults to working with the GRUB 2 configuration
file, <filename>grub.cfg</filename>.<remark> Do we need to warn users
to use the "--grub2" option in scripts?</remark>
+ The <command>grubby</command> tool can be used to read information from,
and make persistent changes to, the <filename>grub.cfg</filename> file. It
enables, for example, changing GRUB menu entries to specify what arguments to pass to a
kernel on system start and changing the default kernel. In Red Hat
Enterprise Linux 7, <command>grubby</command> defaults to
working with the GRUB 2 configuration file, <filename>grub.cfg</filename>.
</para>
-<example id="ex-Listing_the_Default_Kernel">
-<title>Listing the Default Kernel</title>
+
+<bridgehead id="bh-Listing_the_Default_Kernel"
renderas="sect3">Listing the Default Kernel</bridgehead>
<para>
To find out the file name of the default kernel, enter a command as follows:
</para>
@@ -160,27 +163,35 @@ The <option>rhgb</option> and
<option>quiet</option> parameters can be removed i
<screen>~]# <command>grubby --default-index</command>
0</screen>
-</example>
-<example id="ex-Viewing_the_GRUB_Menu_Entry_for_a_Kernel">
-<title>Viewing the GRUB Menu Entry for a Kernel</title>
+<bridgehead id="bh-Changing_the_Default_Boot_Entry"
renderas="sect3">Changing the Default Boot Entry</bridgehead>
+ <para>
+ To make a persistent change in the kernel designated as the default kernel, use
the <command>grubby</command> command as follows:
+ <screen>~]# <command>grubby --set-default
/boot/vmlinuz-3.10.0-229.4.2.el7.x86_64</command></screen>
+ </para>
+
+<bridgehead id="bh-Viewing_the_GRUB_Menu_Entry_for_a_Kernel"
renderas="sect3">Viewing the GRUB Menu Entry for a Kernel</bridgehead>
<para>
- To view the GRUB menu entry for a kernel, enter a command as follows:
-</para>
-<screen>~]# <command>grubby --info
/boot/vmlinuz-3.10.0-229.4.2.el7.x86_64</command>
+To list all the kernel menu entries, enter a command as follows:
+ <screen>~]$ <command>grubby
--info=ALL</command></screen>
+ </para>
+
+<para>
+ To view the GRUB menu entry for a specific kernel, enter a command as follows:
+<screen>~]$ <command>grubby --info
/boot/vmlinuz-3.10.0-229.4.2.el7.x86_64</command>
index=0
kernel=/boot/vmlinuz-3.10.0-229.4.2.el7.x86_64
args="ro rd.lvm.lv=rhel/root crashkernel=auto rd.lvm.lv=rhel/swap
vconsole.font=latarcyrheb-sun16 vconsole.keymap=us rhgb quiet LANG=en_US.UTF-8"
root=/dev/mapper/rhel-root
initrd=/boot/initramfs-3.10.0-229.4.2.el7.x86_64.img
title=Red Hat Enterprise Linux Server (3.10.0-229.4.2.el7.x86_64) 7.0
(Maipo)</screen>
-</example>
+Try tab completion to see the available kernels within the <filename
class="directory">/boot/</filename> directory.
+</para>
+
+<bridgehead id="bh-Adding_and_Removing_Arguments_from_a_GRUB_Menu_Entry"
renderas="sect3">Adding and Removing Arguments from a GRUB Menu
Entry</bridgehead>
<para>
The <option>--update-kernel</option> option can be used to update a menu
entry when used in combination with <option>--args</option> to add new
arguments and <option>--remove-arguments</option> to remove existing
arguments. These options accept a quoted space-separated list. The command to
simultaneously add and remove arguments a from GRUB menu entry has the follow format:
<synopsis>grubby --remove-args="<replaceable>argX
argY</replaceable>" --args="<replaceable>argA
argB</replaceable>" --update-kernel
/boot/<replaceable>kernel</replaceable></synopsis>
-
</para>
-<example id="ex-Adding_and_Removing_Arguments_from_a_GRUB_Menu_Entry">
-<title>Adding and Removing Arguments from a GRUB Menu Entry</title>
<para>
To add and remove arguments from a kernel's GRUB menu entry, use a command as
follows:
<screen>~]# <command>grubby --remove-args="rhgb quiet"
--args=console=ttyS0,115200 --update-kernel
/boot/vmlinuz-3.10.0-229.4.2.el7.x86_64</command></screen>
@@ -189,26 +200,22 @@ This command removes the Red Hat graphical boot argument, enables
boot message t
<para>
To review the changes, use the <option>--info</option> command option as
follows:
</para>
-<screen>~]# <command>grubby --info
/boot/vmlinuz-3.10.0-229.4.2.el7.x86_64</command>
+<screen>~]$ <command>grubby --info
/boot/vmlinuz-3.10.0-229.4.2.el7.x86_64</command>
index=0
kernel=/boot/vmlinuz-3.10.0-229.4.2.el7.x86_64
args="ro rd.lvm.lv=rhel/root crashkernel=auto rd.lvm.lv=rhel/swap
vconsole.font=latarcyrheb-sun16 vconsole.keymap=us LANG=en_US.UTF-8 <emphasis
role="bold">ttyS0,115200</emphasis>"
root=/dev/mapper/rhel-root
initrd=/boot/initramfs-3.10.0-229.4.2.el7.x86_64.img
title=Red Hat Enterprise Linux Server (3.10.0-229.4.2.el7.x86_64) 7.0
(Maipo)</screen>
-</example>
-<example id="ex-Updating_All_Kernel_Menus_with_the_Same_Arguments">
-<title>Updating All Kernel Menus with the Same Arguments</title>
+<bridgehead id="bh-Updating_All_Kernel_Menus_with_the_Same_Arguments"
renderas="sect3">Updating All Kernel Menus with the Same
Arguments</bridgehead>
<para>
To add the same kernel boot arguments to all the kernel menu entries, enter a command as
follows:
<screen>~]# <command>grubby --update-kernel=ALL
--args=<replaceable>console=ttyS0,115200</replaceable></command></screen>
The <option>--update-kernel</option> parameter also accepts DEFAULT or a
comma separated list of kernel index numbers.
</para>
-</example>
-<example id="ex-Changing_a_Kernel_Argument">
- <title>Changing a Kernel Argument</title>
+<bridgehead id="bh-Changing_a_Kernel_Argument"
renderas="sect3">Changing a Kernel Argument</bridgehead>
<para>
To change a value in an existing kernel argument, specify the argument again, changing
the value as required. For example, to change the virtual console font size, use a command
as follows:
<screen>~]# <command>grubby --args=vconsole.font=latarcyrheb-sun32
--update-kernel /boot/vmlinuz-3.10.0-229.4.2.el7.x86_64</command>
@@ -219,7 +226,6 @@ root=/dev/mapper/rhel-root
initrd=/boot/initramfs-3.10.0-229.4.2.el7.x86_64.img
title=Red Hat Enterprise Linux Server (3.10.0-229.4.2.el7.x86_64) 7.0
(Maipo)</screen>
</para>
-</example>
<para>
See the <filename>grubby(8)</filename> manual page for more command
options.
</para>
Show replies by date