Cryptsetup: Difference between revisions
From Hackepedia
Jump to navigationJump to search
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... |
m adding title |
||
Line 1: | Line 1: | ||
== Encrypting a partition on Ubuntu 7.10 (Gutsy) using cryptsetup (LUKS) == | |||
* fdisk your [[partition]]s and remember them. | * fdisk your [[partition]]s and remember them. |
Revision as of 17:49, 5 February 2008
Encrypting a partition on Ubuntu 7.10 (Gutsy) using cryptsetup (LUKS)
- fdisk your partitions and remember them.
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.