Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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:
cryptsetup -v luksOpen /dev/sda5 sda5_crypt
I can't use commands like
Code:
lvdisplay, vgchange,
Some info
Code:
fdisk -l
Disk /dev/sda: 120.0 GB, 120034123776 bytes
255 heads, 63 sectors/track, 14593 cylinders, total 234441648 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x16b5d5a7
Device Boot Start End Blocks Id System
/dev/sda1 * 2048 206847 102400 7 HPFS/NTFS/exFAT
/dev/sda2 206848 234438655 117115904 7 HPFS/NTFS/exFAT
Disk /dev/sdb: 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 / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000d4981
Device Boot Start End Blocks Id System
/dev/sdb1 63 614405924 307202931 7 HPFS/NTFS/exFAT
/dev/sdb2 614405925 1281778154 333686115 7 HPFS/NTFS/exFAT
/dev/sdb3 1281778155 1953520064 335870955 7 HPFS/NTFS/exFAT
WARNING: GPT (GUID Partition Table) detected on '/dev/sdc'! The util fdisk doesn't support GPT. Use GNU Parted.
Disk /dev/sdc: 160.0 GB, 160041885696 bytes
255 heads, 63 sectors/track, 19457 cylinders, total 312581808 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000
Device Boot Start End Blocks Id System
/dev/sdc1 * 1 312581807 156290903+ ee GPT
Disk /dev/sdd: 16.0 GB, 16027484160 bytes
255 heads, 63 sectors/track, 1948 cylinders, total 31303680 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00054760
Device Boot Start End Blocks Id System
/dev/sdd1 2048 29927423 14962688 83 Linux
/dev/sdd2 29929470 31301631 686081 5 Extended
/dev/sdd5 29929472 31301631 686080 82 Linux swap / Solaris
Disk /dev/mapper/udisks-luks-uuid---------------------------------------------: 159.3 GB, 159271354368 bytes
255 heads, 63 sectors/track, 19363 cylinders, total 311076864 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000
Disk /dev/mapper/udisks-luks-uuid--------------------------------- doesn't contain a valid partition table
Maybe some advice or links please?? I appreciate any help.
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:
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)
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:
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.
Last edited by kilgoretrout; 08-13-2014 at 09:53 PM.
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:
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.