11.2 external encrypted harddrive not correctly mounted

hello,

i have an external harddrive which i encrypted scince opensuse 10.2 with luks. Now i installed opensuse 11.2 its impossible to me to mount this drive correctly.

the harddrive was recocnized in my former opensuse 11.0 correctly as luks encrypted and during installation yast installed the kernel module and encrypted the harddrive so that i regulay could mount it on boot by giving the password for that harddrive.
Scince opensuse 11.2 however yast thinks this is an dmcrypted partitoon and tries to unlock the harddrive using dmcrypt which of course fails.

does somebody know how i can encrypt and mount the externeal drive automaticly?

i have made a backup of /etc before i made a new installation of opensuse 11.2. is the possible to use the old fstab entries for that after installing luks?

many thanks for the answers

l1zard

Look firs at the differences between the entry you have now and the old one. That may teach you a lot.

Trying to use it is always worthwhile. Umount the disk. Copy the old entry into your fstab and put a # before the existing entry. Mount. When OK you can of course remove the old entry completely.

hi,

thx so far. ok i have looked in the manual page and theere is a note about older encryption.

my old cryptotab has this to say

/dev/mapper/loop2 /media/TREKSTOR twofisch256

does this help. what kind of encryption is this?
what arguments should i use with --cipher.

I am not an encryption specialist, but Wikipedia tells me that Twofisk 256 is an encription method.

My aproach was rather dumb: look for the differences. So when it was twofisk256 in your old /etc/cryptotab, what is it in your new one and when different, what happens when you change it?

hi again,
i am confused. /etc/crytotab does not exist but there is a file /etc/crpyttab (without the o) and there are also two different manpages for crypttab and for cryptotab. man cryptotab tells me it is deprecated.

seems i am not the only one with this problem:

HELP to recover superblock from xfs/LUKS! ;( - openSUSE Forums

except i am using ext3.

hi again,
i am confused. /etc/crytotab does not exist but there is a file /etc/crpyttab (without the o) and there are also two different manpages for crypttab and for cryptotab. man cryptotab tells me it is deprecated.

seems i am not the only one with this problem:

HELP to recover superblock from xfs/LUKS! ;( - openSUSE Forums

except i am using ext3.

i allready tried to mv the whole /backup/etc/* nach /etc

that does not work either. i want my data back :frowning: :frowning:

i think i know what the problem is now?

at least it would fit all symptoms.

yast2 does not recognize the correct encryption method and than as i select encrypt device encrypts the device again.

now i have two questions:
how can i encrypt a encrypted encryption?
and how can i recognize the correct encryption method on the encryption in the encryption? as this seems to be the problem, because yast didnt recognize this the first time.

for information and in the hope somebody can help me, i post my /etc/cryptotab here


/dev/loop2  /dev/sdc1       /media/TREKSTOR      ext3       twofish256 defaults

and the output from cryptsetup luksDump


cryptsetp: command not found
LUKS header information for /dev/sdc1

Version:       	1
Cipher name:   	aes
Cipher mode:   	cbc-essiv:sha256
Hash spec:     	sha1
Payload offset:	1032
MK bits:       	128
MK digest:     	c4 75 b0 0c 7f fd 3f f2 2a c0 6b 4d fa 40 a1 27 1f c9 16 67 
MK salt:       	3c 3f b5 eb 33 32 65 8e 81 e7 6d 08 3f 97 a6 1c 
               	61 f9 50 8f 85 a0 59 6b 2a 95 69 a5 69 33 46 05 
MK iterations: 	10
UUID:          	f972175f-30b8-47ea-9fa0-ccc2ce9dd3f6

Key Slot 0: ENABLED
	Iterations:         	183527
	Salt:               	07 ab 2c 49 67 90 b5 24 2a 76 d4 bd 3e 49 11 0a 
	                      	c0 15 d0 b3 09 ce a9 46 53 22 00 50 48 0c 64 c2 
	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

i hope that somebody can help me accessing my data again :slight_smile:

Have you tried:
First plug your external hard drive and check “dmesg” to know the name of your device. I suppose it is /dev/sdc1

cryptsetup luksOpen /dev/sdc1 mydisk

Enter LUKS passphrase for /dev/sdc1:
key slot 0 unlocked.
Command successful.

mount /dev/mapper/mydisk /mnt