commit 5eca86a555d4ec895adc6f1928408ef8f29239a5
Author: Stephen Wadeley <swadeley(a)redhat.com>
Date: Fri Jun 19 17:04:15 2015 +0200
Update intro to explain about grubby
grubby does not update /etc/default/grub file which needs
to be modified to keep the settings permanent
en-US/Working_with_the_GRUB_2_Boot_Loader.xml | 14 +++++++++++++-
1 files changed, 13 insertions(+), 1 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 31194f1..54f772d 100644
--- a/en-US/Working_with_the_GRUB_2_Boot_Loader.xml
+++ b/en-US/Working_with_the_GRUB_2_Boot_Loader.xml
@@ -27,7 +27,17 @@
<section id="sec-Configuring_the_GRUB_2_Boot_Loader">
<title>Configuring the GRUB 2 Boot Loader</title>
<para>
- GRUB 2 reads its configuration from the
<filename>/boot/grub2/grub.cfg</filename> file on traditional BIOS-based
machines and from the <filename>/boot/efi/EFI/redhat/grub.cfg</filename> file
on UEFI machines. This file contains menu information, however, it is not supposed to be
edited as it is generated by the
<application>/usr/sbin/grub2-mkconfig</application> utility based on Linux
kernels located in the <filename class="directory">/boot/</filename>
directory, template files located in <filename
class="directory">/etc/grub.d/</filename>, and custom settings in the
<filename>/etc/default/grub</filename> file. Any manual edits could therefore
cause the changes to be lost during updates. The GRUB 2 configuration file,
<filename>grub.cfg</filename>, is automatically updated each time a new kernel
is installed. Note that any changes to <filename>/etc/default/grub</filename>
require rebuilding the <filename>grub.cfg</filename> file. To update the GRUB
2 configuration file m
anually, use the <command>grub2-mkconfig
<option>-o</option></command> command as follows:
+ GRUB 2 reads its configuration from the
<filename>/boot/grub2/grub.cfg</filename> file on traditional BIOS-based
machines and from the <filename>/boot/efi/EFI/redhat/grub.cfg</filename> file
on UEFI machines. This file contains menu information.
+ </para>
+ <para>
+ The <filename>grub.cfg</filename> is not supposed to be edited as it
is generated by the <application>/usr/sbin/grub2-mkconfig</application>
utility based on Linux kernels located in the <filename
class="directory">/boot/</filename> directory, template files located
in <filename class="directory">/etc/grub.d/</filename>, and custom
settings in the <filename>/etc/default/grub</filename> file. Any manual edits
could therefore be lost during updates. The GRUB 2 configuration file,
<filename>grub.cfg</filename>, is automatically updated each time a new kernel
is installed. Note that any manual changes to
<filename>/etc/default/grub</filename> require rebuilding the
<filename>grub.cfg</filename> file.</para>
+ <para>
+The <filename>/etc/default/grub</filename> file is used by
<command>grub2-mkconfig</command>, which should only be used by
<systemitem>anaconda</systemitem> when creating
<filename>grub.cfg</filename> initially during the installation process, and
can be used in the event of a system failure, for example if the boot loader
configurations need to be recreated from scratch. In general it is not recommended to use
<filename>grub2-mkconfig</filename> manually except as a last resort. Normal
operations on <filename>grub.cfg</filename>, such as the removal and addition
of new kernels, should be done with the <command>grubby</command> tool and,
for scripts, using <command>new-kernel-pkg</command> tool. If you use
<command>grubby</command> to modify the default kernel the changes continues
to be inherited when new kernels are installed.
+ </para>
+
+ <bridgehead renderas="sect3">Rebuilding the GRUB 2 Configuration
File</bridgehead>
+ <para>
+ To rebuild the GRUB 2 configuration file manually using the
<command>grub2-mkconfig</command> command, proceed as follows:
</para>
<itemizedlist>
@@ -44,6 +54,8 @@
</para>
</listitem>
</itemizedlist>
+
+<bridgehead renderas="sect3">Menu Entries in grub.cfg</bridgehead>
<para>
Among various code snippets and directives, the
<filename>grub.cfg</filename> configuration file contains one or more
<literal>menuentry</literal> blocks, each representing a single GRUB 2 boot
menu entry. These blocks always start with the <literal>menuentry</literal>
keyword followed by a title, list of options, and an opening curly bracket, and end with a
closing curly bracket. Anything between the opening and closing bracket should be
indented. For example, the following is a sample <literal>menuentry</literal>
block for &MAJOROSVER; with Linux kernel 3.17.4-301.fc21.x86_64:
</para>
Show replies by date