Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

Using the disk utilities in ubuntu 11.04, i had encrypted a partition with a passphrase. Each time i used to click on the partition to mount, it used to ask me the passphrase and get mounted. All was fine, until i installed the 12.04. After the installation, this encrypted partition, disappeared from the menu.

fdisk -l /dev/sda

Shows the encrypted partition in the list

/dev/sda7       298953648   488392064    94719208+   7  HPFS/NTFS/exFAT

I tried the following commands to mount it. But they all gave following errors

$ sudo cryptsetup luksDump /dev/sda7

Device /dev/sda7 is not a valid LUKS device.


$ ecryptfs-unwrap-passphrase /dev/sda7
Passphrase:     # i entered the correct passphrase here...

Error: Unwrapping passphrase failed [-5]
Info: Check the system log for more information from libecryptfs


$ grep ecryptfs /var/log/syslog

Oct 31 22:43:51 benny ecryptfs-unwrap-passphrase: Error attempting to open [/dev/sda7] for reading
Nov  1 01:28:02 benny ecryptfs-unwrap-passphrase: Error attempting to open [/dev/sda7] for reading
Nov  1 01:29:06 benny ecryptfs-unwrap-passphrase: Error attempting to open [/dev/sda7] for reading

I don't understand why I am getting the "Device /dev/sda7 is not a valid LUKS device." Could it be due to some corruption in partition table? Is there any way to recover this encrypted partition? Thanks indiajoe

share|improve this question

1 Answer 1

From your question it looks like you are using EncryptFS for something like an encrypted /Home partition and can not open it.

ecryptfs-unwrap-passphrase /dev/sda7 Passphrase: # i entered the correct passphrase here...

Because your partition is not using LUKS, it will not show as a LUKS partition for the use of luksDump. Instead, EncryptFS is a stacked filesystem that uses metadata headers much like LUKS does but with a major drawback, it only uses one password. Recovering that password may not be much hope as covered in their FAQ: http://ecryptfs.sourceforge.net/ecryptfs-faq.html#lostkey

I would keep trying your last couple of passwords and if you manage to open the partition, migrate the data to LUKS, a much more versatile encryption system.

share|improve this answer
    
Thanks for the reply. The passphrase i entered to encryptfs is correct. I haven't changed the passphrase. If it is not LUKS, how will i find which tool i should use to decrypt. (i used disk utilities in ubuntu 11.04 to encrypt). PS: Partition was not my /home directory. It was just a separate partition with data. –  indiajoe Nov 6 '12 at 11:50

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.