Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

[SOLVED]Trouble Mounting a LUKS Hard Drive

If none of the specific sub-forums seem right for your thread, ask here.
Post Reply
Message
Author
Under-Dev
Posts: 3
Joined: 2018-09-10 03:16

[SOLVED]Trouble Mounting a LUKS Hard Drive

#1 Post by Under-Dev »

Hi, I've been having a lot of trouble trying to mount a LUKS encrypted hard drive to recover the data on it. I've followed the directions found here (https://ubuntuforums.org/showthread.php ... ost5924459), but what I get in the end when I try to mount the logical volume is "mount: unknown filesystem type 'crypto_LUKS'." Below are the steps I've taken to mount the LV, along with the relevant output.

Code: Select all

sudo modprobe dm-crypt

sudo cryptsetup open /dev/sdb5 crypt

sudo modprobe dm-mod

sudo vgscan
>>  Reading all physical volumes.  This may take a while...
>>  Found volume group "Cringe-vg" using metadata type lvm2
>>  Found volume group "Cringe4-vg" using metadata type lvm2

sudo vgchange -a y Cringe-vg
>>  1 logical volume(s) in volume group "Cringe-vg" now active

sudo lvscan
>>  ACTIVE            '/dev/Cringe-vg/Backup' [566.13 GiB] inherit
>>  ACTIVE            '/dev/Cringe4-vg/root' [9.31 GiB] inherit
>>  ACTIVE            '/dev/Cringe4-vg/swap_1' [4.12 GiB] inherit
>>  ACTIVE            '/dev/Cringe4-vg/home' [98.12 GiB] inherit

sudo mount /dev/Cringe-vg/Backup /media/temp
>>  mount: unknown filesystem type 'crypto_LUKS'
Any help would be greatly appreciated.
Last edited by Under-Dev on 2018-09-12 09:40, edited 1 time in total.

p.H
Global Moderator
Global Moderator
Posts: 3049
Joined: 2017-09-17 07:12
Has thanked: 5 times
Been thanked: 132 times

Re: Trouble Mounting a LUKS Hard Drive

#2 Post by p.H »

It seems that the logical volume is used as a LUKS container too. You have to open it with cryptsetup.

Confirm with

Code: Select all

lsblk
blkid

Under-Dev
Posts: 3
Joined: 2018-09-10 03:16

Re: Trouble Mounting a LUKS Hard Drive

#3 Post by Under-Dev »

p.H wrote:It seems that the logical volume is used as a LUKS container too. You have to open it with cryptsetup.

Confirm with

Code: Select all

lsblk
blkid
Great! I've opened Cringe-vg/Backup. Now with blkid I get:

Code: Select all

sdb                        8:16   0 596.2G  0 disk  
├─sdb1                     8:17   0   243M  0 part  
├─sdb2                     8:18   0     1K  0 part  
└─sdb5                     8:21   0   596G  0 part  
  └─crypt                254:4    0   596G  0 crypt 
    └─Cringe--vg-Backup  254:5    0 566.1G  1 lvm   
      └─backup           254:6    0 566.1G  1 crypt
My only question is how to mount "backup".

This is what I've tried so far.

Code: Select all

sudo mount /dev/Cringe-vg/Backup /media/temp
>>  mount: unknown filesystem type 'crypto_LUKS'

sudo mount /dev/mapper/backup /media/temp
>>  mount: wrong fs type, bad option, bad superblock on /dev/mapper/backup,
>>         missing codepage or helper program, or other error
>>  
>>         In some cases useful info is found in syslog - try
>>         dmesg | tail or so.
Running dmesg I get:

Code: Select all

EXT4-fs (dm-6): bad geometry: block count 156218880 exceeds size of device (148407808 blocks)
(By the way, I really appreciate your help.)

Under-Dev
Posts: 3
Joined: 2018-09-10 03:16

Re: Trouble Mounting a LUKS Hard Drive

#4 Post by Under-Dev »

Never mind about the error. I realized it was because I had resized the logical volume previously. I was able to size the volume to the correct size again using

Code: Select all

sudo lvresize -l+100%FREE /dev/Cringe-vg/Backup
sudo cryptsetup resize backup
Thank you very much for the help!

Post Reply