You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

138 lines
5.7 KiB

From c850879b862058a644a05f8fe2fc2206e0e317e8 Mon Sep 17 00:00:00 2001
From: Harald Hoyer <harald@redhat.com>
Date: Thu, 3 Sep 2015 16:25:23 +0200
Subject: [PATCH] dracut.usage.asc: update man page
- clarify grub2 config for debugging
- clarify hostonly mode
---
dracut.usage.asc | 74 ++++++++++++++++++--------------------------------------
1 file changed, 23 insertions(+), 51 deletions(-)
diff --git a/dracut.usage.asc b/dracut.usage.asc
index 15dc2440..45cbf120 100644
--- a/dracut.usage.asc
+++ b/dracut.usage.asc
@@ -37,10 +37,14 @@ the --hostonly or -H option. Using this option, the resulting image will
contain only those dracut modules, kernel modules and filesystems, which are
needed to boot this specific machine. This has the drawback, that you can't put
the disk on another controller or machine, and that you can't switch to another
-root filesystem, without recreating the initramfs image. The usage of the
---hostonly option is only for experts and you will have to keep the broken
-pieces. At least keep a copy of a general purpose image (and corresponding
-kernel) as a fallback to rescue your system.
+root filesystem, without recreating the initramfs image.
+
+[NOTE]
+===============================
+On RHEL-7 the hostonly mode is the default mode. Generic "non-hostonly" images
+are created, if the dracut-config-generic rpm is installed. The rescue kernel
+entry in the bootloader menu is also a generic image.
+===============================
=== Inspecting the Contents
To see the contents of the image created by dracut, you can use the lsinitrd
@@ -99,8 +103,9 @@ raid with encryption and LVM on top), as long as you specify the correct
filesystem LABEL or UUID on the kernel command line for your root device, dracut
will find it and boot from it.
-The kernel command line usually can be configured in _/boot/grub2/grub.cfg_, if
-grub is your bootloader and it also can be edited in the real boot process in
+The kernel command line usually can be configured in _/boot/grub2/grub.cfg_
+(or _/boot/efi/EFI/redhat/grub.cfg_ for EFI systems), if
+grub2 is your bootloader and it also can be edited in the real boot process in
the grub menu.
The kernel command line can also be provided by the dhcp server with the
@@ -325,7 +330,8 @@ stick and mount that. Then you can store the output for later inspection.
In all cases, the following should be mentioned and attached to your bug report:
* The exact kernel command-line used. Typically from the bootloader
-configuration file (e.g. _/boot/grub2/grub.cfg_) or from _/proc/cmdline_.
+configuration file (e.g. _/boot/grub2/grub.cfg_ (or _/boot/efi/EFI/redhat/grub.cfg_ for EFI systems))
+or from _/proc/cmdline_.
* A copy of your disk partition information from _/etc/fstab_, which might be
obtained booting an old working initramfs or a rescue medium.
* Turn on dracut debugging (see _the 'debugging dracut' section_), and attach
@@ -359,49 +365,17 @@ Successfully debugging dracut will require some form of console
logging during the system boot. This section documents configuring a
serial console connection to record boot messages.
-. First, enable serial console output for both the kernel and the bootloader.
-. Open the file _/boot/grub2/grub.cfg_ for editing. Below the line ''timeout=5'', add
-the following:
-+
-----
-serial --unit=0 --speed=9600
-terminal --timeout=5 serial console
-----
-+
-. Also in _/boot/grub2/grub.cfg_, add the following boot arguemnts to the ''kernel''
+. In _/boot/grub2/grub.cfg_ (or _/boot/efi/EFI/redhat/grub.cfg_ for EFI systems),
+add the following boot arguments to the ''linux16''
line:
+
----
console=tty0 console=ttyS0,9600
----
+
-. When finished, the _/boot/grub2/grub.cfg_ file should look similar to the example
-below.
-+
-----
-default=0
-timeout=5
-serial --unit=0 --speed=9600
-terminal --timeout=5 serial console
-title Fedora (2.6.29.5-191.fc11.x86_64)
- root (hd0,0)
- kernel /vmlinuz-2.6.29.5-191.fc11.x86_64 ro root=/dev/mapper/vg_uc1-lv_root console=tty0 console=ttyS0,9600
- initrd /dracut-2.6.29.5-191.fc11.x86_64.img
-----
-+
. More detailed information on how to configure the kernel for console output
can be found at
http://www.faqs.org/docs/Linux-HOWTO/Remote-Serial-Console-HOWTO.html#CONFIGURE-KERNEL.
-. Redirecting non-interactive output
-+
---
-NOTE: You can redirect all non-interactive output to _/dev/kmsg_ and the kernel
-will put it out on the console when it reaches the kernel buffer by doing
-
-----
-# exec >/dev/kmsg 2>&1 </dev/console
-----
---
[[using-the-dracut-shell]]
==== Using the dracut shell
@@ -410,20 +384,18 @@ dracut offers a shell for interactive debugging in the event dracut fails to
locate your root filesystem. To enable the shell:
. Add the boot parameter ''rd.shell'' to your bootloader configuration file
-(e.g. _/boot/grub2/grub.cfg_)
+(e.g. _/boot/grub2/grub.cfg_ (or _/boot/efi/EFI/redhat/grub.cfg_ for EFI systems))
. Remove the boot arguments ''rhgb'' and ''quiet''
+
-A sample _/boot/grub2/grub.cfg_ bootloader configuration file is listed below.
+A sample _grub.cfg_ bootloader configuration file snippet is listed below.
+
----
-default=0
-timeout=5
-serial --unit=0 --speed=9600
-terminal --timeout=5 serial console
-title Fedora (2.6.29.5-191.fc11.x86_64)
- root (hd0,0)
- kernel /vmlinuz-2.6.29.5-191.fc11.x86_64 ro root=/dev/mapper/vg_uc1-lv_root console=tty0 rd.shell
- initrd /dracut-2.6.29.5-191.fc11.x86_64.img
+menuentry 'Red Hat Enterprise Linux Server (3.10.0-308.el7.x86_64) 7.0 (Maipo)' […] {
+ […]
+ linux16 /vmlinuz-3.10.0-308.el7.x86_64 ro root=/dev/mapper/vg_uc1-lv_root console=tty0 rd.shell
+ initrd16 /initramfs-3.10.0-308.el7.x86_64.img
+ […]
+}
----
+
. If system boot fails, you will be dropped into a shell as seen in the example