cant mount 2nd crypted partition within cryptroot
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
cryptsetup (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
Using feisty. I'm within an encrypted root (/dev/sda10 mounted on /dev/mapper/sda10) and trying to open and mount another encrypted partition (/dev/sda8). device mapper fails, as follows:
root@localhost:~# ls -la /dev/mapper/
total 0
drwxr-xr-x 2 root root 100 2007-04-10 13:53 .
drwxr-xr-x 14 root root 14240 2007-04-10 13:54 ..
crw-rw---- 1 root root 10, 63 2007-04-10 09:52 control
brw-rw---- 1 root disk 254, 1 2007-04-10 13:53 cryptswap
brw-rw---- 1 root disk 254, 0 2007-04-10 13:52 sda10
root@localhost:~# cryptsetup luksOpen /dev/sda8 crypt8
Enter LUKS passphrase:
Unable to make device node for 'temporary-
Failed to read from key storage
Command failed.
root@localhost:~# ls -la /dev/mapper/
total 0
drwxr-xr-x 2 root root 120 2007-04-10 14:00 .
drwxr-xr-x 14 root root 14240 2007-04-10 14:00 ..
crw-rw---- 1 root root 10, 63 2007-04-10 09:52 control
brw-rw---- 1 root disk 254, 1 2007-04-10 13:53 cryptswap
brw-rw---- 1 root disk 254, 0 2007-04-10 13:52 sda10
brw-rw---- 1 root disk 254, 2 2007-04-10 14:00 temporary-
gives this kern.log:
Apr 10 14:00:16 localhost kernel: [ 465.380000] device-mapper: ioctl: unable to remove open device temporary-
I'm using ii cryptsetup 1.0.4+svn26-
golfbuf :~$ cryptsetup --version
cryptsetup-luks 1.0.5
Some additional puzzling information. I have an exact copy of feisty on sda13, which I used to copy to sda10. The only difference is that sda13 is unencrypted, while sda10 is encrypted. So, I have just tried the same commands in sda13 that failed inside the encrypted partition.
The results are completely different. On sda13, cryptsetup luksOpen works as it should.
golfbuf :~$ ls -la /dev/mapper/ cryptswap partition 1951856 0 -1
total 0
drwxr-xr-x 2 root root 100 2007-04-10 17:59 .
drwxr-xr-x 14 root root 14280 2007-04-10 18:00 ..
crw-rw---- 1 root root 10, 63 2007-04-10 13:51 control
brw-rw---- 1 root disk 254, 1 2007-04-10 17:59 cryptswap
brw-rw---- 1 root disk 254, 0 2007-04-10 17:56 sda10
golfbuf :~$ cat /proc/swaps
Filename Type Size Used Priority
/dev/mapper/
golfbuf :~$ sudo cryptsetup luksOpen /dev/sda8 crypt8
Enter LUKS passphrase:
key slot 0 unlocked.
Command successful.
golfbuf :~$ ls -la /dev/mapper/
total 0
drwxr-xr-x 2 root root 120 2007-04-10 18:02 .
drwxr-xr-x 14 root root 14280 2007-04-10 18:02 ..
crw-rw---- 1 root root 10, 63 2007-04-10 13:51 control
brw-rw---- 1 root disk 254, 2 2007-04-10 18:02 crypt8
brw-rw---- 1 root disk 254, 1 2007-04-10 17:59 cryptswap
brw-rw---- 1 root disk 254, 0 2007-04-10 17:56 sda10
So, I think the bug indicated that cryptsetup behaves differencly from within an encrypted partition than it does when outside an encrypted partition.
Weird!