Block encryption
Posted: Tue Apr 26, 2011 1:46 pm
Testing encryption:
Start with block device. I will be using /dev/sdc
create partition however needed.
Use dd to fill with random data.
Higher randomization but slower.
Good randomization and faster.
Format device
Verify and Summary if wanted.
Create map for decrypted data
Use below to get and use UUID so if name changes no worries
Create map
Create FS
Mount
Add the mapping information to /etc/crypttab
Add to fstab
Start with block device. I will be using /dev/sdc
create partition however needed.
Use dd to fill with random data.
Higher randomization but slower.
Code: Select all
dd if=/dev/urandom of=/dev/sdc1Code: Select all
badblocks -c 10240 -s -w -t random -v /dev/sdc1Code: Select all
cryptsetup luksFormat /dev/sdc1 Code: Select all
cryptsetup isLuks /dev/sdb1 && echo SuccessCode: Select all
cryptsetup luksDump /dev/sdb1Use below to get and use UUID so if name changes no worries
Code: Select all
cryptsetup luksUUID /dev/sdb1Code: Select all
cryptsetup luksOpen /dev/sdb1 luks-uuid Code: Select all
mkfs.ext3 /dev/mapper/luks-uuidCode: Select all
mount /dev/mapper/luks-uuid /mntpointCode: Select all
luks-uuid uuidCode: Select all
/dev/mapper/luks-uuid /mntpoint ext3 defaults 0 0