Search This Blog

Sunday, July 31, 2011

Create and configure LUKS-encrypted partitions and logical volumes to prompt for password and mount a decrypted file system at boot

Suppose a partition named /dev/sdb1 is available
Now we have to format it with luks
#cryptsetup luksFormat /dev/sdb1

Now partition needs to be labeled
#cryptsetup luksOpen /dev/sdb1 newname

Now format that partition with ext4 or ext3
#mkfs.ext4 /dev/mapper/newname

Now in /etc/crypttab enter
newname /dev/sdb1

Finally in fstab enter
/dev/mapper/newname /mountpoint ext4 defaults 1 2

or if permanent changes are not required then
#mount /dev/mapper/newname /mountpoint
#umount /mountpoint


Anonymous said...

Nice tutorial. I made one and used a similar method. Please check out my guide and let me know what you think.

waqas muneer said...

good one

Amazing Quotes said...

very amazing and interesting post, thank you for sharing
Great Quotes
Positive Life Quotes
Fitness Quotes - Best Quotes
Future Quotes - Success Quotes
Image Bank - Smile Quotes - Xyore
اقوال وحكم