Unable to boot into LVM/LUKS on second disk

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP








up vote
0
down vote

favorite












I have one Linux OS (Linux Mint) installed on my first hard disk inside a LUKS partition and now I'm trying to install a dual boot scenario on a second disk.
I successfully installed Ubuntu into a LUKS partition on the second disk (sdb) with these partitions (among others):



sdb1 boot
sdb4 LUKS


I used LVM inside the LUKS partition to create these logical partitions (among others):



vg-lvroot1
swap


I unlocked the LUKS partition and installed Ubuntu into vg-lvroot1 (as /) and sdb1 (as boot) and updated the boot loader on sdb. Then I ran the normal dance:



$ mount /dev/mapper/vg-lvroot1 /mnt
$ mount /dev/sdb1 /mnt/boot
$ mount --bind /dev /mnt/dev
$ mount --bind /dev/pts /mnt/dev/pts
$ mount --bind /proc /mnt/proc
$ mount --bind /sys /mnt/sys
$ chroot /mnt
$ echo "sdb4_crypt UUID=$(blkid -s UUID -o value /dev/sdb4) none luks" >/etc/crypttab
$ update-initramfs -u
$ grub-install /dev/sdb
$ grub-install --recheck /dev/sdb
$ update-grub


When I reboot and use the BIOS to select my second disk, I get the expected grub prompt for Ubuntu. But when I choose it it starts the boot process, but instead of prompting for the LUKS key, it eventually drops down into a busybox prompt.



What did I do wrong? I have used this procedure many times on my first disk with various Debian-based OSes including Ubuntu and including another install into a separate boot partition using a different LVM root partition inside LUKS, with no problem, but something seems to be wrong when I do this procedure with my second disk.



What could be going on?










share|improve this question



























    up vote
    0
    down vote

    favorite












    I have one Linux OS (Linux Mint) installed on my first hard disk inside a LUKS partition and now I'm trying to install a dual boot scenario on a second disk.
    I successfully installed Ubuntu into a LUKS partition on the second disk (sdb) with these partitions (among others):



    sdb1 boot
    sdb4 LUKS


    I used LVM inside the LUKS partition to create these logical partitions (among others):



    vg-lvroot1
    swap


    I unlocked the LUKS partition and installed Ubuntu into vg-lvroot1 (as /) and sdb1 (as boot) and updated the boot loader on sdb. Then I ran the normal dance:



    $ mount /dev/mapper/vg-lvroot1 /mnt
    $ mount /dev/sdb1 /mnt/boot
    $ mount --bind /dev /mnt/dev
    $ mount --bind /dev/pts /mnt/dev/pts
    $ mount --bind /proc /mnt/proc
    $ mount --bind /sys /mnt/sys
    $ chroot /mnt
    $ echo "sdb4_crypt UUID=$(blkid -s UUID -o value /dev/sdb4) none luks" >/etc/crypttab
    $ update-initramfs -u
    $ grub-install /dev/sdb
    $ grub-install --recheck /dev/sdb
    $ update-grub


    When I reboot and use the BIOS to select my second disk, I get the expected grub prompt for Ubuntu. But when I choose it it starts the boot process, but instead of prompting for the LUKS key, it eventually drops down into a busybox prompt.



    What did I do wrong? I have used this procedure many times on my first disk with various Debian-based OSes including Ubuntu and including another install into a separate boot partition using a different LVM root partition inside LUKS, with no problem, but something seems to be wrong when I do this procedure with my second disk.



    What could be going on?










    share|improve this question

























      up vote
      0
      down vote

      favorite









      up vote
      0
      down vote

      favorite











      I have one Linux OS (Linux Mint) installed on my first hard disk inside a LUKS partition and now I'm trying to install a dual boot scenario on a second disk.
      I successfully installed Ubuntu into a LUKS partition on the second disk (sdb) with these partitions (among others):



      sdb1 boot
      sdb4 LUKS


      I used LVM inside the LUKS partition to create these logical partitions (among others):



      vg-lvroot1
      swap


      I unlocked the LUKS partition and installed Ubuntu into vg-lvroot1 (as /) and sdb1 (as boot) and updated the boot loader on sdb. Then I ran the normal dance:



      $ mount /dev/mapper/vg-lvroot1 /mnt
      $ mount /dev/sdb1 /mnt/boot
      $ mount --bind /dev /mnt/dev
      $ mount --bind /dev/pts /mnt/dev/pts
      $ mount --bind /proc /mnt/proc
      $ mount --bind /sys /mnt/sys
      $ chroot /mnt
      $ echo "sdb4_crypt UUID=$(blkid -s UUID -o value /dev/sdb4) none luks" >/etc/crypttab
      $ update-initramfs -u
      $ grub-install /dev/sdb
      $ grub-install --recheck /dev/sdb
      $ update-grub


      When I reboot and use the BIOS to select my second disk, I get the expected grub prompt for Ubuntu. But when I choose it it starts the boot process, but instead of prompting for the LUKS key, it eventually drops down into a busybox prompt.



      What did I do wrong? I have used this procedure many times on my first disk with various Debian-based OSes including Ubuntu and including another install into a separate boot partition using a different LVM root partition inside LUKS, with no problem, but something seems to be wrong when I do this procedure with my second disk.



      What could be going on?










      share|improve this question















      I have one Linux OS (Linux Mint) installed on my first hard disk inside a LUKS partition and now I'm trying to install a dual boot scenario on a second disk.
      I successfully installed Ubuntu into a LUKS partition on the second disk (sdb) with these partitions (among others):



      sdb1 boot
      sdb4 LUKS


      I used LVM inside the LUKS partition to create these logical partitions (among others):



      vg-lvroot1
      swap


      I unlocked the LUKS partition and installed Ubuntu into vg-lvroot1 (as /) and sdb1 (as boot) and updated the boot loader on sdb. Then I ran the normal dance:



      $ mount /dev/mapper/vg-lvroot1 /mnt
      $ mount /dev/sdb1 /mnt/boot
      $ mount --bind /dev /mnt/dev
      $ mount --bind /dev/pts /mnt/dev/pts
      $ mount --bind /proc /mnt/proc
      $ mount --bind /sys /mnt/sys
      $ chroot /mnt
      $ echo "sdb4_crypt UUID=$(blkid -s UUID -o value /dev/sdb4) none luks" >/etc/crypttab
      $ update-initramfs -u
      $ grub-install /dev/sdb
      $ grub-install --recheck /dev/sdb
      $ update-grub


      When I reboot and use the BIOS to select my second disk, I get the expected grub prompt for Ubuntu. But when I choose it it starts the boot process, but instead of prompting for the LUKS key, it eventually drops down into a busybox prompt.



      What did I do wrong? I have used this procedure many times on my first disk with various Debian-based OSes including Ubuntu and including another install into a separate boot partition using a different LVM root partition inside LUKS, with no problem, but something seems to be wrong when I do this procedure with my second disk.



      What could be going on?







      boot dual-boot grub2 lvm luks






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Mar 6 at 23:38









      galoget

      2,1062820




      2,1062820










      asked Mar 6 at 6:04









      John Wiersba

      1034




      1034




















          1 Answer
          1






          active

          oldest

          votes

















          up vote
          0
          down vote



          accepted










          It turns out that the problem involved the way the LUKS encrypted partition was unlocked. I had be using the GUI tools to unlock it, by clicking and entering the passphrase. My guess is that this confuses things somehow by assigning a different label to the encrypted partition. It appears that the encrypted partition really does need to be unlocked properly using cryptsetup luksOpen ....



          Additionally, it is important to have the encrypted partition unlocked when running update-initramfs and update-grub (I made this mistake several times while trying to fix the original problem).






          share|improve this answer




















            Your Answer







            StackExchange.ready(function()
            var channelOptions =
            tags: "".split(" "),
            id: "89"
            ;
            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',
            convertImagesToLinks: true,
            noModals: false,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: 10,
            bindNavPrevention: true,
            postfix: "",
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            );



            );













             

            draft saved


            draft discarded


















            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1012298%2funable-to-boot-into-lvm-luks-on-second-disk%23new-answer', 'question_page');

            );

            Post as a guest






























            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes








            up vote
            0
            down vote



            accepted










            It turns out that the problem involved the way the LUKS encrypted partition was unlocked. I had be using the GUI tools to unlock it, by clicking and entering the passphrase. My guess is that this confuses things somehow by assigning a different label to the encrypted partition. It appears that the encrypted partition really does need to be unlocked properly using cryptsetup luksOpen ....



            Additionally, it is important to have the encrypted partition unlocked when running update-initramfs and update-grub (I made this mistake several times while trying to fix the original problem).






            share|improve this answer
























              up vote
              0
              down vote



              accepted










              It turns out that the problem involved the way the LUKS encrypted partition was unlocked. I had be using the GUI tools to unlock it, by clicking and entering the passphrase. My guess is that this confuses things somehow by assigning a different label to the encrypted partition. It appears that the encrypted partition really does need to be unlocked properly using cryptsetup luksOpen ....



              Additionally, it is important to have the encrypted partition unlocked when running update-initramfs and update-grub (I made this mistake several times while trying to fix the original problem).






              share|improve this answer






















                up vote
                0
                down vote



                accepted







                up vote
                0
                down vote



                accepted






                It turns out that the problem involved the way the LUKS encrypted partition was unlocked. I had be using the GUI tools to unlock it, by clicking and entering the passphrase. My guess is that this confuses things somehow by assigning a different label to the encrypted partition. It appears that the encrypted partition really does need to be unlocked properly using cryptsetup luksOpen ....



                Additionally, it is important to have the encrypted partition unlocked when running update-initramfs and update-grub (I made this mistake several times while trying to fix the original problem).






                share|improve this answer












                It turns out that the problem involved the way the LUKS encrypted partition was unlocked. I had be using the GUI tools to unlock it, by clicking and entering the passphrase. My guess is that this confuses things somehow by assigning a different label to the encrypted partition. It appears that the encrypted partition really does need to be unlocked properly using cryptsetup luksOpen ....



                Additionally, it is important to have the encrypted partition unlocked when running update-initramfs and update-grub (I made this mistake several times while trying to fix the original problem).







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Mar 7 at 18:33









                John Wiersba

                1034




                1034



























                     

                    draft saved


                    draft discarded















































                     


                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function ()
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1012298%2funable-to-boot-into-lvm-luks-on-second-disk%23new-answer', 'question_page');

                    );

                    Post as a guest













































































                    Popular posts from this blog

                    How do so many people here on Academia.SE, and in general, afford lavish higher education programs?

                    Trouble downloading packages list due to a “Hash sum mismatch” error

                    How do I move numbers in filenames, in a batch renaming operation?