/ 레드햇

15.9 Creating a LUKS Encrypted Partition

레드햇 rhcsa mount command Encrypted Partitions cryptsetup /etc/crypttab /dev/mapper LUKS partprobe
https://4am.kr/15-9-creating-a-luks-encrypted-partition/
fdisk /dev/sdb
p
n
p
ENTER
+100M
p
w
partprobe /dev/sdb
cat /proc/partitions
cryptsetup luksFormat /dev/sdb2
YES
*************
*************
mkdir /secret
cryptsetup luksOpen /dev/sdb2 secret
cd /dev/mapper
ls
\ls
pwd
mkfs.ext4 /dev/mapper/secret
mount /dev/mapper/secret /secret
cd /secret
touch myfile
cd
umount /secret
cryptsetup luksClose /dev/mapper/secret
cd /dev/mapper
vim /etc/fstab
/dev/mapper/secret /secret ext4 defaults 1 2
vim /etc/crypttab
secret /dev/sdb2 none
mount -a
reboot