Menu
User

DropVPS Team

Writer: Cooper Reagan

How to disable LUKS encryption in Ubuntu 24.10?

How to disable LUKS encryption in Ubuntu 24.10?

Publication Date

05/14/2025

Category

Articles

Reading Time

2 Min

Table of Contents

Disabling LUKS (Linux Unified Key Setup) encryption on Ubuntu 24.10 requires decrypting the disk and transferring its data to an unencrypted partition. There’s no direct “turn off” switch for LUKS — you need to fully remove encryption by copying data to a non-encrypted setup.

Step 1: Boot into a Live USB session

Shut down your system and boot using an Ubuntu 24.10 Live USB. Once in the live session, open the terminal.

sudo apt update
sudo apt install lvm2 cryptsetup

This ensures LUKS and LVM tools are available.

Step 2: Unlock the LUKS volume

Run the following to find your encrypted partition:

sudo lsblk

Now unlock it:

sudo cryptsetup luksOpen /dev/sdXY decrypted_disk

Replace /dev/sdXY with your actual LUKS partition.

Step 3: Mount the decrypted volume

sudo mkdir /mnt/encrypted
sudo mount /dev/mapper/decrypted_disk /mnt/encrypted

If it uses LVM, activate the volume group first:

sudo vgscan
sudo vgchange -ay
sudo lvscan
sudo mount /dev/ubuntu-vg/root /mnt/encrypted

Adjust volume group names if different.

Step 4: Create a new unencrypted partition

Use GParted or fdisk to create a new partition on another disk or USB:

sudo fdisk /dev/sdZ

Format it:

sudo mkfs.ext4 /dev/sdZ1

Mount it:

sudo mkdir /mnt/plain
sudo mount /dev/sdZ1 /mnt/plain

Step 5: Copy all data

Use rsync to transfer everything:

sudo rsync -aAXv /mnt/encrypted/ /mnt/plain/

Double-check /mnt/plain to make sure your data is intact.

Step 6: Reinstall GRUB on the new unencrypted disk

Mount necessary directories:

sudo mount --bind /dev /mnt/plain/dev
sudo mount --bind /proc /mnt/plain/proc
sudo mount --bind /sys /mnt/plain/sys

Chroot into it:

sudo chroot /mnt/plain

Install GRUB:

grub-install /dev/sdZ
update-grub

Exit and unmount:

exit
sudo umount /mnt/plain/dev
sudo umount /mnt/plain/proc
sudo umount /mnt/plain/sys

Step 7: Test the new unencrypted system

Shut down the system:

sudo poweroff

Remove the Live USB, boot from the new disk, and verify everything works. If successful, you’ve now disabled LUKS by migrating to an unencrypted system.

Linux VPS
U
Loading...

Related Posts