Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision | Next revisionBoth sides next revision | ||
scratch [2019/03/09 14:47] – [LUKS] admin | scratch [2019/03/09 15:07] – [LUKS] admin | ||
---|---|---|---|
Line 168: | Line 168: | ||
====== LUKS ====== | ====== LUKS ====== | ||
https:// | https:// | ||
+ | | ||
################################# | ################################# | ||
########## Preparation ########## | ########## Preparation ########## | ||
Line 197: | Line 197: | ||
=============================================================================== | =============================================================================== | ||
# A) Using luksipc | # A) Using luksipc | ||
- | + | | |
# | # | ||
# Copy luksipc-master.zip to your home dir. If you have internet connection, | # Copy luksipc-master.zip to your home dir. If you have internet connection, | ||
Line 210: | Line 210: | ||
cp luksipc-master.zip ~ | cp luksipc-master.zip ~ | ||
cd ~ | cd ~ | ||
- | + | | |
# If you have no unzip, uncompress it with the GUI | # If you have no unzip, uncompress it with the GUI | ||
unzip luksipc-master.zip | unzip luksipc-master.zip | ||
Line 228: | Line 228: | ||
=============================================================================== | =============================================================================== | ||
# B) or using cryptsetup-reencrypt: | # B) or using cryptsetup-reencrypt: | ||
- | sudo cryptsetup-reencrypt --type=luks2 -N --reduce-device-size 8M $ROOTPART | + | sudo cryptsetup-reencrypt --type=luks2 --new --reduce-device-size 8M $ROOTPART |
| | ||
=============================================================================== | =============================================================================== | ||
Line 235: | Line 235: | ||
sudo cryptsetup luksOpen $ROOTPART newcryptofs | sudo cryptsetup luksOpen $ROOTPART newcryptofs | ||
sudo resize2fs / | sudo resize2fs / | ||
- | + | | |
- | | + | |
########################################################## | ########################################################## | ||
### Make the system boot from the encrypted filesystem ### | ### Make the system boot from the encrypted filesystem ### | ||
- | + | | |
sudo mount / | sudo mount / | ||
sudo mount $BOOTPART /mnt/boot | sudo mount $BOOTPART /mnt/boot | ||
- | + | | |
# Edit / | # Edit / | ||
sudo nano / | sudo nano / | ||
Line 249: | Line 249: | ||
# set HOOKS to | # set HOOKS to | ||
HOOKS=(base systemd autodetect keyboard keymap sd-vconsole modconf block sd-encrypt filesystems fsck) | HOOKS=(base systemd autodetect keyboard keymap sd-vconsole modconf block sd-encrypt filesystems fsck) | ||
- | + | | |
- | | + | |
# Set the content of the file / | # Set the content of the file / | ||
echo -e " | echo -e " | ||
Line 261: | Line 261: | ||
/ | / | ||
root=/ | root=/ | ||
- | + | | |
# You might want to delete all entries in / | # You might want to delete all entries in / | ||
# arch.conf and arch-fallback.conf as they won't boot anymore anyway. | # arch.conf and arch-fallback.conf as they won't boot anymore anyway. | ||
ls / | ls / | ||
- | + | | |
- | | + | |
sudo chroot /mnt | sudo chroot /mnt | ||
mount -t proc proc /proc | mount -t proc proc /proc | ||
mount -t sysfs sys /sys | mount -t sysfs sys /sys | ||
mount -t devtmpfs udev /dev | mount -t devtmpfs udev /dev | ||
- | + | | |
mkinitcpio -p linux | mkinitcpio -p linux | ||
exit # leave chroot | exit # leave chroot | ||
- | + | | |
# reboot | # reboot | ||
sudo reboot | sudo reboot | ||
Line 280: | Line 280: | ||
- | Not sure if this works: | ||
=============================================================================== | =============================================================================== | ||
# change luks1 to luks2 (or vice versa) | # change luks1 to luks2 (or vice versa) |