Git-Url: http://git.frugalware.org/gitweb/gitweb.cgi?p=fw-initramfs.git;a=commitdiff;h=73f7e877b589dad7791fc193bc325cec28f713d0
commit 73f7e877b589dad7791fc193bc325cec28f713d0 Author: bouleetbil <bouleet...@frogdev.info> Date: Thu Nov 5 22:04:33 2009 +0100 README *added small crypt setup diff --git a/README b/README index 42aa9e5..748eaba 100644 --- a/README +++ b/README @@ -12,5 +12,61 @@ $ cd /usr/share/fw-initramfs/ You should use the same arch for the usbkey and the hosted that build this key +3. Basic cryptsetup +Create your partitions so that you have a small /boot, and an other partition that has the rest of the space. +For example: +/dev/hda1 = 50M +/dev/hda2 = 60G +Filling the partition with random data (optional) + +If you don't want anyone to know how much data there is on your disk, or where on the disk it is, you might want to fill it with random data first. +This can take DAYS on a slower machine or a huge drive, so can only be recommended for the truly paranoid. + +# dd if=/dev/urandom of=/dev/hda2 +Encrypting the partition + +# modprobe dm-crypt +# modprobe aes +# modprobe sha256 + +Format the partition you created earlier. Remember that if you forget the passphrase all the encrypted data will be lost. + +# cryptsetup luksFormat /dev/hda2 enc-pv + +If the command failed make sure you have the necessary modules loaded. +Open the encrypted partition + +To access the data on the partition you will need to do the following. This will create /dev/mapper/enc-pv that we will use for LVM. + +# cryptsetup luksOpen /dev/hda2 enc-pv +Creating LVM partitons + +Create a physical volume + +# pvcreate /dev/mapper/enc-pv + +And a volume group. + +# vgcreate vg /dev/mapper/enc-pv + +Now add the logical volumes. +In this example we will have 40G for the root partition and 1G for swap. + +# lvcreate -L 40G -n root vg +# lvcreate -L 1G -n swap vg + +Format and mount + +Format them. + +# mke2fs -j -L root /dev/vg/root +# mkswap -L swap /dev/vg/swap + +And mount/enable them. + +# mount /dev/vg/root /mnt/frugalware +# swapon /dev/vg/swap + + Authors : Bouleetbil : bouleet...@frogdev.info _______________________________________________ Frugalware-git mailing list Frugalware-git@frugalware.org http://frugalware.org/mailman/listinfo/frugalware-git