LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop
User Name
Password
Linux - Desktop This forum is for the discussion of all Linux Software used in a desktop context.

Notices


Reply
  Search this Thread
Old 05-13-2016, 03:38 AM   #1
radarvideolocust
LQ Newbie
 
Registered: May 2016
Posts: 2

Rep: Reputation: Disabled
Can't mount encrypted Mint HDD on Raspberry Pi 3 as external drive


Hi, folks! I had a laptop running Linux Mint with an encrypted hard drive. The laptop had a hardware failure and will not boot, but the disk should be 100% fine. I currently have it in a caddy that converts it into an external drive via USB, and I'm trying to view its contents on my Raspberry Pi 3 running Raspbian.

When I plug the drive into my Pi, I get the usual GUI window prompting me for a password, and upon entering the password and clicking "connect", I get an error window stating "Error unlocking /dev/sda5: Command-line `cryptsetup luksOpen "/dev/sda5" "luks-f1cb848f-5d8e-4c40-9865-ba43ee8cd878"' exited with non-zero exist status 1:"

When I run "sudo cryptsetup luksOpen /dev/sda5 test_name", I get a new file /dev/dm-0, which seems like a step in the right direction, but then "udisksctl mount -b /dev/sda5" gives me the error "Object /org/freedesktop/UDisks2/block_devices/sda5 is not a mountable filesystem."

It seems to me that, if I had a working machine that would fit a 2.5" hard drive in it, I could swap it out and boot it just like on my old laptop, but I'd like to be able to access these files without buying a new machine.

Thus far, the only contents it shows me for the disk seem to be boot-related stuff, as if I had opened a liveUSB device, but I can't see the contents that I'd be able to get to had I booted from it. I need to get access to the user-level files, so any help would be appreciated.

Code:
pi@raspberrypi://media/pi/c0f936b6-40a0-4294-b103-e3fbce9aac80 $ ls
abi-3.13.0-37-generic         lost+found
abi-3.19.0-32-generic         memtest86+.bin
abi-4.2.0-25-generic          memtest86+.elf
config-3.13.0-37-generic      memtest86+_multiboot.bin
config-3.19.0-32-generic      System.map-3.13.0-37-generic
config-4.2.0-25-generic       System.map-3.19.0-32-generic
grub                          System.map-4.2.0-25-generic
initrd.img-3.13.0-37-generic  vmlinuz-3.13.0-37-generic
initrd.img-3.19.0-32-generic  vmlinuz-3.19.0-32-generic
initrd.img-4.2.0-25-generic   vmlinuz-4.2.0-25-generic
Code:
pi@raspberrypi:~ $ sudo lvdisplay
  --- Logical volume ---
  LV Path                /dev/mint-vg/root
  LV Name                root
  VG Name                mint-vg
  LV UUID                zeTEgH-oz7f-7zGC-mr9f-MV8M-mKyv-1Hfqfg
  LV Write Access        read/write
  LV Creation host, time mint, 2015-01-11 03:42:02 +0500
  LV Status              NOT available
  LV Size                294.09 GiB
  Current LE             75288
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
   
  --- Logical volume ---
  LV Path                /dev/mint-vg/swap_1
  LV Name                swap_1
  VG Name                mint-vg
  LV UUID                d78cto-VHjD-jqFb-PKNH-hl56-bz5h-PYqQT0
  LV Write Access        read/write
  LV Creation host, time mint, 2015-01-11 03:42:02 +0500
  LV Status              NOT available
  LV Size                3.74 GiB
  Current LE             957
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
 
Old 05-13-2016, 03:10 PM   #2
mostlyharmless
Senior Member
 
Registered: Jan 2008
Distribution: Arch/Manjaro, might try Slackware again
Posts: 1,851
Blog Entries: 14

Rep: Reputation: 284Reputation: 284Reputation: 284
It seems to me that after you open your encrypted partition with cryptsetup, you need to open the lvm container. You'll need to do vgscan --mknodes and vgchange -ay, then check in /dev/mapper for the presumably new entries you can mount with mount.
 
1 members found this post helpful.
Old 05-13-2016, 06:09 PM   #3
radarvideolocust
LQ Newbie
 
Registered: May 2016
Posts: 2

Original Poster
Rep: Reputation: Disabled
Wow, this had been a thorn in my side for a long time, and I'd spent hours Googling around trying to fix it, so thanks a heap for the solution!

Further info for anyone else with the same issue: Using "vgscan --mknodes" gave me the name of the volume group (mint-vg), which contains two volumes (root and swap-1), and then I mounted it with
Code:
mount /dev/mint-vg/root /mnt
And the resulting files are in /mnt/
 
  


Reply



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
manually mount luks encrypted hard drive not in fstab? (mint 17.1) rustylongsword Linux - Newbie 1 12-15-2014 10:03 AM
[SOLVED] external encrypted drives do not mount reliably on boot BCarey Slackware 3 10-13-2014 11:23 AM
Copying Files From My Laptop To My External HDD That Is Connected To Raspberry PI Bryzey Linux - Newbie 5 08-29-2013 11:27 AM
Cannot get Iomega external hard drive to mount with Raspberry Pi, running Debian. Dougski Linux - Newbie 47 01-05-2013 07:58 AM
Mayday! How do I manually mount my encrypted ext3 external usb disk? simonsharry Linux - Newbie 11 02-15-2009 04:49 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop

All times are GMT -5. The time now is 09:48 AM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration