Unable to boot into LVM/LUKS on second disk

Clash 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?
boot dual-boot grub2 lvm luks
add a comment |Â
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?
boot dual-boot grub2 lvm luks
add a comment |Â
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?
boot dual-boot grub2 lvm luks
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
boot dual-boot grub2 lvm luks
edited Mar 6 at 23:38
galoget
2,1062820
2,1062820
asked Mar 6 at 6:04
John Wiersba
1034
1034
add a comment |Â
add a comment |Â
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).
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
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).
add a comment |Â
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).
add a comment |Â
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).
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).
answered Mar 7 at 18:33
John Wiersba
1034
1034
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%2f1012298%2funable-to-boot-into-lvm-luks-on-second-disk%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