Table of Contents

Encrypted USB Disk on Ubuntu Linux and Windows

This sounds crazy, but: Howto encrypt a USB disk with Ext3 filesystem and use it in (Ubuntu) Linux and Windows.

There is nearly no way to destroy your data more safely than encrypting it and forgetting the password. None of the described tools provide any warranty. Use Windows at your own risk.

This HowTo is based on dm-crypt and especially on the tutorial at http://www.saout.de/tikiwiki/tiki-index.php?page=EncryptedDevice by William Owen Smith.

Howto Encrypt the Drive

sudo -s
modprobe dm_crypt
echo "dm_crypt" >> /etc/modules
sudo gparted
Do not encrypt the whole drive, just the partition! Otherwise your system won't be able to read the partition table…
/sbin/badblocks -c 10240 -s -w -t random -v <partition>
sudo cryptsetup luksFormat <partition>
sudo cryptsetup luksOpen <partition> <crypt_partition>
sudo mkfs.ext2 /dev/mapper/<crypt_partition>
sudo cryptsetup luksClose <crypt_partition>.

Howto Mount Ext3 and Ext2 Filesystems in Windows

Before we can mount our encrypted disk with Ext3 on Windows, we need to install an Ext2/3 driver. One good driver is Ext2IFS, which works on (nearly?) all Windows versions.

Ext2IFS

Among other, smaller limitations, the driver does not support permissions/access rights in any way. FAQ

Inodes that are larger than 128 bytes are not supported by the Windows ext2 driver.
However, Ubuntu 8.10 and later seems to create ext3 partitions with 256 byte inodes by default!

Explore2fs

I haven't tested this yet, but if you do not use Windows Vista, http://www.chrysocome.net/explore2fs might be an option too.

Howto Mount Encrypted File Systems in Windows

Note: The Portable Mode is also very handy for an external drive. This driver is able to do lots of other encryption stuff, but I was only interested in mounting LUKS filesystems.