CONFIGURATION OF LUKS
CONFIGURATION OF LUKS
it provides extra layer of security to disks.
Linux unified key ststem
ex:
add a disk
reboot system
check wheter it is added or not
fdisk -l
or fdisk /dev/sdc
sdc- 8G
now create vg
vgcreate luks-group /dev/sdc
now create lv
lvcreate -n lv-luks -L 7G luks-group
check above created once with
vgs
lvs
creating passphrase:
CRYPTSETUP:- CMD
cryptsetup: manage plain dm-crypt and LUKS encrypted volumes
once encrypted. if u forget the key then 99.99% u can not retrieve back.
EX:
cryptsetup -v -y luksFormat /dev/mapper/luks--group-lv--luks
v- verbose
y - verify the passphrase by asking for it twice
luksFormat - format a luks device
enter passphrase, now i have given DIVYAMD450
it asks again for verification.
NOW OPEN IT (WITH ALIAS):
crypysetup luksOpen /dev/mapper/luks--group-lv--luks LUKS (open with LUKS)
asks for passphrase
enter it
NOW FORMAT FILESYSTEM:
mkfs.xfs /dev/mapper/LUKS
NOW CREATE MOUNT POINT:
mkdir /mnt/LUKS_PLACE
mount /dev/mapper/LUKS /mnt/LUKS_PLACE
ADD CRYPTTAB INOREDR TO SYSTEM KNOW THIS ENCRYPTION:
vim /etc/crypttab
insert below line
name mapper none - format
LUKS /dev/mapper/luks--group-lv--luks none
ls /dev/mapper - to see mappers
FOR PERMINANT MOUNT
vim /etc/fstab for systemd for systemchecks
/dev/mapper/LUKS /mnt/LUKS_PLACE xfs defaults 0 0
now reboot and see
after reboot it asks for passphrase. enter it. then os is loaded.
check the mount with
df -h
it provides extra layer of security to disks.
Linux unified key ststem
ex:
add a disk
reboot system
check wheter it is added or not
fdisk -l
or fdisk /dev/sdc
sdc- 8G
now create vg
vgcreate luks-group /dev/sdc
now create lv
lvcreate -n lv-luks -L 7G luks-group
check above created once with
vgs
lvs
creating passphrase:
CRYPTSETUP:- CMD
cryptsetup: manage plain dm-crypt and LUKS encrypted volumes
once encrypted. if u forget the key then 99.99% u can not retrieve back.
EX:
cryptsetup -v -y luksFormat /dev/mapper/luks--group-lv--luks
v- verbose
y - verify the passphrase by asking for it twice
luksFormat - format a luks device
enter passphrase, now i have given DIVYAMD450
it asks again for verification.
NOW OPEN IT (WITH ALIAS):
crypysetup luksOpen /dev/mapper/luks--group-lv--luks LUKS (open with LUKS)
asks for passphrase
enter it
NOW FORMAT FILESYSTEM:
mkfs.xfs /dev/mapper/LUKS
NOW CREATE MOUNT POINT:
mkdir /mnt/LUKS_PLACE
mount /dev/mapper/LUKS /mnt/LUKS_PLACE
ADD CRYPTTAB INOREDR TO SYSTEM KNOW THIS ENCRYPTION:
vim /etc/crypttab
insert below line
name mapper none - format
LUKS /dev/mapper/luks--group-lv--luks none
ls /dev/mapper - to see mappers
FOR PERMINANT MOUNT
vim /etc/fstab for systemd for systemchecks
/dev/mapper/LUKS /mnt/LUKS_PLACE xfs defaults 0 0
now reboot and see
after reboot it asks for passphrase. enter it. then os is loaded.
check the mount with
df -h
Comments
Post a Comment