Can't get Ubuntu to boot from LUKS / LVM group on external drive on iMac with refind

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 a 2017 iMac and am trying to install Ubuntu on an external USB3 drive. The external drive has a GPT partition table (no hybrid MBR) and is partitioned like so:



/dev/sda1: EFI partition
/dev/sda2: Windows-To-Go partition
/dev/sda3: ext4 Linux boot partition
/dev/sda4: LUKS / LVM partition
/dev/sda5: extra partition, not currently being used


The LVM group that's available once the LUKS partition is decrypted contains an ext4 partition intended to be the main partition for my linux system, and a swap partition.



I'm using refind on my mac to facilitate booting these different operating systems.



When I installed Ubuntu, I made sure all of my partitions were already decrypted and mounted, I picked manual disk setup in the installer (as I didn't want it to blow away my whole external disk including the Windows installation) and manually specified the following:




  1. /boot as the mount point for /dev/sda3


  2. / as the mount point for the main ext4 partition in my LVM group

  3. grub should be installed to /dev/sda3

The installer finished without errors. When I reboot, however, I have two options for how to boot this Ubuntu installation, and neither one works.



I can boot from a grub bootloader installed in the EFI partition of my internal hard drive. Note that I did not want Linux or any other operating system adding their bootloader to this drive. I just want it to remain a normal macOS drive with the addition of refind. Nonetheless, if I boot from it using refind, it shows the Ubuntu logo before dropping me to an (initramfs) prompt with no error messages at all.



If I pick the bootloader I specified should be installed to /dev/sda3, it starts loading, fails with the following errors:



mount: can't find /root in /etc/fstab
...
mount: mounting /dev on /root/dev failed: No such file or directory
mount: mounting /run on /root/run failed: No such file or directory
run-init: current directory on the same filesystem as the root: error 0
Target file system doesn't have requested /sbin/init
run-init: current directory on the same filesystem as the root: error 0
(repeats four more times)
No init found. Try passing init= bootarg.


...and then drops me to a (initramfs) prompt.



I have no idea how to fix this! I tried using Boot-Repair but it made no difference at all. Help!










share|improve this question

























    up vote
    0
    down vote

    favorite












    I have a 2017 iMac and am trying to install Ubuntu on an external USB3 drive. The external drive has a GPT partition table (no hybrid MBR) and is partitioned like so:



    /dev/sda1: EFI partition
    /dev/sda2: Windows-To-Go partition
    /dev/sda3: ext4 Linux boot partition
    /dev/sda4: LUKS / LVM partition
    /dev/sda5: extra partition, not currently being used


    The LVM group that's available once the LUKS partition is decrypted contains an ext4 partition intended to be the main partition for my linux system, and a swap partition.



    I'm using refind on my mac to facilitate booting these different operating systems.



    When I installed Ubuntu, I made sure all of my partitions were already decrypted and mounted, I picked manual disk setup in the installer (as I didn't want it to blow away my whole external disk including the Windows installation) and manually specified the following:




    1. /boot as the mount point for /dev/sda3


    2. / as the mount point for the main ext4 partition in my LVM group

    3. grub should be installed to /dev/sda3

    The installer finished without errors. When I reboot, however, I have two options for how to boot this Ubuntu installation, and neither one works.



    I can boot from a grub bootloader installed in the EFI partition of my internal hard drive. Note that I did not want Linux or any other operating system adding their bootloader to this drive. I just want it to remain a normal macOS drive with the addition of refind. Nonetheless, if I boot from it using refind, it shows the Ubuntu logo before dropping me to an (initramfs) prompt with no error messages at all.



    If I pick the bootloader I specified should be installed to /dev/sda3, it starts loading, fails with the following errors:



    mount: can't find /root in /etc/fstab
    ...
    mount: mounting /dev on /root/dev failed: No such file or directory
    mount: mounting /run on /root/run failed: No such file or directory
    run-init: current directory on the same filesystem as the root: error 0
    Target file system doesn't have requested /sbin/init
    run-init: current directory on the same filesystem as the root: error 0
    (repeats four more times)
    No init found. Try passing init= bootarg.


    ...and then drops me to a (initramfs) prompt.



    I have no idea how to fix this! I tried using Boot-Repair but it made no difference at all. Help!










    share|improve this question























      up vote
      0
      down vote

      favorite









      up vote
      0
      down vote

      favorite











      I have a 2017 iMac and am trying to install Ubuntu on an external USB3 drive. The external drive has a GPT partition table (no hybrid MBR) and is partitioned like so:



      /dev/sda1: EFI partition
      /dev/sda2: Windows-To-Go partition
      /dev/sda3: ext4 Linux boot partition
      /dev/sda4: LUKS / LVM partition
      /dev/sda5: extra partition, not currently being used


      The LVM group that's available once the LUKS partition is decrypted contains an ext4 partition intended to be the main partition for my linux system, and a swap partition.



      I'm using refind on my mac to facilitate booting these different operating systems.



      When I installed Ubuntu, I made sure all of my partitions were already decrypted and mounted, I picked manual disk setup in the installer (as I didn't want it to blow away my whole external disk including the Windows installation) and manually specified the following:




      1. /boot as the mount point for /dev/sda3


      2. / as the mount point for the main ext4 partition in my LVM group

      3. grub should be installed to /dev/sda3

      The installer finished without errors. When I reboot, however, I have two options for how to boot this Ubuntu installation, and neither one works.



      I can boot from a grub bootloader installed in the EFI partition of my internal hard drive. Note that I did not want Linux or any other operating system adding their bootloader to this drive. I just want it to remain a normal macOS drive with the addition of refind. Nonetheless, if I boot from it using refind, it shows the Ubuntu logo before dropping me to an (initramfs) prompt with no error messages at all.



      If I pick the bootloader I specified should be installed to /dev/sda3, it starts loading, fails with the following errors:



      mount: can't find /root in /etc/fstab
      ...
      mount: mounting /dev on /root/dev failed: No such file or directory
      mount: mounting /run on /root/run failed: No such file or directory
      run-init: current directory on the same filesystem as the root: error 0
      Target file system doesn't have requested /sbin/init
      run-init: current directory on the same filesystem as the root: error 0
      (repeats four more times)
      No init found. Try passing init= bootarg.


      ...and then drops me to a (initramfs) prompt.



      I have no idea how to fix this! I tried using Boot-Repair but it made no difference at all. Help!










      share|improve this question













      I have a 2017 iMac and am trying to install Ubuntu on an external USB3 drive. The external drive has a GPT partition table (no hybrid MBR) and is partitioned like so:



      /dev/sda1: EFI partition
      /dev/sda2: Windows-To-Go partition
      /dev/sda3: ext4 Linux boot partition
      /dev/sda4: LUKS / LVM partition
      /dev/sda5: extra partition, not currently being used


      The LVM group that's available once the LUKS partition is decrypted contains an ext4 partition intended to be the main partition for my linux system, and a swap partition.



      I'm using refind on my mac to facilitate booting these different operating systems.



      When I installed Ubuntu, I made sure all of my partitions were already decrypted and mounted, I picked manual disk setup in the installer (as I didn't want it to blow away my whole external disk including the Windows installation) and manually specified the following:




      1. /boot as the mount point for /dev/sda3


      2. / as the mount point for the main ext4 partition in my LVM group

      3. grub should be installed to /dev/sda3

      The installer finished without errors. When I reboot, however, I have two options for how to boot this Ubuntu installation, and neither one works.



      I can boot from a grub bootloader installed in the EFI partition of my internal hard drive. Note that I did not want Linux or any other operating system adding their bootloader to this drive. I just want it to remain a normal macOS drive with the addition of refind. Nonetheless, if I boot from it using refind, it shows the Ubuntu logo before dropping me to an (initramfs) prompt with no error messages at all.



      If I pick the bootloader I specified should be installed to /dev/sda3, it starts loading, fails with the following errors:



      mount: can't find /root in /etc/fstab
      ...
      mount: mounting /dev on /root/dev failed: No such file or directory
      mount: mounting /run on /root/run failed: No such file or directory
      run-init: current directory on the same filesystem as the root: error 0
      Target file system doesn't have requested /sbin/init
      run-init: current directory on the same filesystem as the root: error 0
      (repeats four more times)
      No init found. Try passing init= bootarg.


      ...and then drops me to a (initramfs) prompt.



      I have no idea how to fix this! I tried using Boot-Repair but it made no difference at all. Help!







      boot dual-boot grub2 lvm luks






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Feb 16 at 18:25









      GuyGizmo

      1006




      1006




















          1 Answer
          1






          active

          oldest

          votes

















          up vote
          0
          down vote



          accepted










          I finally got it working! Thanks largely to this answer for another encryption related question. I didn't end up encrypting my boot partition as I didn't think it was necessary, but there were a few key things I did differently from above. It seems the major issue was that the Ubuntu installer couldn't figure out exactly how my partitions were set up, so it was necessary to chroot into the new linux install, make some changes that indicate what's going on, and then reinstall grub. Here's what I did:



          1. I formatted /dev/sda3 as ext2. (Not sure if that was important.)

          2. When installing, I specified that the bootloader should be installed to /dev/sda not /dev/sda3

          3. I specified /dev/sda1 as EFI Boot Partition


          4. After installation finished successfully, I told it not to reboot, and I did the following in a terminal:



            sudo mount /dev/mapper/my_linux_lvm_partition /target
            sudo mount /dev/sda3 /target/boot
            sudo mount /dev/sda1 /target/boot/efi
            sudo mount --bind /dev /target/dev
            sudo mount --bind /proc /target/proc
            sudo mount --bind /sys /target/sys
            sudo chroot /target



          5. Now that I chroot'ed into my installation, I edited /etc/default/grub and added the line: GRUB_ENABLE_CRYPTODISK=y


          6. Got the UUID of my various partitions using blkid


          7. Added a line to /etc/crypttab: my_luks_partition_name UUID=<UUID of /dev/sda4> none luks,discard


          8. sudo grub-install --target=x86_64-efi --efi-directory /boot/efi --bootloader=ubuntu --boot-directory=/boot/efi/EFI/ubuntu --recheck


          9. sudo grub-mkconfig -o /boot/efi/EFI/ubuntu/grub.cfg


          10. sudo update-initramfs -c -k all


          I noticed it was important to get the name of the LUKS partition correct, otherwise there would be errors when running update-initramfs.



          This took me two whole days of hair pulling frustration to figure out. I only hope that this information will help someone else do it too without nearly so much agony.






          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%2f1006867%2fcant-get-ubuntu-to-boot-from-luks-lvm-group-on-external-drive-on-imac-with-re%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










            I finally got it working! Thanks largely to this answer for another encryption related question. I didn't end up encrypting my boot partition as I didn't think it was necessary, but there were a few key things I did differently from above. It seems the major issue was that the Ubuntu installer couldn't figure out exactly how my partitions were set up, so it was necessary to chroot into the new linux install, make some changes that indicate what's going on, and then reinstall grub. Here's what I did:



            1. I formatted /dev/sda3 as ext2. (Not sure if that was important.)

            2. When installing, I specified that the bootloader should be installed to /dev/sda not /dev/sda3

            3. I specified /dev/sda1 as EFI Boot Partition


            4. After installation finished successfully, I told it not to reboot, and I did the following in a terminal:



              sudo mount /dev/mapper/my_linux_lvm_partition /target
              sudo mount /dev/sda3 /target/boot
              sudo mount /dev/sda1 /target/boot/efi
              sudo mount --bind /dev /target/dev
              sudo mount --bind /proc /target/proc
              sudo mount --bind /sys /target/sys
              sudo chroot /target



            5. Now that I chroot'ed into my installation, I edited /etc/default/grub and added the line: GRUB_ENABLE_CRYPTODISK=y


            6. Got the UUID of my various partitions using blkid


            7. Added a line to /etc/crypttab: my_luks_partition_name UUID=<UUID of /dev/sda4> none luks,discard


            8. sudo grub-install --target=x86_64-efi --efi-directory /boot/efi --bootloader=ubuntu --boot-directory=/boot/efi/EFI/ubuntu --recheck


            9. sudo grub-mkconfig -o /boot/efi/EFI/ubuntu/grub.cfg


            10. sudo update-initramfs -c -k all


            I noticed it was important to get the name of the LUKS partition correct, otherwise there would be errors when running update-initramfs.



            This took me two whole days of hair pulling frustration to figure out. I only hope that this information will help someone else do it too without nearly so much agony.






            share|improve this answer
























              up vote
              0
              down vote



              accepted










              I finally got it working! Thanks largely to this answer for another encryption related question. I didn't end up encrypting my boot partition as I didn't think it was necessary, but there were a few key things I did differently from above. It seems the major issue was that the Ubuntu installer couldn't figure out exactly how my partitions were set up, so it was necessary to chroot into the new linux install, make some changes that indicate what's going on, and then reinstall grub. Here's what I did:



              1. I formatted /dev/sda3 as ext2. (Not sure if that was important.)

              2. When installing, I specified that the bootloader should be installed to /dev/sda not /dev/sda3

              3. I specified /dev/sda1 as EFI Boot Partition


              4. After installation finished successfully, I told it not to reboot, and I did the following in a terminal:



                sudo mount /dev/mapper/my_linux_lvm_partition /target
                sudo mount /dev/sda3 /target/boot
                sudo mount /dev/sda1 /target/boot/efi
                sudo mount --bind /dev /target/dev
                sudo mount --bind /proc /target/proc
                sudo mount --bind /sys /target/sys
                sudo chroot /target



              5. Now that I chroot'ed into my installation, I edited /etc/default/grub and added the line: GRUB_ENABLE_CRYPTODISK=y


              6. Got the UUID of my various partitions using blkid


              7. Added a line to /etc/crypttab: my_luks_partition_name UUID=<UUID of /dev/sda4> none luks,discard


              8. sudo grub-install --target=x86_64-efi --efi-directory /boot/efi --bootloader=ubuntu --boot-directory=/boot/efi/EFI/ubuntu --recheck


              9. sudo grub-mkconfig -o /boot/efi/EFI/ubuntu/grub.cfg


              10. sudo update-initramfs -c -k all


              I noticed it was important to get the name of the LUKS partition correct, otherwise there would be errors when running update-initramfs.



              This took me two whole days of hair pulling frustration to figure out. I only hope that this information will help someone else do it too without nearly so much agony.






              share|improve this answer






















                up vote
                0
                down vote



                accepted







                up vote
                0
                down vote



                accepted






                I finally got it working! Thanks largely to this answer for another encryption related question. I didn't end up encrypting my boot partition as I didn't think it was necessary, but there were a few key things I did differently from above. It seems the major issue was that the Ubuntu installer couldn't figure out exactly how my partitions were set up, so it was necessary to chroot into the new linux install, make some changes that indicate what's going on, and then reinstall grub. Here's what I did:



                1. I formatted /dev/sda3 as ext2. (Not sure if that was important.)

                2. When installing, I specified that the bootloader should be installed to /dev/sda not /dev/sda3

                3. I specified /dev/sda1 as EFI Boot Partition


                4. After installation finished successfully, I told it not to reboot, and I did the following in a terminal:



                  sudo mount /dev/mapper/my_linux_lvm_partition /target
                  sudo mount /dev/sda3 /target/boot
                  sudo mount /dev/sda1 /target/boot/efi
                  sudo mount --bind /dev /target/dev
                  sudo mount --bind /proc /target/proc
                  sudo mount --bind /sys /target/sys
                  sudo chroot /target



                5. Now that I chroot'ed into my installation, I edited /etc/default/grub and added the line: GRUB_ENABLE_CRYPTODISK=y


                6. Got the UUID of my various partitions using blkid


                7. Added a line to /etc/crypttab: my_luks_partition_name UUID=<UUID of /dev/sda4> none luks,discard


                8. sudo grub-install --target=x86_64-efi --efi-directory /boot/efi --bootloader=ubuntu --boot-directory=/boot/efi/EFI/ubuntu --recheck


                9. sudo grub-mkconfig -o /boot/efi/EFI/ubuntu/grub.cfg


                10. sudo update-initramfs -c -k all


                I noticed it was important to get the name of the LUKS partition correct, otherwise there would be errors when running update-initramfs.



                This took me two whole days of hair pulling frustration to figure out. I only hope that this information will help someone else do it too without nearly so much agony.






                share|improve this answer












                I finally got it working! Thanks largely to this answer for another encryption related question. I didn't end up encrypting my boot partition as I didn't think it was necessary, but there were a few key things I did differently from above. It seems the major issue was that the Ubuntu installer couldn't figure out exactly how my partitions were set up, so it was necessary to chroot into the new linux install, make some changes that indicate what's going on, and then reinstall grub. Here's what I did:



                1. I formatted /dev/sda3 as ext2. (Not sure if that was important.)

                2. When installing, I specified that the bootloader should be installed to /dev/sda not /dev/sda3

                3. I specified /dev/sda1 as EFI Boot Partition


                4. After installation finished successfully, I told it not to reboot, and I did the following in a terminal:



                  sudo mount /dev/mapper/my_linux_lvm_partition /target
                  sudo mount /dev/sda3 /target/boot
                  sudo mount /dev/sda1 /target/boot/efi
                  sudo mount --bind /dev /target/dev
                  sudo mount --bind /proc /target/proc
                  sudo mount --bind /sys /target/sys
                  sudo chroot /target



                5. Now that I chroot'ed into my installation, I edited /etc/default/grub and added the line: GRUB_ENABLE_CRYPTODISK=y


                6. Got the UUID of my various partitions using blkid


                7. Added a line to /etc/crypttab: my_luks_partition_name UUID=<UUID of /dev/sda4> none luks,discard


                8. sudo grub-install --target=x86_64-efi --efi-directory /boot/efi --bootloader=ubuntu --boot-directory=/boot/efi/EFI/ubuntu --recheck


                9. sudo grub-mkconfig -o /boot/efi/EFI/ubuntu/grub.cfg


                10. sudo update-initramfs -c -k all


                I noticed it was important to get the name of the LUKS partition correct, otherwise there would be errors when running update-initramfs.



                This took me two whole days of hair pulling frustration to figure out. I only hope that this information will help someone else do it too without nearly so much agony.







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Feb 17 at 7:14









                GuyGizmo

                1006




                1006



























                     

                    draft saved


                    draft discarded















































                     


                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function ()
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1006867%2fcant-get-ubuntu-to-boot-from-luks-lvm-group-on-external-drive-on-imac-with-re%23new-answer', 'question_page');

                    );

                    Post as a guest













































































                    Popular posts from this blog

                    pylint3 and pip3 broken

                    Missing snmpget and snmpwalk

                    How to enroll fingerprints to Ubuntu 17.10 with VFS491