Hi!
It seems like i’m in a bit of a trouble here, maybe somebody can help me…
Running an openSUSE 12.3 x86_64 (Linux 3.7.10-1.28-desktop) with KDE 4.10.5 rel. 1,
i usually use the Partitioner in Yast2 to encrypt partitions (from what i now read that wasn’t
a smart move at all…).
So yesterday i wanted to encrypt a partition (ext4), it’s the only partition on a 1TB disk,
after unmounting the partition i started the partitioner, set the password for the partition
and clicked on ‘Finish’. It came up with an error message and an error code (which i can’t
remember, it was something like -3044) and i could either continue anyway or abort the
process, so i aborted it. But now i can’t mount the partition anymore, the Yast2 Partioner
throws out error -3003 (unknown filesystem type ‘(null)’). So i tried fdisk -l /dev/sdc :
Disk /dev/sdc: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders, total 1953525168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0x000a19ef
Device Boot Start End Blocks Id System
/dev/sdc1 2048 1953523711 976760832 0 Empty
I don’t understand the ‘Empty’ tag but at least it looks like the partition is still ‘there’.
cryptsetup -v luksDump /dev/sdc1 gave me this:
LUKS header information for /dev/sdc1
Version: 1
Cipher name: aes
Cipher mode: cbc-essiv:sha256
Hash spec: sha1
Payload offset: 4096
MK bits: 256
MK digest: b7 37 27 3a 03 ec bc a5 62 74 37 88 81 53 78 cd ca 6c 09 44
MK salt: d3 5f 80 a3 ff f7 ad 94 34 97 1e 94 52 e8 a3 c6
5c 8c 61 31 39 92 2f 73 04 8f ed 01 ab ec 60 25
MK iterations: 74250
UUID: bc1d3182-e655-4c6b-92dc-b9f1b3a74f21
Key Slot 0: ENABLED
Iterations: 297176
Salt: f2 7b 56 f4 8b 5a 69 f8 34 69 37 d0 6b 6b 20 af
0b 9a 9b f9 bf c4 68 3e 9f ed 0a 6a 80 7e 98 af
Key material offset: 8
AF stripes: 4000
Key Slot 1: DISABLED
Key Slot 2: DISABLED
Key Slot 3: DISABLED
Key Slot 4: DISABLED
Key Slot 5: DISABLED
Key Slot 6: DISABLED
Key Slot 7: DISABLED
Command successful.
This also doesn’t look bad, i tried providing the key for the encrypted
partition, cryptsetup -v luksOpen /dev/sdc1 sdc1_crypt
Enter passphrase for /dev/sdc1:
Key slot 0 unlocked.
Cannot use device /dev/sdc1 which is in use (already mapped or mounted).
Command failed with code 16: Cannot use device /dev/sdc1 which is in use (already mapped or mounted).
And here’s where the trouble starts. I’m puzzled, it looks like the partition is fine and
i could decrypt the data on it but i can’t mount it. I carefully poked around a bit to
gather more information. The partition was always mounted as ‘sdc1’ (which isn’t accessible of course) and i
found the disk itself here ‘/dev/mapper/cr_ata-ST1000DM003-9YN162_S1D65LRJ-part1’.
tune2fs -l cr_ata-ST1000DM003-9YN162_S1D65LRJ-part1 gave me this:
tune2fs 1.42.6 (21-Sep-2012)
tune2fs: Bad magic number in super-block while trying to open cr_ata-ST1000DM003-9YN162_S1D65LRJ-part1
Couldn't find valid filesystem superblock.
stat cr_ata-ST1000DM003-9YN162_S1D65LRJ-part1 showed:
File: ‘cr_ata-ST1000DM003-9YN162_S1D65LRJ-part1’ -> ‘../dm-1’
Size: 7 Blocks: 0 IO Block: 4096 symbolic link
Device: 5h/5d Inode: 8606 Links: 1
Access: (0777/lrwxrwxrwx) Uid: ( 0/ root) Gid: ( 0/ root)
Access: 2014-03-01 01:39:02.634367804 +0000
Modify: 2014-03-01 01:39:02.633367804 +0000
Change: 2014-03-01 01:39:02.633367804 +0000
Birth: -
And fsck.ext4 -v /dev/sdc came up with:
e2fsck 1.42.6 (21-Sep-2012)
/dev/sdc is in use.
e2fsck: Cannot continue, aborting.
The same goes for ‘sdc1’. But they’re not mounted:
linux-twx7:~ # umount /dev/sdc
umount: /dev/sdc: not mounted
linux-twx7:~ # umount /dev/sdc1
umount: /dev/sdc1: not mounted
And finally this:
linux-twx7:~ # parted /dev/sdc p
Model: ATA ST1000DM003-9YN1 (scsi)
Disk /dev/sdc: 1000GB
Sector size (logical/physical): 512B/4096B
Partition Table: msdos
Number Start End Size Type File system Flags
I’m lost, searching for hours for a solution now but i don’t know how/if the
encryption is doing something weird or something i simply don’t know of,
can somebody help me please?
Frank