Thursday, 26 March 2009

Fedoa 10 linux adding encrypted partition with cryptsetup luks

Install related package
# yum -y install cryptsetup-luks

Here my disk is /dev/hdd1. Encypt partition with luksFormat option. Do not forget your passphrase
# cryptsetup --verbose --verify-passphrase luksFormat /dev/sdd1

Create mapping for enctypted partition under /dev/mapper. Enter your passphrase here.
# cryptsetup luksOpen /dev/sdd1 /dev/mapper anynameyougive(udisk2 for me)

Now you can find your mapping in under the mapper directory
# ls /dev/mapper

Format the disk.
# /sbin/mkfs.ext3 -j -m 1 /dev/mapper/udisk2

Mount the disk
# mount /dev/mapper/udisk2 /path/to/decide

Now you can use your encrypted partition.

No comments: