2

I was looking at this thread to remove the encryption from the usb stick, but it says that the key cannot be removed if its the last.

How to remove LUKS encryption?

I would simply want the usb stick to be a normal usb stick and not an encrypted one anymore.

Can a simple dd with null work?

I can create luksFormatted usb sticks, but how do I luksUnformat ?

infoclogged
  • 919
  • 2
  • 11
  • 24

3 Answers3

3

The only easy way to remove LUKS encryption is to back up the data on the storage device and reformat it to an unencrypted state.

dd if=/dev/null of=/dev/sdX bs=8M where X is the location of the USB device should work in your case.

If you prefer a GUI, then gnome-disk-uility (cmdline name = gnome-disks) has the tools you need.

Mio Rin
  • 2,940
  • 14
  • 17
  • sudo gnome-disks did the trick. I saw that one can also recreate a LUKS+Ext4 partition from gnome-disks.. dd was extremely slow ( dont know why ). – infoclogged Mar 30 '17 at 12:53
  • dd is slow because it's a steamroller that goes over the entire target device bit by bit, putting the bits from the source onto it. – Mio Rin Mar 30 '17 at 13:30
1

If you did

cryptsetup luksFormat /dev/sdX

you can (destructively) reverse this operation by:

wipefs -a /dev/sdX

After that you can format it as any other vanilla USB stick.

maxschlepzig
  • 56,316
  • 50
  • 205
  • 279
-1

You can non-destructively decrypt your device without formatting it, or overwriting your data. If you have an ext4 fs inside a LUKS encrypted partition, you can decrypt the partition so that the ext fs inside appears directly on the partition and can be mounted.

See my answer in How to remove LUKS encryption?. (I don't have the reputation to comment)

Chen She
  • 239
  • 2
  • 6