mirror of
https://pagure.io/fedora-docs/quick-docs.git
synced 2024-12-01 07:39:48 +00:00
Make Diferences between rescue in LVM and BTRF File System
Why this change is needed: With the new default system in BTRF as Defautl for new instalation this procedure needs updated. What this change accomplishes: . Reflect the diferences between rescue a system in a LVM/BTRF file System. . Remove Sequence Number Warninig in a debug-dracut-problems.adoc fix ticket: #316 Note: Please don't push .adoc with Warning Messages is quite anoying
This commit is contained in:
parent
8811afe682
commit
f2a2581b85
2 changed files with 63 additions and 32 deletions
|
@ -1,9 +1,14 @@
|
|||
[[restoring-bootloader-using-live-disk]]
|
||||
= Restoring the bootloader using the Live disk.
|
||||
|
||||
Sometimes, especially after a secondary operating systems has been installed, the master boot record gets damaged which then prevents the original Linux system from booting.
|
||||
Sometimes, especially after a secondary operating systems has been installed,
|
||||
the master boot record gets damaged which then prevents the original Linux system
|
||||
from booting.
|
||||
|
||||
If this happens, it is necessary to reinstall *GRUB2* to recreate the original settings. The process not only discovers all installed operating systems, but usually adds them to the *GRUB2* configuration files, so they will all become bootable by *GRUB2*.
|
||||
If this happens, it is necessary to reinstall *GRUB2* to recreate the original
|
||||
settings. The process not only discovers all installed operating systems, but
|
||||
usually adds them to the *GRUB2* configuration files, so they will all become
|
||||
bootable by *GRUB2*.
|
||||
|
||||
.Before you start
|
||||
|
||||
|
@ -18,12 +23,12 @@ If this happens, it is necessary to reinstall *GRUB2* to recreate the original s
|
|||
. Open the terminal.
|
||||
|
||||
. Examine the partition layout and identify the `boot` and the `root` partition.
|
||||
+
|
||||
|
||||
----
|
||||
# fdisk -l
|
||||
----
|
||||
+
|
||||
If you are using the default Fedora layout, there will be one `/dev/sda1` partition that holds the `/boot` directory and one `/dev/mapper/fedora-root` that holds the root file system.
|
||||
|
||||
== For Default Instalation in LVM.
|
||||
|
||||
. Create the mount point for the root partition.
|
||||
+
|
||||
|
@ -31,6 +36,10 @@ If you are using the default Fedora layout, there will be one `/dev/sda1` partit
|
|||
# mkdir -p /mnt/root
|
||||
----
|
||||
|
||||
If you are using the default Fedora layout, there will be one `/dev/sda1`
|
||||
partition that holds the `/boot` directory and one `/dev/mapper/fedora-root`
|
||||
that holds the root file system.
|
||||
|
||||
. Mount the root partition on the mount point.
|
||||
+
|
||||
----
|
||||
|
@ -38,12 +47,33 @@ If you are using the default Fedora layout, there will be one `/dev/sda1` partit
|
|||
----
|
||||
|
||||
. Mount the boot partition in the `boot` directory of the filesystem that you have mounted in the previous step.
|
||||
+
|
||||
|
||||
----
|
||||
# mount /dev/sda1 /mnt/root/boot/
|
||||
----
|
||||
|
||||
. Mount system processes and devices into the root filesystem in `/mnt/root`.
|
||||
== For default Instalation in BTRF
|
||||
|
||||
. Create the mount point for the root partition.
|
||||
|
||||
----
|
||||
# mkdir -p /mnt/
|
||||
----
|
||||
|
||||
If you are using the default Fedora layout, there will be one `/dev/sda1`
|
||||
partition that holds the `/boot` directory and one `/dev/sda2` that holds the root file system.
|
||||
|
||||
----
|
||||
# mount /dev/sda2/ /mnt
|
||||
# mount /dev/sda1 /mnt/root/boot
|
||||
----
|
||||
|
||||
IMPORTANT: Home Partition is mounted automatically under `/mnt/home`
|
||||
|
||||
== Continue with the follow Procedure.
|
||||
|
||||
. Mount system processes and devices into the root filesystem in
|
||||
`/mnt/root`.
|
||||
+
|
||||
----
|
||||
# mount -o bind /dev /mnt/root/dev
|
||||
|
@ -58,7 +88,8 @@ If you are using the default Fedora layout, there will be one `/dev/sda1` partit
|
|||
# chroot /mnt/root
|
||||
----
|
||||
|
||||
. Regenerate the *GRUB2* configuration file and reinstall the bootloader into the MBR, as described in xref:adding-other-operating-systems-grub2[Adding other operating systems to the *GRUB2* menu].
|
||||
. Regenerate the *GRUB2* configuration file and reinstall the bootloader
|
||||
into the MBR, as described in xref:adding-other-operating-systems-grub2[Adding other operating systems to the *GRUB2* menu].
|
||||
|
||||
. Exit this temporary root filesystem.
|
||||
+
|
||||
|
@ -67,7 +98,7 @@ $ exit
|
|||
----
|
||||
|
||||
. Your bootloader should be now restored. Reboot your computer to boot into your normal system.
|
||||
+
|
||||
|
||||
----
|
||||
# systemctl reboot
|
||||
----
|
||||
|
|
|
@ -16,12 +16,12 @@ uncompressed, with MIME type set as text/plain.
|
|||
[[identifying-your-problem-area]]
|
||||
== Identifying your problem area
|
||||
|
||||
1. Remove `rhgb` and `quiet` from the kernel command line
|
||||
2. Add `rd.shell` to the kernel command line. This will present a shell
|
||||
. Remove `rhgb` and `quiet` from the kernel command line
|
||||
. Add `rd.shell` to the kernel command line. This will present a shell
|
||||
in case dracut is unable to locate your root device
|
||||
3. Add `rd.shell rd.debug log_buf_len=1M` to the kernel command line so
|
||||
. Add `rd.shell rd.debug log_buf_len=1M` to the kernel command line so
|
||||
that dracut shell commands are printed as they are executed
|
||||
4. Inspect the system logs:
|
||||
. Inspect the system logs:
|
||||
....
|
||||
# less /run/initramfs/rdsosreport.txt
|
||||
# journalctl -a
|
||||
|
@ -94,20 +94,20 @@ console connection to record boot messages. To enable serial console
|
|||
output for both the kernel and the bootloader, follow the procedure
|
||||
below.
|
||||
|
||||
1. Open the file `/etc/grub.conf` for editing. Below the line _timeout=5_, add the following:
|
||||
|
||||
. Open the file `/etc/grub.conf` for editing. Below the line _timeout=5_, add the following:
|
||||
+
|
||||
....
|
||||
serial --unit=0 --speed=9600
|
||||
terminal --timeout=5 serial console
|
||||
....
|
||||
|
||||
2. Also in `/etc/grub.conf`, add the following boot arguments to the _kernel_ line:
|
||||
|
||||
. Also in `/etc/grub.conf`, add the following boot arguments to the _kernel_ line:
|
||||
+
|
||||
....
|
||||
console=tty0 console=ttyS0,9600
|
||||
....
|
||||
|
||||
3. When finished, `/etc/grub.conf` should look similar to the example below:
|
||||
. When finished, `/etc/grub.conf` should look similar to the example below:
|
||||
|
||||
....
|
||||
default=0
|
||||
|
@ -130,9 +130,9 @@ http://www.faqs.org/docs/Linux-HOWTO/Remote-Serial-Console-HOWTO.html#CONFIGURE-
|
|||
Dracut offers a shell for interactive debugging in the event dracut
|
||||
fails to locate your root filesystem. To enable the shell:
|
||||
|
||||
1. Add the boot parameter `rd.shell` to your bootloader configuration
|
||||
. Add the boot parameter `rd.shell` to your bootloader configuration
|
||||
file (e.g. `/etc/grub/conf`)
|
||||
2. Remove the boot arguments `rhgb` and `quiet`
|
||||
. Remove the boot arguments `rhgb` and `quiet`
|
||||
|
||||
A sample `/etc/grub.conf` bootloader configuration file is listed below:
|
||||
|
||||
|
@ -179,8 +179,8 @@ The exact method for locating and preparing will vary. However, to
|
|||
continue with a successful boot, the objective is to locate your root
|
||||
volume and create a symlink `/dev/root` which points to the file system. For example, the following example demonstrates accessing and booting a root volume that is an encrypted LVM Logical volume.
|
||||
|
||||
1. Inspect your partitions using `parted`:
|
||||
|
||||
. Inspect your partitions using `parted`:
|
||||
+
|
||||
....
|
||||
# parted /dev/sda -s p
|
||||
Model: ATA HTS541060G9AT00 (scsi)
|
||||
|
@ -193,16 +193,16 @@ Number Start End Size Type File system Flags
|
|||
2 10.8GB 55.6GB 44.7GB logical lvm
|
||||
....
|
||||
|
||||
2. You recall that your root volume was a LVM logical volume. Scan and
|
||||
. You recall that your root volume was a LVM logical volume. Scan and
|
||||
activate any logical volumes:
|
||||
|
||||
+
|
||||
....
|
||||
# lvm vgscan
|
||||
# lvm vgchange -ay
|
||||
....
|
||||
|
||||
3. You should see any logical volumes now using the command `blkid`:
|
||||
|
||||
. You should see any logical volumes now using the command `blkid`:
|
||||
+
|
||||
....
|
||||
# blkid
|
||||
/dev/sda1: UUID="3de247f3-5de4-4a44-afc5-1fe179750cf7" TYPE="ext4"
|
||||
|
@ -212,12 +212,12 @@ Number Start End Size Type File system Flags
|
|||
/dev/mapper/linux-swap: UUID="47b4d329-975c-4c08-b218-f9c9bf3635f1" TYPE="swap"
|
||||
....
|
||||
|
||||
4. From the output above, you recall that your root volume exists on an
|
||||
. From the output above, you recall that your root volume exists on an
|
||||
encrypted block device. Following the guidance disk encryption guidance
|
||||
from the
|
||||
http://docs.fedoraproject.org/install-guide/f%7B%7BFedoraVersion%7D%7D/en-US/html/apcs04s04.html[
|
||||
Installation Guide], you unlock your encrypted root volume.
|
||||
|
||||
+
|
||||
....
|
||||
UUID=$(cryptsetup luksUUID /dev/mapper/linux-root)
|
||||
cryptsetup luksOpen /dev/mapper/linux-root luks-$UUID
|
||||
|
@ -225,13 +225,13 @@ Enter passphrase for /dev/mapper/linux-root:
|
|||
Key slot 0 unlocked.
|
||||
....
|
||||
|
||||
5. Next, make a symbolic link to the unlocked root volume
|
||||
|
||||
. Next, make a symbolic link to the unlocked root volume
|
||||
+
|
||||
....
|
||||
ln -s /dev/mapper/luks-$UUID /dev/root
|
||||
....
|
||||
|
||||
6. With the root volume available, you may continue booting the system
|
||||
. With the root volume available, you may continue booting the system
|
||||
by exiting the dracut shell
|
||||
|
||||
....
|
||||
|
|
Loading…
Reference in a new issue