Encrypted filesystem image
Udo Meijer
udo.meijer at gmail.com
Fri Jul 13 23:32:00 UTC 2007
Op vrijdag 13-07-2007 om 11:18 uur [tijdzone -0400], schreef Bart
Silverstrim:
> Hello,
>
> I have an external USB hard disk on which I'd like to create an
> encrypted file that can be mounted so that if I want to back everything
> up, I can just copy the file to another system or drive.
>
> 1) Is there an easy tutorial/howto to do this?
You could try LUKS on dm-crypt with cryptsetup. There are several good
howtos (look at http://luks.endorphin.org/) but an easy way to encrypt
you whole drive with default encryption is:
sudo apt-get install cryptsetup
sudo modprobe dm_crypt
sudo modprobe sha256
sudo modprobe aes
(before you format you could now fill you device with garbage with dd)
WARNING: of course you will loose anything you have on the drive.
luksformat -t vfat /dev/sdxn (change to whatever filesystem and device
you like to use)
> I've googled for it and
> it looks like theres a few ways to do it now, but I don't know what is
> considered out of date or what other people have experienced with
> different methods to make this painless.
I use it on my 2GB USB flash drive, and can even mount it under MSWin
with FreeOTFE. It works painless for me. On connection Ubuntu recognizes
it as an encrypted disk, prompts me for a pw and mounts it. I have not
tried it on large disks.
> I'd like to do it in a way
> that either the whole drive partition is formatted as an encrypted
> system or there is a file that is mounted in loopback to appear as a
> separate filesystem and acts as a sparse file, growing on the drive as
> data is added until the "maximum file size" I specify is reached.
don't know about that, but there is a nice howto on how to encrypt and
manually grow a LUKS formatted loopback device here
http://gentoo-wiki.com/SECURITY_System_Encryption_DM-Crypt_with_LUKS/loopback_devices
--
Udo
More information about the ubuntu-users
mailing list