Can't see files in encrypted drive when mounting it in EndevourOS

Using Linux Mint I encrypted a 500 GB Kingston SSD drive with LUKS. But I changed the operating system in my machine to EndevourOS.

I can mount my drive through the File Manager, since I have the password. But the only two things I can see inside are two folders: lost+found and .Trash-1000. I can’t see any other files even when it says I’m using 5% of the space available from the drive.

How come I only see those two folders now?

How can I see my other files?

Welcome to :enos: forums.

Because they are not encrypted.

Will be a challenge. Your files got encrypted under another distro there might be differences in how the encryption is done and LUKS volumes don’t work like normal volumes which are not encrypted. Your encrypted data needs to be decrypted in order for you to see it. You changed the distro without getting the volume decrypted. Until you get the volume decrypted you won’t see the files.

I’m not an expert on this and I never encrypt my personal drives due to these issues. For you to get this decrypted you going to need a bigger gun than me. @dalto, @ricklinux and @flyingcakes hope yous be able to help.

And I see you asked the same question in SO (https://stackoverflow.com/questions/70857857/cant-see-files-in-encrypted-drive-when-using-another-linux-os) not the best place to ask questions like this. Better have asked under SE (StacksExchange).

I kept going through your question and it seems you just clicked the drive icon in thunar to mount the drive. So it seems the drive gets mounted but not activated. Let’s try the below steps. Restart the system, don’t mount the drive, and try the below steps.

  • First, run lsblk --fs to find out your lucks volume labels or number.

  • Once you know which partition it is. We need to decrypt the drive. We are using cryptsetup which is a wrapper for DMCrypt.

    sudo cryptsetup luksOpen /dev/<your hard disk volumn ex: sda5> <a name to mount the drive ex: Mothership>
    
  • After running the above command system will ask for your password to decrypt.

  • Once you supply the correct password you can run the below command to confirm everything is ok.

    sudo lvscan
    

    The above command should give an output that looks like below.

    inactive          '/dev/Mothership-vg/root' [290.25 GiB] inherit
    inactive          '/dev/Mothership-vg/swap_1' [7.60 GiB] inherit
    

    Remember the drive names are just hypothetical
    We’re going to mount the root volume from the above list.

  • Before mounting we need to activate the drive. To activate it we’re going to use lvchange command.

    sudo lvchange -a y /dev/Mothership-vg/root
    

    Remember to change the path to match yours.

  • Rerun lvscan to check the status. You should see something similar to below.

    ACTIVE            '/dev/Mothership-vg/root' [290.25 GiB] inherit
    inactive          '/dev/Mothership-vg/swap_1' [7.60 GiB] inherit
    
  • Now you can mount the activated drive.

    mkdir myhdd
    sudo mount /dev/Mothership-vg/root myhdd
    ls myhdd
    
  • Once you finish working with the drive you can unmount it.

    sudo umount -l /dev/mapper/Mothership-vg/root && sync
    
1 Like

Welcome to the forum @cbarboza :enos_flag: :enos: :partying_face:

Everything fine until I stumble upon ‘sudo lvscan’, since I got no output. I think my drive is not recognized as a Logical Volume. Any suggestion on how make it work?