[Bug 1492886] [NEW] cryptomount thinks locked device is: already mounted as cryptoX
TJ
ubuntu at iam.tj
Mon Sep 7 04:17:53 UTC 2015
Public bug reported:
Upstream bug: https://savannah.gnu.org/bugs/index.php?45889
Boot disk with 3 LUKS/dm-crypt GPT partitions
(hd0,gpt3) (hd0,gpt4) (hd0,gpt5)
grub is in (hd0,gpt3). The others have a LVM VG each.
Using GRUB_ENABLE_CRYPTODISK=y
I deliberately fail the first pass-phrase entry to get the rescue
environment. I then
cryptomount hd0,gpt3
(crypto0) device is now present and prefix/root are set correctly.
I insmod some other modules (exploring available functions) and
set debug=cryptodisk
I try to
cryptomount hd0,gpt4
cryptomount hd0,gpt4
and see the message
disk/cryptodisk.c:978: already mounted as crypto0
With the attached patch the mounts now work:
Attempting to decrypt master key...
Enter passphrase for hd0,gpt3 ( ...UUID...)
Slot 0 opened
disk/cryptodisk.c:718: insert 0, source 'hd0,gpt3', id 128, dev_id 0
grub rescue> ls
(hd0) (hd0,gpt5) (hd0,gpt4) (hd0,gpt3) (hd0,gpt2) (hd0,gpt1) (crypto0) (proc)
grub rescue> cryptomount hd0,gpt4
Attempting to decrypt master key...
Enter passphrase for hd0,gpt4 (...UUID...)
Slot 0 opened
disk/cryptodisk.c:718: insert 1, source 'hd0,gpt4', id 128, dev_id 0
grub rescue> cryptomount hd0,gpt5
Attempting to decrypt master key...
Enter passphrase for hd0,gpt5 (...UUID...)
Slot 0 opened
disk/cryptodisk.c:718: insert 2, source 'hd0,gpt4', id 128, dev_id 0
grub rescue> insmod lvm
grub rescue> ls
(lvm/VG_OS-x86_64.usr_local) (lvm/VG_OS-ubuntu_15.10_var) (lvm/VG_OS-ubuntu_15.10_rootfs) (lvm/VG_DATA-home) (hd0) (hd0,gpt5) (hd0,gpt4) (hd0,gpt3) (hd0,gpt2) (hd0,gpt1) (crypto2) (crypto1) (crypto0) (proc)
** Affects: grub2 (Ubuntu)
Importance: High
Status: In Progress
** Patch added: "Proposed fix"
https://bugs.launchpad.net/bugs/1492886/+attachment/4458552/+files/cryptodisk_recognise_partitions.patch
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to grub2 in Ubuntu.
https://bugs.launchpad.net/bugs/1492886
Title:
cryptomount thinks locked device is: already mounted as cryptoX
Status in grub2 package in Ubuntu:
In Progress
Bug description:
Upstream bug: https://savannah.gnu.org/bugs/index.php?45889
Boot disk with 3 LUKS/dm-crypt GPT partitions
(hd0,gpt3) (hd0,gpt4) (hd0,gpt5)
grub is in (hd0,gpt3). The others have a LVM VG each.
Using GRUB_ENABLE_CRYPTODISK=y
I deliberately fail the first pass-phrase entry to get the rescue
environment. I then
cryptomount hd0,gpt3
(crypto0) device is now present and prefix/root are set correctly.
I insmod some other modules (exploring available functions) and
set debug=cryptodisk
I try to
cryptomount hd0,gpt4
cryptomount hd0,gpt4
and see the message
disk/cryptodisk.c:978: already mounted as crypto0
With the attached patch the mounts now work:
Attempting to decrypt master key...
Enter passphrase for hd0,gpt3 ( ...UUID...)
Slot 0 opened
disk/cryptodisk.c:718: insert 0, source 'hd0,gpt3', id 128, dev_id 0
grub rescue> ls
(hd0) (hd0,gpt5) (hd0,gpt4) (hd0,gpt3) (hd0,gpt2) (hd0,gpt1) (crypto0) (proc)
grub rescue> cryptomount hd0,gpt4
Attempting to decrypt master key...
Enter passphrase for hd0,gpt4 (...UUID...)
Slot 0 opened
disk/cryptodisk.c:718: insert 1, source 'hd0,gpt4', id 128, dev_id 0
grub rescue> cryptomount hd0,gpt5
Attempting to decrypt master key...
Enter passphrase for hd0,gpt5 (...UUID...)
Slot 0 opened
disk/cryptodisk.c:718: insert 2, source 'hd0,gpt4', id 128, dev_id 0
grub rescue> insmod lvm
grub rescue> ls
(lvm/VG_OS-x86_64.usr_local) (lvm/VG_OS-ubuntu_15.10_var) (lvm/VG_OS-ubuntu_15.10_rootfs) (lvm/VG_DATA-home) (hd0) (hd0,gpt5) (hd0,gpt4) (hd0,gpt3) (hd0,gpt2) (hd0,gpt1) (crypto2) (crypto1) (crypto0) (proc)
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/grub2/+bug/1492886/+subscriptions
More information about the foundations-bugs
mailing list