1

I have a dual boot setup on a Windows machine with multiple partitions, the two Linux ones being encrypted using LUKS. For some reason, I can no longer restore a backup to my second Linux LUKS partition and properly boot into the LUKS splash screen so I can enter my decryption password. Instead, it tries to boot the root partition and throws a dracut error.

The key partitions in my setup for this question are:

  • /dev/sda1 EFI
  • /dev/sda5 Boot for Fedora I
  • /dev/sda6 Root for Fedora I -- ENCRYPTED LUKS
  • /dev/sda7 Boot for Fedora II
  • /dev/sda8 Root for Fedora II -- ENCRYPTED LUKS

I use one combo (Fedora I Root and Boot) for my main driver. Then, if I want to try something new, I backup everything using tar and install it to to the second combo (Fedora II Root and Boot). So I happily go back and forth between my installs without risking borking my setup.

Until recently, I was able to untar a system backup to the decrypted LUKS logical partition, chroot into it, and update the initramfs (using sudo dracut -vf). Doing this is what (I thought) told it to look for the LUKS partition when booting. And on reboot, that newly installed system would display the LUKS decryption splash, then after I entered the password, boot from the root partition.

Now, however, I cannot seem to get a restored system using the second partition combo (Fedora II Root and Boot) to start at the LUKS splash screen. I have triple checked, and the setup is identical to the Fedora I combo. Specifically:

  1. On the Fedora I and Fedora II /bootpartitions (note: each is a separate partition), there is a file named refind_linux.conf the first stanza of which reads something like "Boot with standard options" "root=UUID=3a404a5a-3d2e-46cd-bf73-8f40e89efed3 ro rhgb quiet LANG=en_US.UTF-8 acpi_osi=Linux acpi_backlight=native", where 3a404a5a-3d2e-46cd-bf73-8f40e89efed3 is the UUID for the partition inside the encrypted partition (aka /dev/mapper/luks-f3303886-beb1-4733-8e6f-5794d430e87e). Of course, the UUID differs depending on whether it is the Fedora I partition or the Fedora II partition.
  2. On both the Fedora I and Fedora II root partitions (aka /), there is a file called /etc/fstab, which provides the /, /boot, and /boot/efi UUIDs for the respective partition. For example, one is:

    • UUID=3a404a5a-3d2e-46cd-bf73-8f40e89efed3 / ext4 defaults 1 1

    • UUID=D0BD-BA39 /boot/efi vfat umask=0077,shortname=winnt 0 2
    • UUID=e40053cc-4402-478e-9af8-67a218401b33 /boot ext4 defaults 1 1

The UUID for the / partition is the same one listed in refind_linux.conf.

  1. On both the Fedora I and Fedora II root partitions (aka /), there is a file called /etc/crypttab, which I thought tells Fedora where to look for the LUKS partition. Here, it is: luks-f3303886-beb1-4733-8e6f-5794d430e87e UUID=f3303886-beb1-4733-8e6f-5794d430e87e none luks, where f3303886-beb1-4733-8e6f-5794d430e87e is the UUID of the LUKS wrapper (aka /dev/sda7).

Although the setups are identical, the first combo boots and the second does not. What am I missing?

Is there some new method to get a newly installed system to recognize that there is an encrypted partition that it needs to read first?

What do I need to do to get the second partition combo to recognize that it should be looking at the LUKS partition first, not the root partition?

-1

The problem was a failing hard drive, with bad (repairable) sectors where this partition was.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.