[system-administrators-guide/22] updating links in GRUB2
by stephenw
commit 5b10028d31de3c81f5406df869592ac823cd1eff
Author: Stephen Wadeley <swadeley(a)redhat.com>
Date: Fri Aug 14 14:27:08 2015 +0200
updating links in GRUB2
en-US/Working_with_the_GRUB_2_Boot_Loader.xml | 4 ++--
1 files changed, 2 insertions(+), 2 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 2665706..7500695 100644
--- a/en-US/Working_with_the_GRUB_2_Boot_Loader.xml
+++ b/en-US/Working_with_the_GRUB_2_Boot_Loader.xml
@@ -787,8 +787,8 @@ GRUB_SERIAL_COMMAND="serial --speed=9600 --unit=0 --word=8 --parity=no --stop=1"
<synopsis>console=<replaceable>ttyS0,9600n8</replaceable></synopsis>
Where <option>console=ttyS0</option> is the serial terminal to be used, <option>9600</option> is the baud rate, <option>n</option> is for no parity, and <option>8</option> is the word length in bits. A much higher baud rate, for example <literal>115200</literal>, is preferable for tasks such as following log files.</para>
<para>
-
-For more information on adding kernel options, see <xref linkend="sec-Editing_an_Entry" />. For more information on serial console settings, see <ulink url="https://www.kernel.org/doc/Documentation/serial-console.txt"></ulink> </para>
+For more information on serial console settings, see <xref linkend="bh-Installable_and_External_Documentation" />
+</para>
</note>
</section>
<section id="sec-Using_screen_to_Connect_to_the_Serial_Console">
8 years, 6 months
[system-administrators-guide/22] Improve: GRUB 2 over a Serial Console
by stephenw
commit 47bc8d84b5fecbcd9639f2c40332db73652cbc9a
Author: Stephen Wadeley <swadeley(a)redhat.com>
Date: Fri Aug 14 14:26:04 2015 +0200
Improve: GRUB 2 over a Serial Console
en-US/Working_with_the_GRUB_2_Boot_Loader.xml | 21 ++++++++++++++++-----
1 files changed, 16 insertions(+), 5 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 81f951b..2665706 100644
--- a/en-US/Working_with_the_GRUB_2_Boot_Loader.xml
+++ b/en-US/Working_with_the_GRUB_2_Boot_Loader.xml
@@ -738,15 +738,26 @@ password_pbkdf2 john grub.pbkdf2.sha512.10000.19074739ED80F115963D984BDCB35AA671
</section>
</section>
- <section id="sec-GRUB_2_over_Serial_Console">
- <title>GRUB 2 over Serial Console</title>
+ <section id="sec-GRUB_2_over_a_Serial_Console">
+ <title>GRUB 2 over a Serial Console</title>
<para>
If you use computers with no display or keyboard, it can be very useful to control the machines through serial communications.
</para>
- <section id="sec-Configuring_GRUB_2">
- <title>Configuring GRUB 2</title>
+ <section id="sec-Configuring_the_GRUB_2_Menu">
+ <title>Configuring the GRUB 2 Menu</title>
+
+ <para>
+ To set the system to use a serial terminal only during a single boot process, when the GRUB 2 boot menu appears, move the cursor to the kernel you want to start, and press the <keycap>e</keycap> key to edit the kernel parameters. Remove the <literal>rhgb</literal> and <literal>quit</literal> parameters and add console parameters at the end of the <literal>linux16</literal> line as follows:
+ </para>
+<screen>linux16 /vmlinuz-3.10.0-0.rc4.59.el7.x86_64 root=/dev/mapper/rhel-root ro rd.md=0 rd.dm=0 rd.lvm.lv=rhel/swap crashkernel=auto rd.luks=0 vconsole.keymap=us rd.lvm.lv=rhel/root <emphasis role="bold">console=ttyS0,115200</emphasis></screen>
+ <para>
+ These settings are not persistent and apply only for a single boot.</para>
+ <para>
+ To make persistent changes to a menu entry on a system, use the <command>grubby</command> tool. For example, to update the entry for the default kernel, enter a command as follows:
+<screen>~]# <command>grubby --remove-args="rhgb quiet" --args=console=ttyS0,115200 --update-kernel=DEFAULT</command></screen>
+The <option>--update-kernel</option> parameter also accepts the keyword <literal>ALL</literal> or a comma separated list of kernel index numbers. See <xref linkend="bh-Adding_and_Removing_Arguments_from_a_GRUB_Menu_Entry" /> for more information on using <command>grubby</command>.</para>
<para>
- In order to use GRUB 2 over a serial line, add the following two lines in the <filename>/etc/default/grub</filename> file:
+ If required to build a new GRUB 2 configuration file, add the following two lines in the <filename>/etc/default/grub</filename> file:
</para>
<programlisting>
GRUB_TERMINAL="serial"
8 years, 6 months
[system-administrators-guide/22] Customizing the GRUB 2 Configuration File
by stephenw
commit 196eae072a477e7492e46a62a3fbe5d689fcabb4
Author: Stephen Wadeley <swadeley(a)redhat.com>
Date: Fri Aug 14 14:22:34 2015 +0200
Customizing the GRUB 2 Configuration File
Renamed the section and removed temporary change info as that is now in
the new section about temporary changes.
en-US/Working_with_the_GRUB_2_Boot_Loader.xml | 25 ++++++++++---------------
1 files changed, 10 insertions(+), 15 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 f7ca789..81f951b 100644
--- a/en-US/Working_with_the_GRUB_2_Boot_Loader.xml
+++ b/en-US/Working_with_the_GRUB_2_Boot_Loader.xml
@@ -231,8 +231,8 @@ title=Red Hat Enterprise Linux Server (3.10.0-229.4.2.el7.x86_64) 7.0 (Maipo)</s
</para>
</section>
-<section id="sec-Customizing_the_GRUB_2_Menu">
-<title>Customizing the GRUB 2 Menu</title>
+<section id="sec-Customizing_the_GRUB_2_Configuration_File">
+<title>Customizing the GRUB 2 Configuration File</title>
<para>
GRUB 2 scripts search the user's computer and build a boot menu based on what operating systems the scripts find. To reflect the latest system boot options, the boot menu is rebuilt automatically when the kernel is updated or a new kernel is added.
</para>
@@ -303,6 +303,9 @@ The <literal>DEFAULTKERNEL</literal> directive specifies what package type will
<para>
To force a system to always use a particular menu entry, use the menu entry name as the key to the <literal>GRUB_DEFAULT</literal> directive in the <filename>/etc/default/grub</filename> file. To list the available menu entries, run the following command as <systemitem class="username">root</systemitem>:
<screen>~]# <command>awk -F\' '$1=="menuentry " {print $2}' /etc/grub2.cfg</command></screen>
+ The file name <filename>/etc/grub2.cfg</filename> is a symlink to the <filename>grub.cfg</filename> file, whose location is architecture dependent. For reliability reasons, the symlink is not used in other examples in this chapter. It is better to use absolute paths when writing to a file, especially when repairing a system.
+ </para>
+ <para>
Changes to <filename>/etc/default/grub</filename> require rebuilding the <filename>grub.cfg</filename> file as follows:</para>
<itemizedlist>
<listitem>
@@ -319,19 +322,11 @@ The <literal>DEFAULTKERNEL</literal> directive specifies what package type will
</listitem>
</itemizedlist>
</section>
- <section id="sec-Editing_an_Entry">
- <title>Editing an Entry</title>
- <bridgehead>Kernel Parameters</bridgehead>
- <para>
- To use a kernel parameter only during a single boot process, when the GRUB 2 boot menu appears, move the cursor to the kernel you want to start, and press the <keycap>e</keycap> key to edit the kernel parameters. For example, to run the system in emergency mode, add the <emphasis>emergency</emphasis> parameter at the end of the <literal>linux16</literal> line:
- </para>
-<screen>linux16 /vmlinuz-3.17.4-301.fc21.x86_64 root=/dev/mapper/fedora-root ro rd.lvm.lv=fedora/swap rd.lvm.lv=fedora/root rhgb quiet LANG=en_US.UTF-8 emergency</screen>
- <para>
- These settings are not persistent and apply only for a single boot. To make the settings persistent, edit values of the <systemitem>GRUB_CMDLINE_LINUX</systemitem> key in the <filename>/etc/default/grub</filename> file. For example, if you want to enable emergency mode for each boot, use:
- </para>
-<screen>GRUB_CMDLINE_LINUX="emergency"</screen>
- <para>
- Note that you can specify multiple parameters for the <systemitem>GRUB_CMDLINE_LINUX</systemitem> key, similarly to adding the parameters in the GRUB 2 boot menu. For example:
+
+ <section id="sec-Editing_a_Menu_Entry">
+ <title>Editing a Menu Entry</title>
+ <para>
+ If required to prepare a new GRUB 2 file with different parameters, edit the values of the <systemitem>GRUB_CMDLINE_LINUX</systemitem> key in the <filename>/etc/default/grub</filename> file. Note that you can specify multiple parameters for the <systemitem>GRUB_CMDLINE_LINUX</systemitem> key. For example:
<synopsis>GRUB_CMDLINE_LINUX="console=tty0 console=ttyS0,9600n8"</synopsis>
Where <option>console=tty0</option> is the first virtual terminal and <option>console=ttyS0</option> is the serial terminal to be used.
</para>
8 years, 6 months
[system-administrators-guide/22] Configuring GRUB 2 Using the grubby Tool
by stephenw
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>
8 years, 6 months
[system-administrators-guide/22] Making Temporary Changes to a GRUB 2 Menu
by stephenw
commit 5f0dbe079cc304862368083866dbf0a9f53b6dd7
Author: Stephen Wadeley <swadeley(a)redhat.com>
Date: Fri Aug 14 14:16:11 2015 +0200
Making Temporary Changes to a GRUB 2 Menu
New section to separate the tasks
en-US/Working_with_the_GRUB_2_Boot_Loader.xml | 38 +++++++++++++++++++++++++
1 files changed, 38 insertions(+), 0 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 c06c73b..9ac2fb2 100644
--- a/en-US/Working_with_the_GRUB_2_Boot_Loader.xml
+++ b/en-US/Working_with_the_GRUB_2_Boot_Loader.xml
@@ -106,6 +106,44 @@ menuentry 'Fedora, with Linux 3.17.4-301.fc21.x86_64' --class fedora --class gnu
</para>
</section>
+ <section id="sec-Making_Temporary_Changes_to_a_GRUB_2_Menu">
+ <title>Making Temporary Changes to a GRUB 2 Menu</title>
+
+ <procedure id="proc-Making_Temporary_Changes_to_Kernel_Menu_Entry">
+ <title>Making Temporary Changes to a Kernel Menu Entry</title>
+ <para>
+ To change kernel parameters only during a single boot process, proceed as follows:
+ </para>
+ <step>
+ <para>
+ Start the system and, on the GRUB 2 boot screen, move the cursor to the menu entry you want to edit, and press the <keycap>e</keycap> key for edit.
+ </para>
+ </step>
+ <step>
+ <para>
+ Move the cursor down to find the kernel command line. The kernel command line starts with <literal>linux</literal> on 64-Bit IBM Power Series, <literal>linux16</literal> on x86-64 BIOS-based systems, or <literal>linuxefi</literal> on UEFI systems.
+ </para>
+ </step>
+ <step>
+ <para>
+ Move the cursor to the end of the line.
+ </para>
+ <para>
+ Press <keycombo><keycap>Ctrl</keycap><keycap>a</keycap></keycombo> and <keycombo><keycap>Ctrl</keycap><keycap>e</keycap></keycombo> to jump to the start and end of the line, respectively. On some systems, <keycap>Home</keycap> and <keycap>End</keycap> might also work.
+</para>
+</step>
+<step>
+ <para>
+ Edit the kernel parameters as required. For example, to run the system in emergency mode, add the <emphasis>emergency</emphasis> parameter at the end of the <literal>linux16</literal> line:
+<screen>linux16 /vmlinuz-3.10.0-0.rc4.59.el7.x86_64 root=/dev/mapper/rhel-root ro rd.md=0 rd.dm=0 rd.lvm.lv=rhel/swap crashkernel=auto rd.luks=0 vconsole.keymap=us rd.lvm.lv=rhel/root rhgb quiet <emphasis role="bold">emergency</emphasis></screen>
+The <option>rhgb</option> and <option>quiet</option> parameters can be removed in order to enable system messages.
+ </para>
+ <para>
+ These settings are not persistent and apply only for a single boot. To make persistent changes to a menu entry on a system, use the <command>grubby</command> tool. See <xref linkend="bh-Adding_and_Removing_Arguments_from_a_GRUB_Menu_Entry" /> for more information on using <command>grubby</command>.
+ </para>
+</step>
+</procedure>
+</section>
<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>
</para>
8 years, 6 months
[system-administrators-guide/22] Configuring the GRUB 2 Boot Loader
by stephenw
commit 4ea93c7783115bb5ffe72343a52e51f50d5c63c3
Author: Stephen Wadeley <swadeley(a)redhat.com>
Date: Fri Aug 14 14:12:18 2015 +0200
Configuring the GRUB 2 Boot Loader
new section adding a menu to select your task
en-US/Working_with_the_GRUB_2_Boot_Loader.xml | 26 +++++++++++++++++++++++-
1 files changed, 24 insertions(+), 2 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 8d50d44..c06c73b 100644
--- a/en-US/Working_with_the_GRUB_2_Boot_Loader.xml
+++ b/en-US/Working_with_the_GRUB_2_Boot_Loader.xml
@@ -82,8 +82,30 @@ menuentry 'Fedora, with Linux 3.17.4-301.fc21.x86_64' --class fedora --class gnu
</note>
</section>
- <section id="sec-Using_grubby_with_the_GRUB_2_Menu">
- <title>Using grubby with the GRUB 2 Menu</title>
+ <section id="sec-Configuring_the_GRUB_2_Boot_Loader">
+ <title>Configuring the GRUB 2 Boot Loader</title>
+ <para>
+ Changes to the GRUB 2 menu can be made temporarily at boot time, made persistent for a single system while the system is running, or as part of making a new GRUB 2 configuration file.
+ <itemizedlist>
+ <listitem>
+ <para>
+ To make non-persistent changes to the GRUB 2 menu, see <xref linkend="sec-Making_Temporary_Changes_to_a_GRUB_2_Menu" />.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ To make persistent changes to a running system, see <xref linkend="sec-Configuring_GRUB_2_Using_the_grubby_Tool" />.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ For information on making and customizing a GRUB 2 configuration file, see <xref linkend="sec-Customizing_the_GRUB_2_Configuration_File" />.
+ </para>
+ </listitem>
+ </itemizedlist>
+ </para>
+ </section>
+
<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>
</para>
8 years, 6 months
[system-administrators-guide/22] Introduction to GRUB 2
by stephenw
commit 422ba83fcac14e6b9edc8fd1538b4185687d2d84
Author: Stephen Wadeley <swadeley(a)redhat.com>
Date: Fri Aug 14 14:03:04 2015 +0200
Introduction to GRUB 2
Rewritten and with new title.
en-US/Working_with_the_GRUB_2_Boot_Loader.xml | 31 ++++++------------------
1 files changed, 8 insertions(+), 23 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 b0b37b2..8d50d44 100644
--- a/en-US/Working_with_the_GRUB_2_Boot_Loader.xml
+++ b/en-US/Working_with_the_GRUB_2_Boot_Loader.xml
@@ -24,38 +24,23 @@
&MAJOROSVER; is distributed with the GNU GRand Unified Boot loader (GRUB) version 2 boot loader, which allows the user to select an operating system or kernel to be loaded at system boot time. GRUB 2 also allows the user to pass arguments to the kernel.
</para>
- <section id="sec-Configuring_the_GRUB_2_Boot_Loader">
- <title>Configuring the GRUB 2 Boot Loader</title>
+<section id="sec-Introduction_to_GRUB_2">
+ <title>Introduction to GRUB 2</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.
</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>
+ The GRUB 2 configuration file, <filename>grub.cfg</filename>, 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. The file is not supposed to be edited as any edits to the file could be lost during updates. The file is automatically updated each time a new kernel is installed.</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.
+ Normal operations on <filename>grub.cfg</filename>, such as the removal and addition of new kernels, should be done using 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 will be inherited when new kernels are installed. For more information on <command>grubby</command>, see <xref linkend="sec-Configuring_GRUB_2_Using_the_grubby_Tool" />.
</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>
+The <filename>/etc/default/grub</filename> file is used by the <command>grub2-mkconfig</command> tool, which is used by <systemitem>anaconda</systemitem> when creating <filename>grub.cfg</filename> 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. In general it is not recommended to use <filename>grub2-mkconfig</filename> manually except as a last resort. Note that any manual changes to <filename>/etc/default/grub</filename> require rebuilding the <filename>grub.cfg</filename> file.
+</para>
- <itemizedlist>
- <listitem>
- <para>
- On BIOS-based machines, issue the following command as <systemitem class="username">root</systemitem>:
- <screen>~]# <command>grub2-mkconfig -o /boot/grub2/grub.cfg</command></screen>
- </para>
- </listitem>
- <listitem>
- <para>
- On UEFI-based machines, issue the following command as <systemitem class="username">root</systemitem>:
- <screen>~]# <command>grub2-mkconfig -o /boot/efi/EFI/redhat/grub.cfg</command></screen>
- </para>
- </listitem>
- </itemizedlist>
-<bridgehead renderas="sect3">Menu Entries in grub.cfg</bridgehead>
+<bridgehead id="bh-Menu_Entries_in_grub.cfg" 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>
8 years, 6 months
[system-administrators-guide/22] Improve "using the serial console" example
by stephenw
commit 486785ea6f5946f180ff5a8576e3a46bacc49f40
Author: Stephen Wadeley <swadeley(a)redhat.com>
Date: Fri Jul 17 10:38:07 2015 +0200
Improve "using the serial console" example
add a synopsis before the command
add some examples of serial ports
en-US/Working_with_the_GRUB_2_Boot_Loader.xml | 11 ++++++-----
1 files changed, 6 insertions(+), 5 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 607c438..b0b37b2 100644
--- a/en-US/Working_with_the_GRUB_2_Boot_Loader.xml
+++ b/en-US/Working_with_the_GRUB_2_Boot_Loader.xml
@@ -741,13 +741,14 @@ For more information on adding kernel options, see <xref linkend="sec-Editing_an
</para>
<screen>~]# <command>dnf install screen</command></screen>
<para>
- To connect to your machine using the serial console, run the following command:
+ To connect to your machine using the serial console, use a command in the follow format:
</para>
-<screen>~]$ <command>screen</command> <filename>/dev/<console_port></filename></screen>
+<synopsis>screen /dev/<replaceable>console_port</replaceable> <replaceable>baud_rate</replaceable></synopsis>
<para>
- By default, if no option is specified, <application>screen</application> uses the standard 9600 baud rate. To set a different baud rate, run:
- </para>
-<screen>~]$ <command>screen</command> <filename>/dev/<console_port></filename> <option>115200</option></screen>
+ By default, if no option is specified, <application>screen</application> uses the standard 9600 baud rate. To set a higher baud rate, enter:
+<screen>~]$ <command>screen</command> <filename>/dev/<replaceable>console_port</replaceable></filename> <option>115200</option></screen>
+Where <replaceable>console_port</replaceable> is <literal>ttyS0</literal>, or <literal>ttyUSB0</literal>, and so on.
+ </para>
<para>
To end the session in <application>screen</application>, press <keycap>Ctrl</keycap>+<keycap>a</keycap>, type <literal>:quit</literal> and press <keycap>Enter</keycap>.
</para>
8 years, 6 months
[system-administrators-guide/22] Change "update" to "rebuild" wrt grub2-mkconfig
by stephenw
commit b03c22b96290d73618e209b7859416707aec8e3f
Author: Stephen Wadeley <swadeley(a)redhat.com>
Date: Tue Jun 30 11:44:43 2015 +0200
Change "update" to "rebuild" wrt grub2-mkconfig
Because using grub2-mkconfig replaces the grub.cfg file
en-US/Working_with_the_GRUB_2_Boot_Loader.xml | 8 ++++----
1 files changed, 4 insertions(+), 4 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 c5c709d..607c438 100644
--- a/en-US/Working_with_the_GRUB_2_Boot_Loader.xml
+++ b/en-US/Working_with_the_GRUB_2_Boot_Loader.xml
@@ -424,7 +424,7 @@ menuentry 'Second custom entry' --class red --class gnu-linux --class gnu --clas
</step>
<step>
<para>
- Update the <filename>grub.cfg</filename> file by running the <command>grub2-mkconfig <option>-o</option></command> command as follows:</para>
+ Rebuild the <filename>grub.cfg</filename> file by running the <command>grub2-mkconfig <option>-o</option></command> command as follows:</para>
<itemizedlist>
<listitem>
<para>
@@ -533,7 +533,7 @@ linux /vmlinuz
</para>
<para>
- Update the <filename>grub.cfg</filename> file by running the <command>grub2-mkconfig <option>-o</option></command> command as follows:</para>
+ Rebuild the <filename>grub.cfg</filename> file by running the <command>grub2-mkconfig <option>-o</option></command> command as follows:</para>
<itemizedlist>
<listitem>
<para>
@@ -667,7 +667,7 @@ password_pbkdf2 john grub.pbkdf2.sha512.10000.19074739ED80F115963D984BDCB35AA671
</step>
<step>
<para>
- Update the <filename>grub.cfg</filename> file by running the <command>grub2-mkconfig <option>-o</option></command> command as follows:</para>
+ Rebuild the <filename>grub.cfg</filename> file by running the <command>grub2-mkconfig <option>-o</option></command> command as follows:</para>
<itemizedlist>
<listitem>
<para>
@@ -710,7 +710,7 @@ GRUB_SERIAL_COMMAND="serial --speed=9600 --unit=0 --word=8 --parity=no --stop=1"
The first line disables the graphical terminal. Note that specifying the <literal>GRUB_TERMINAL</literal> key overrides values of <literal>GRUB_TERMINAL_INPUT</literal> and <literal>GRUB_TERMINAL_OUTPUT</literal>. On the second line, adjust the baud rate, parity, and other values to fit your environment and hardware. A much higher baud rate, for example <literal>115200</literal>, is preferable for tasks such as following log files. Once you have completed the changes in the <filename>/etc/default/grub</filename> file, it is necessary to update the GRUB 2 configuration file.
</para>
<para>
- Update the <filename>grub.cfg</filename> file by running the <command>grub2-mkconfig <option>-o</option></command> command as follows:</para>
+ Rebuild the <filename>grub.cfg</filename> file by running the <command>grub2-mkconfig <option>-o</option></command> command as follows:</para>
<itemizedlist>
<listitem>
<para>
8 years, 6 months
[system-administrators-guide/22] Update resources to mention grubby
by stephenw
commit 374e4089e98623d1c4238d7566ed2f3b977cea9f
Author: Stephen Wadeley <swadeley(a)redhat.com>
Date: Fri Jun 19 18:02:29 2015 +0200
Update resources to mention grubby
en-US/Working_with_the_GRUB_2_Boot_Loader.xml | 11 +++++++++++
1 files changed, 11 insertions(+), 0 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 f4c11bf..c5c709d 100644
--- a/en-US/Working_with_the_GRUB_2_Boot_Loader.xml
+++ b/en-US/Working_with_the_GRUB_2_Boot_Loader.xml
@@ -1097,6 +1097,17 @@ Enforcing</screen>
<command>info grub2</command> — The GRUB 2 info page contains a tutorial, a user reference manual, a programmer reference manual, and a FAQ document about GRUB 2 and its usage.
</para>
</listitem>
+ <listitem>
+ <para>
+ <filename>grubby(8)</filename> — The manual page for the command-line tool for configuring GRUB and GRUB 2.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <filename>new-kernel-pkg(8)</filename> — The manual page for the tool to script kernel installation.
+ </para>
+ </listitem>
+
</itemizedlist>
<bridgehead
8 years, 6 months