0

My LUKS encrypted device works on one computer, the one where I created it on, Ubuntu 12.04. But when I attach it to another fairly fresh 12.04, syslog tells me "unknown partition".

Any ideas why this is so? Do I have to migrate some master-key or such from the machine where the device works on? My first idea was to install cryptsetup, which was missing before on machine two, but even after that - I am unable to mount.

Where it works:

$ sudo parted -l
Partitiontable: msdos

... (usual listing)

Modell: Generic- Multi-Card (scsi)
Drive  /dev/sdb:  31,4GB
Sectorsize (logic/physical): 512B/512B
Partitiontable: msdos

 1      4194kB  31,4GB  31,4GB  primary               LBA

Modell: Linux-Device-Mapper (crypt) (dm)
Drive  /dev/mapper/udisks-luks-uuid-...(some key):  31,4GB
Sectorsize(logic/physical): 512B/512B
Partitiontable: msdos

(no numbers or data here)

$ dmsetup ls --tree
udisks-luks-uuid-... (same key as above) (252:0)
 └─ (8:17)

Where it didn't work (question answered):

from syslog:
Jan 10 date name kernel: [   69.546400] sd 8:0:0:2: [sde] 61405184 512-byte logical blocks: (31.4 GB/29.2 GiB)
Jan 10 date name kernel: [   69.548646] sd 8:0:0:2: [sde] No Caching mode page present
Jan 10 date name kernel: [   69.548652] sd 8:0:0:2: [sde] Assuming drive cache: write through
Jan 10 date name kernel: [   69.552019] sd 8:0:0:2: [sde] No Caching mode page present
Jan 10 date name kernel: [   69.552024] sd 8:0:0:2: [sde] Assuming drive cache: write through
Jan 10 date name kernel: [   69.556692]  sde: unknown partition table

everything else, now as it works, I couldn't reproduce...
1
  • 1
    Please include the exact lines from syslog. It's rather vague, but indicates to me it has trouble reading the partition table. Please also include the partition table from the computer it does work on: sudo parted -l and the device mapper configuration: sudo dmsetup ls --tree (some errors will appear from these commands, but don't draw conclusions too soon)
    – gertvdijk
    Jan 20, 2013 at 15:02

1 Answer 1

1

Guess what, this time, when I attached the device to post the ouput of syslog here, it suddenly worked! Seems like not having cryptsetup installed was causing this, obviously. Then, aftert installing and even after I reboot, the cryptsetup magic recognition of encrypted devices hadn't propagated properly into the system inards, as it seems.

So for everyone else having this problem:

  1. Make sure you've got cryptsetup installed: sudo apt-get install cryptsetup (You might oversee this as you have it on the machine where you created the encrypted device, but it's not standard on any other setup)

    2 . Reboot your machine, and if it doesn't work, reboot once more. Strange as it sounds...

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .