Dual boot setup with LUKS and rEFInd: Can't Restore Backup to Second Partition












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?










share|improve this question









New contributor




The Roark is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.

























    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?










    share|improve this question









    New contributor




    The Roark is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
    Check out our Code of Conduct.























      1












      1








      1


      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?










      share|improve this question









      New contributor




      The Roark is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.












      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?







      luks refind






      share|improve this question









      New contributor




      The Roark is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.











      share|improve this question









      New contributor




      The Roark is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.









      share|improve this question




      share|improve this question








      edited 2 mins ago







      The Roark













      New contributor




      The Roark is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.









      asked 15 mins ago









      The RoarkThe Roark

      63




      63




      New contributor




      The Roark is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.





      New contributor





      The Roark is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.






      The Roark is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.






















          0






          active

          oldest

          votes











          Your Answer








          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "106"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: false,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: null,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });






          The Roark is a new contributor. Be nice, and check out our Code of Conduct.










          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f509118%2fdual-boot-setup-with-luks-and-refind-cant-restore-backup-to-second-partition%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          0






          active

          oldest

          votes








          0






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes








          The Roark is a new contributor. Be nice, and check out our Code of Conduct.










          draft saved

          draft discarded


















          The Roark is a new contributor. Be nice, and check out our Code of Conduct.













          The Roark is a new contributor. Be nice, and check out our Code of Conduct.












          The Roark is a new contributor. Be nice, and check out our Code of Conduct.
















          Thanks for contributing an answer to Unix & Linux Stack Exchange!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f509118%2fdual-boot-setup-with-luks-and-refind-cant-restore-backup-to-second-partition%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          CARDNET

          Boot-repair Failure: Unable to locate package grub-common:i386

          Aws NAT - Aws IGW- Aws router