Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

In previous versions of Ubuntu I was able to encrypt USB flashdrives using the disks tool in any format I pleased. Now unfortunately I am only able to encrypt a flash drive in EXT format. This is bothersome as when the flashdrive is taken to another machine it will not allow the user accessing it to have ownership of the files. How would I encrypt a flashdrive using LUKS + FAT?

share|improve this question

First find your USB flash drive's device block - plug in the drive and run dmesg | tail. The device name should be of form sdX.

cryptsetup lukscreate /dev/sdX - this will prompt for a passphrase, create one. cryptsetup luksOpen crsdX /dev/sdx - this will prompt for the passphrase again. mkfs.vfat /dev/mapper/crsdX - create the file system

Now you can mount the drive and access the files as expected.

When you are done, run cryptsetup luksClose /dev/mapper/crsdX. You might be able to mount the drive in your file manager at this point.

share|improve this answer
This creates Partition ID 0Bh (FAT32 with CHS addressing), but normally you need 0Ch (FAT32 with LBA). – sumid Sep 23 '15 at 15:43

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.