[SOLVED] Unable to boot into LVM/LUKS on second disk

Questions about Grub, UEFI,the liveCD and the installer
Forum rules
Before you post please read how to get help
Post Reply
jrw32982
Level 1
Level 1
Posts: 13
Joined: Thu Dec 24, 2009 10:35 am

[SOLVED] Unable to boot into LVM/LUKS on second disk

Post by jrw32982 » Mon Mar 05, 2018 11:36 am

I'm running 17.2 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 18.3 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
  • vg-lvdata
  • swap
I unlocked the LUKS partition and installed 18.3 into vg-lvroot1 (as /) and sdb1 (as boot) and updated the boot loader on sdb. Then I ran the normal dance:

Code: Select all

$ 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 18.3. But when I choose it it starts the mint boot process, but instead of prompting for the LUKS key (as it does for my 17.2 install on my first disk), it eventually drops down into a busybox prompt.

What did I do wrong? I have used this procedure many times on my first disk (I have another 18.3 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 with my second disk.

Are sda and sdb getting switched when I select my second disk to boot from?

I should add that my intention is that eventually, once I have my 18.3 install properly configured, I will switch from 17.2 on my first disk to 18.3 on my second disk as my default distribution and perhaps remove the first disk from my system.
Last edited by jrw32982 on Wed Mar 07, 2018 2:27 pm, edited 1 time in total.

jrw32982
Level 1
Level 1
Posts: 13
Joined: Thu Dec 24, 2009 10:35 am

Re: Unable to boot into LVM/LUKS on second disk

Post by jrw32982 » Wed Mar 07, 2018 2:27 pm

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

Code: Select all

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).

Post Reply

Return to “Installation & Boot”