Just another encryption problem
Hello linux community.
My problem isn't notching challenging I believe but after four days of searching and trying how to recover data I'm in the same place. From the beginning. In my first ssd drive I have W7, on another hdd 1TB data (ntfs) and on 160Gb connected with USB is (was?) MINT 17 encrypted with LUKS. Unfortunately I can't remember that I encrypted whole partition or only /home catalog. Four days ago I was trying to install crunchbang on USB pendrive and when installator ask to save partitions setup I chose default with was pendrive. After that on new system grub there was only crunchbang and W7 OS to chose without MINT because hdd with MINT was disconnected during debian installation. So, assuming. All I need is recover/repair mint system or at least /home catalog. Maybe it's possible to fix GRUB/GPT?? I was trying with http://alvinabad.wordpress.com/2012/...ncrypted-disk/ but I stuck on Quote:
Code:
lvdisplay, vgchange, Code:
fdisk -l Thx. |
You are following that excellent HowTo a little to literally. From what you describe and the fdisk output, Mint is probably installed on a single partition, sdc1. That's the only partition listed on the 160GB drive. To test if this is a LUKS encrypted partition you should run as root:
# cryptsetup -v luksDump /dev/sdc1 Try it and see what output you get. |
Thx for reply.
I forget to paste before what I got from # cryptsetup -v luksDump /dev/sdc3 With /dev/sdc1 and sdc2 i get "its not a proper LUKS device" (it should be sounds smth like that in a translation from my language) Code:
LUKS header information for /dev/sdc3 |
That's great. You've identified the encrypted partition as sdc3. Apparently, fdisk couldn't make sense out of your GPT partition structure on the 160GB sdc drive.
From here you should run the following: # cryptsetup luksOpen /dev/sc3 enc-disk You will be prompted to enter your LUKS password. Do so when prompted and you should get output something like this indicating you were successful: key slot 0 unlocked. Command successful. That unlocks the partition; now you have to mount it. Create a mount point directory in /media called "enc-disk" # mkdir /media/enc-disk And finally, mount the encrypted partition on /media/enc-disk: # mount /dev/mapper/enc-disk /media/enc-disk That's it. If everything went OK, if you navigate to /media/enc-disk you should see the contents of your encrypted sdc3 partition. When your done, unmount the encrypted partition and close it with: # umount /media/enc-disk # cryptsetup luksClose enc-disk |
After
Code:
# cryptsetup luksOpen /dev/sdc3 enc-disk Code:
key slot 0 unlocked. Command successful Code:
# mount /dev/mapper/enc-disk /media/enc-disk Code:
mount: special device /dev/mapper/enc-disk does not exist P.S. Why I can't get access to hdd through file manager after entering password in terminal?? |
What files are in /dev/mapper?
You can check unlocking the partition with luksOpen again: # cryptsetup luksOpen /dev/sdc3 Enter the password when prompted. After getting a successful response, run: # ls /dev/mapper Also, just to make sure you have the right modules loaded, post the output of: # lsmod | grep dm-crypt The dm-crypt module must be loaded for this to work. sdc3 is probably being mapped to some other device file in /dev/mapper than "enc-disk". The original setup may have mapped it to /dev/mapper/home or something like that. Since you successfully unlocked the partition, it must be mapped somewhere in /dev/mapper. Once you know where, you can mount the partition through that device file in /dev/mapper. |
So lets move on.
First I type # sudo cryptsetup luksOpen /dev/sdc3 sdc3_crypt and then I've to enter password. Pass is correct and then # ls /dev/mapper witch shows me two files: control sdc3_crypt. And then I type # lsmod | grep dm-crypt, nothing happens (or probably everything is correct and something happens in background), so I type # mount /dev/mapper/sdc3_crypt /media/enc-disk and i get an information # mount: unknown filesystem type 'LVM2_member. How can I check that dm-crypt module is loaded? |
The encryption module is loaded or you wouldn't get as far as you did. It's probably called "dm_crypt" instead of "dm-crypt". There are slight variations in the module naming conventions with different kernels and distros. To check:
# lsmod | grep crypt which will list all loaded modules with "crypt" in their name. The mount error reveals that you do not have a standard encrypted single partition but setup LVM which I normally wouldn't use for a home desktop. I'll have to research how to get at an encrypted LVM volume but I'm sure it's doable. Edit: I'm following this guide and trying to adapt it to your situation: http://blog.nowherelan.com/2011/04/1...lvm-partition/ First thing, you have to make sure the LVM package "lvm2" is installed. Install it with: # apt-get install lvm2 If it's already installed, no harm done. Next, you run: # vgscan Post the output you get when you run this command. What you do next will depend on that output. |
After # vgscan terminal shows
Code:
Reading all physical volumes. This may take a while... crunchbang@crunchbang:~$ ls /mnt/mint/home/piekar Access-Your-Private-Data.desktop README.txt |
All times are GMT -5. The time now is 08:26 AM. |