Can't get Ubuntu to boot from LUKS / LVM group on external drive on iMac with refind
![Creative The name of the picture](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgO9GURib1T8z7lCwjOGLQaGtrueEthgQ8LO42ZX8cOfTqDK4jvDDpKkLFwf2J49kYCMNW7d4ABih_XCb_2UXdq5fPJDkoyg7-8g_YfRUot-XnaXkNYycsNp7lA5_TW9td0FFpLQ2APzKcZ/s1600/1.jpg)
![Creative The name of the picture](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhYQ0N5W1qAOxLP7t7iOM6O6AzbZnkXUy16s7P_CWfOb5UbTQY_aDsc727chyphenhyphen5W4IppVNernMMQeaUFTB_rFzAd95_CDt-tnwN-nBx6JyUp2duGjPaL5-VgNO41AVsA_vu30EJcipdDG409/s400/Clash+Royale+CLAN+TAG%2523URR8PPP.png)
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:
/boot
as the mount point for/dev/sda3
/
as the mount point for the main ext4 partition in my LVM group- 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
add a comment |Â
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:
/boot
as the mount point for/dev/sda3
/
as the mount point for the main ext4 partition in my LVM group- 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
add a comment |Â
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:
/boot
as the mount point for/dev/sda3
/
as the mount point for the main ext4 partition in my LVM group- 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
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:
/boot
as the mount point for/dev/sda3
/
as the mount point for the main ext4 partition in my LVM group- 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
boot dual-boot grub2 lvm luks
asked Feb 16 at 18:25
GuyGizmo
1006
1006
add a comment |Â
add a comment |Â
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:
- I formatted /dev/sda3 as ext2. (Not sure if that was important.)
- When installing, I specified that the bootloader should be installed to
/dev/sda
not/dev/sda3
- I specified
/dev/sda1
as EFI Boot Partition 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 /targetNow that I
chroot
'ed into my installation, I edited/etc/default/grub
and added the line:GRUB_ENABLE_CRYPTODISK=y
Got the UUID of my various partitions using
blkid
Added a line to
/etc/crypttab
:my_luks_partition_name UUID=<UUID of /dev/sda4> none luks,discard
sudo grub-install --target=x86_64-efi --efi-directory /boot/efi --bootloader=ubuntu --boot-directory=/boot/efi/EFI/ubuntu --recheck
sudo grub-mkconfig -o /boot/efi/EFI/ubuntu/grub.cfg
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.
add a comment |Â
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:
- I formatted /dev/sda3 as ext2. (Not sure if that was important.)
- When installing, I specified that the bootloader should be installed to
/dev/sda
not/dev/sda3
- I specified
/dev/sda1
as EFI Boot Partition 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 /targetNow that I
chroot
'ed into my installation, I edited/etc/default/grub
and added the line:GRUB_ENABLE_CRYPTODISK=y
Got the UUID of my various partitions using
blkid
Added a line to
/etc/crypttab
:my_luks_partition_name UUID=<UUID of /dev/sda4> none luks,discard
sudo grub-install --target=x86_64-efi --efi-directory /boot/efi --bootloader=ubuntu --boot-directory=/boot/efi/EFI/ubuntu --recheck
sudo grub-mkconfig -o /boot/efi/EFI/ubuntu/grub.cfg
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.
add a comment |Â
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:
- I formatted /dev/sda3 as ext2. (Not sure if that was important.)
- When installing, I specified that the bootloader should be installed to
/dev/sda
not/dev/sda3
- I specified
/dev/sda1
as EFI Boot Partition 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 /targetNow that I
chroot
'ed into my installation, I edited/etc/default/grub
and added the line:GRUB_ENABLE_CRYPTODISK=y
Got the UUID of my various partitions using
blkid
Added a line to
/etc/crypttab
:my_luks_partition_name UUID=<UUID of /dev/sda4> none luks,discard
sudo grub-install --target=x86_64-efi --efi-directory /boot/efi --bootloader=ubuntu --boot-directory=/boot/efi/EFI/ubuntu --recheck
sudo grub-mkconfig -o /boot/efi/EFI/ubuntu/grub.cfg
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.
add a comment |Â
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:
- I formatted /dev/sda3 as ext2. (Not sure if that was important.)
- When installing, I specified that the bootloader should be installed to
/dev/sda
not/dev/sda3
- I specified
/dev/sda1
as EFI Boot Partition 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 /targetNow that I
chroot
'ed into my installation, I edited/etc/default/grub
and added the line:GRUB_ENABLE_CRYPTODISK=y
Got the UUID of my various partitions using
blkid
Added a line to
/etc/crypttab
:my_luks_partition_name UUID=<UUID of /dev/sda4> none luks,discard
sudo grub-install --target=x86_64-efi --efi-directory /boot/efi --bootloader=ubuntu --boot-directory=/boot/efi/EFI/ubuntu --recheck
sudo grub-mkconfig -o /boot/efi/EFI/ubuntu/grub.cfg
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.
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:
- I formatted /dev/sda3 as ext2. (Not sure if that was important.)
- When installing, I specified that the bootloader should be installed to
/dev/sda
not/dev/sda3
- I specified
/dev/sda1
as EFI Boot Partition 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 /targetNow that I
chroot
'ed into my installation, I edited/etc/default/grub
and added the line:GRUB_ENABLE_CRYPTODISK=y
Got the UUID of my various partitions using
blkid
Added a line to
/etc/crypttab
:my_luks_partition_name UUID=<UUID of /dev/sda4> none luks,discard
sudo grub-install --target=x86_64-efi --efi-directory /boot/efi --bootloader=ubuntu --boot-directory=/boot/efi/EFI/ubuntu --recheck
sudo grub-mkconfig -o /boot/efi/EFI/ubuntu/grub.cfg
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.
answered Feb 17 at 7:14
GuyGizmo
1006
1006
add a comment |Â
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
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
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password