LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 10-30-2008, 08:36 PM   #1
klearview
Member
 
Registered: Aug 2006
Location: London
Distribution: Debian, Kubuntu
Posts: 572

Rep: Reputation: 75
Mounting LUKS encrypted drive from a failed pc: LVM2 error


Hello guys,

Here's a problem:

I have a hard drive from a failed laptop. This hard drive is fully encrypted (LUKS) (apart from /boot of course). Now I need to recover some data from it so I put it into a USB caddy. Former /boot (dev/sdb2) mounts automatically without any problem.

However when it comes to the main thing (/dev/sdb5) that's actually encrypted I run into LVM issue.

When I try to do this:

Code:
sudo cryptsetup luksOpen /dev/sdb5 /mnt
and successfully enter the passphrase, I get this error:

Quote:
Command failed: dm_task_set_name: Device /mnt not found
(GDecrypt reports this error like this: Detecting filesystem...done. Result: LVM2_member)

LVM indeed was used on the old system.

How do I work around it?

Thanks
 
Old 10-31-2008, 03:34 AM   #2
klearview
Member
 
Registered: Aug 2006
Location: London
Distribution: Debian, Kubuntu
Posts: 572

Original Poster
Rep: Reputation: 75
Never mind, I figured it out - thanks mainly to this post:

http://www.brandonhutchinson.com/Mou...VM_volume.html

Basically with the problem like mine the first thing needed is to install lvm2:

sudo apt-get install lvm2

Then I plug in USB drive and in desktop environment I'm prompted for a passphrase for the just attached encrypted volume. So I type in a passphrase. Nothing happens as this is LVM volume and it needs to be mounted differently.

So I do:

sudo pvs

Under VG column I find a name of the volume group I need.

Then:

sudo lvdisplay <volume_group_name>

Result gives me to volumes - one named 'swap' and the other - 'root'. Clearly it's the 'root' that I need to recover my data.

So the last thing I do:

sudo mount /dev/<volume_group_name>/<volume(in my case 'root')> /mnt

And there you go - I have my data back!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
LUKS + RAID + LVM2 and suspend to ram vehn Slackware 3 12-14-2011 07:54 AM
Removing a drive from LVM2 ... tomazN Linux - Software 5 10-14-2009 08:55 AM
LXer: Automatically Unlock LUKS Encrypted Drives With A Keyfile LXer Syndicated Linux News 0 07-09-2008 03:40 PM
mount luks encrypted partition with kdm mattydee Slackware 2 01-28-2008 12:32 AM
cryptsetup-luks error flying-tuxman Linux - Security 2 11-20-2006 11:08 AM


All times are GMT -5. The time now is 02:24 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration