no way to compare when less than two revisions
Differences
This shows you the differences between two versions of the page.
Last revision | |||
— | cryptsetup [2013/08/22 18:03] – created - external edit 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== crypsetup ====== | ||
+ | * [[Filesystems]] | ||
+ | * [[Gentoo]] | ||
+ | * [[mdadm]] | ||
+ | |||
+ | * [[http:// | ||
+ | |||
+ | ==== Create New Encrypted Device ==== | ||
+ | |||
+ | In this example, a hard drive device ''/ | ||
+ | |||
+ | Create an encrypted swap partition on ''/ | ||
+ | |||
+ | < | ||
+ | cryptsetup -c blowfish -h sha256 -d /dev/random create swap /dev/sda2 | ||
+ | </ | ||
+ | |||
+ | This will create the encrypted device ''/ | ||
+ | |||
+ | < | ||
+ | mkswap / | ||
+ | </ | ||
+ | |||
+ | Now, create the new encrypted device. | ||
+ | |||
+ | < | ||
+ | cryptsetup --verify-passphrase luksFormat /dev/sda3 | ||
+ | </ | ||
+ | |||
+ | Unlock the encrypted device and name it '' | ||
+ | |||
+ | < | ||
+ | cryptsetup luksOpen /dev/sda3 luks0 | ||
+ | </ | ||
+ | |||
+ | Format the new device with a filesystem: | ||
+ | |||
+ | < | ||
+ | mkfs.ext4 / | ||
+ | </ | ||
+ | |||
+ | ==== Mount an Encrypted Device ==== | ||
+ | |||
+ | Access the encrypted device and give it a name, in this case '' | ||
+ | |||
+ | < | ||
+ | cryptsetup luksOpen /dev/sda3 luks0 | ||
+ | </ | ||
+ | |||
+ | This will create a device ''/ | ||
+ | |||
+ | < | ||
+ | mount / | ||
+ | </ |