Created
May 10, 2010 04:58
-
-
Save jesseadams/395695 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Create Encrypted Volume | |
user=`echo $USER` | |
echo "Creating $HOME/encrypted_volume..." | |
dd if=/dev/zero of=$HOME/encrypted_volume bs=1M count=1024 | |
losetup /dev/loop0 $HOME/encrypted_volume | |
losetup -a | |
cryptsetup -y create enc_home /dev/loop0 | |
cryptsetup status homes | |
mkfs.ext4 /dev/mapper/enc_home | |
mkdir $HOME/encrypted | |
mount /dev/mapper/enc_home $HOME/encrypted | |
chown -R $USER:$USER $HOME/encrypted | |
# Mount Encrypted Volume | |
losetup /dev/loop0 $HOME/encrypted_volume | |
losetup -a | |
cryptsetup create enc_home /dev/loop0 | |
cryptsetup status enc_home | |
mount /dev/mapper/enc_home $HOME/encrypted | |
df -h | |
# Unmount Encrypted Volume | |
umount $HOME/encrypted | |
cryptsetup remove enc_home | |
losetup -d /dev/loop0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment