0

I encrypted an external USB-HDD and it works like a charm, I can decrypt using the password when manually mounting or even automatically decrypt with using the proper settings to do so with using the enclosure I used to encrypt.

This can be perfectly done in the original USB-SATA enclosure I used to encrypt the HDD.

I have also reinstalled Ubuntu and even installed a newer Ubuntu version and the USB-HDD can be unlocked with ease when I use the original enclosure.

But, when I try to reproduce the decryption on a different enclosure (case), both with using the same OS I used to encrypt or a newer version of the Ubuntu OS, either gnome-disks and gparted detects the connected USB-HDD has an unrecognized partition and shows no data.

I don't know if the encryption is token based with using a hardware related key or something, but all I have tried so far (like: Decrypt LUKS partition without losing data) didn't work for me.

Update

The solutions provided in the comments works for unlocking the HDD when it is inside the original enclosure which was originally used to encrypt the data.

I succeeded mounting and unlocking the USB-HDD with using the recomendations from the comments below but only when using the original enclosure.

The problem remains when I try to move the HDD to a different USB-HDD case.

This is what I get in the terminal

geppettvs@AORUS:~$ udisksctl unlock -b /dev/sdb
Object /org/freedesktop/UDisks2/block_devices/sdb is not an encrypted device.
geppettvs@AORUS:~$ 

And this is how I see the HDD in gnome-disks

enter image description here

I am not sure if the case I used to encrypt the disk is part of the items used for encryption and it has a dependence, since I can only use the original USB-HDD case to unlock it.

  • Yes you can. My guess is that your second computer might be missing the package necessary to do the decryption. I'm afraid I don't know the package off the top of my head. Perhaps someone else can help you with that. Alternatively, if you have a blank USB, I suggest you encrypt with the second computer. I guess doing so will prompt you to install the necessary package. – Ray Mar 24 '24 at 15:06
  • @user68186, thanks for your ideas. I have updated my answer to show the cryptsetup tool was already installed when I tried to read the encrypted USB-HDD. – Geppettvs D'Constanzo Mar 25 '24 at 15:38
  • @Ray, thanks for your comment. It seems I already have the needed package, but I can't yet read the encrypted USB-HDD, thanks for your help. – Geppettvs D'Constanzo Mar 25 '24 at 15:39
  • @user68186, thanks. Once I did what you say with a longer portion of code and I was said not to do so. Anyway, do you have another idea? Thanks in advance. – Geppettvs D'Constanzo Mar 25 '24 at 15:41
  • See Mount encrypted volumes from command line? and try to decrypt and mount the partition from the terminal. Add the output of the command that fails in the question. – user68186 Mar 25 '24 at 15:43
  • @user68186 please see my latest edit. Using the commands you provided in the link didn't work for me when moving the disk into another USB case. Any help is appreciated and if you think I need to open a new question, please let me know. Thanks in advance. – Geppettvs D'Constanzo Mar 26 '24 at 18:56
  • 1
    OP indicated an answer to this question solved the problem. Duplicate of: Mount encrypted volumes from command line? – user68186 Mar 26 '24 at 20:54
  • I have reworded my question in order to explain the actual problem. If you don't have a solution or don't want to follow this question please don't. Thanks for all your help. – Geppettvs D'Constanzo Mar 27 '24 at 17:45
  • For future users who may wish to provide any solution: I don't want to mount if only with the command line. A GUI is preferred. Thanks – Geppettvs D'Constanzo Mar 27 '24 at 17:47

0 Answers0