Luks FS
Formater la partition
pwgen -1 > /root/.luks.pwd # Format partition cryptsetup -q --use-urandom luksFormat /dev/vg/lv /root/.luks.pwd # Creating random keyfile for crypted partition dd if=/dev/urandom of=/root/.luks.key bs=1024 count=4 # Setting permission on key/pass files chmod 0500 /root/.luks.pwd /root/.luks.key #Add new key on crypted partition cryptsetup luksAddKey /dev/vg/lv # Active crypted partition cryptsetup luksOpen /dev/vg/lv mylv --key-file /root/.luks.key # Creating Ext4 FS on crypted partition mkfs.ext4 /dev/mapper/mylv
Monter la partition chiffré
Remarque : A faire après le cryptsetup luksOpen.
mount /dev/mapper/mylv /mnt/mylv
Démonter la partition
umount /dev/mapper/mylv cryptsetup close mylv