Cryptsetup

From Hackepedia
Revision as of 17:48, 5 February 2008 by Franks (talk | contribs) (New page: This was tried on Ubuntu 7.10 (Gutsy) * fdisk your partitions and remember them. I will use sdb2 in my example. * $ sudo apt-get install cryptsetup * $ sudo cryptset...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

This was tried on Ubuntu 7.10 (Gutsy)

I will use sdb2 in my example.

  • $ sudo apt-get install cryptsetup
  • $ sudo cryptsetup luksFormat /dev/sdb2 -c aes -s 256 -h sha256
WARNING!
========
This will overwrite data on /dev/sdb2 irrevocably.
Are you sure? (Type uppercase yes): YES
Enter LUKS passphrase: 

This is where you make up a password.

  • sudo cryptsetup luksOpen /dev/sdb2 backup

I called it backup, you can call it whatever you want. You can do

$ ls -la /dev/mapper

and you should be able to see it!

  • $ sudo mke2fs -j /dev/mapper/backup -L backup

You can label it whatever you want, most people use the same as that in /dev/mapper/ for simplicity. This also assumes you want an ext3 filesystem (the -j option). Make whatever filesystem you prefer. You can now mount /dev/mapper/backup manually, or add it to /etc/fstab and /etc/crypttab if it's a static partition.