How to decrypt disk on Linux?

installation

#1

Bonjour,

I have chosen to encrypt the Hard Disk during installation. In order to increase partition, I need to decrypt the Hard Disk. So, my question is how to decrypt disk on Linux?
Do you have any idea?

Regards,

Le loup

Top


#2

From what I have just read elsewhere, it is not possible to unencrypt the drive without destroying the data on it. If that is correct, then you need to log in as usual, copy all of your personal data onto an external media. Then, shut down and reboot with a live USB. Once at the live desktop, open Gparted and completely delete all the encrypted partitions on the drive. Then reboot and reinstall your OS.

I may be wrong about this and there may be another way to unencrypt the drive without also losing the data. So, you should wait to see if anyone else has a solution


#3

Thank you for your message.
I ask myself the question differently. Can't we increase the size of the encrypted partition?


#4

Hi, it can be done depending on how the encryption is set up (idk exactly how Ubuntu handles it), but usually it is not worth the trouble unless you can't reinstall or are trying to test how to do it, especially because you also need a backup of the data before attempting this too. Here is an example using LVM in a LUKS encrypted device https://wiki.archlinux.org/index.php/Resizing_LVM-on-LUKS (as you can see it is a lengthy process even though the LVM steps might not apply to your setup)
You can check if the partition is encrypted with LUKS with the following command:
sudo cryptsetup isLuks /dev/sdaX ; echo $?
replacing a with the disk letter and X with the partition number. 0 would be yes 1 would be no.


#5

Bonjour Asta1986,
Thank you for your message and your help.
sudo cryptsetup isLuks /dev/sdaX ; echo $? delivered '$' So, I don't have any more information. Something is missing.
https://wiki.archlinux.org/index.php/Resizing_LVM-on-LUKS is an interesting site.
https://help.ubuntu.com/community/ResizeEncryptedPartitions is good as well.
These two articles gave to me some helps.
Regards,
Leloup


#6

You haven't mentioned whether it's the LUKS Encrypted LVM installation or not.
If you have LVM and you learn some LVM commands you probably won't need to resize your partition. Just allocate another partition in the same disk or even in another drive as an LVM physical volume. Then extend your volume group to include the new physical volume and extend your logical volume into it.

I'm a bit rusty on LVM right now to be honest, it's been a while since I last experimented with it, but it's well worth learning. But you're better of practicing with tutorials first on empty partitions in USB drives or something like that before you try doing anything with an installed operating system with data in it. (Back up your data first when you do too). But LVM is great and the reason why it's used is to make things easier for us.

I once had Ubuntu installed in one USB flash memory stick and extended it over three more sticks on a hub, and that was able to be down within the operating system while it was booted and running. Resizing smaller requires and auxilliary operating system though, or a Live CD or Live USB.
I do still have plenty of old notes, but I would need to run through some LVM commands again and practice again myself and refresh my memory to be able to give anybody any exact instructions.