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