- https://github.com/Benjamin-Loison
- Joined on
2022-10-16
Block a user
How to enable full disk encryption after install?
Does it actually preserve files and folders on ext4, once encrypt it? I would say so, see:
-----BEGIN PGP MESSAGE-----
hF4DTQa9Wom5MBgSAQdAptDpm7flAFMEqHMJY…
How to enable full disk encryption after install?
Testing on an actual computer may help, can dd to ease resetting the unencrypted disk state.
How to enable full disk encryption after install?
I disabled installing pending updates when requesting on graphical shutdown.
How to enable full disk encryption after install?
umount -a
Output:
umount: /mnt/dev: must be superuser to unmount.
umount: /mnt/boot/efi: must be superuser to unmount.
umount: /mnt: must be…
How to enable full disk encryption after install?
update-initramfs -k all -c
Output:
update-initramfs: Generating /boot/initrd.img-6.1.0-29-amd64
update-initramfs: Generating /boot/initrd.img-6…
How to enable full disk encryption after install?
/boot/grub/grub.cfg:
#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by grub-mkconfig using templates
# from /etc/grub.d and…
How to enable full disk encryption after install?
update-grub
Output:
Generating grub configuration file ...
Found background image: /usr/share/images/desktop-base/desktop-grub.png
Found…
How to enable full disk encryption after install?
In another shell:
ls /boot/efi/
ls: cannot access '/boot/efi/': No such file or directory
[ -d /sys/firmware/efi ] && echo UEFI
How to enable full disk encryption after install?
grub-install
Output:
Installing for x86_64-efi platform.
grub-install: warning: EFI variables are not supported on this system..
Installation…
How to enable full disk encryption after install?
Initial
Initial /etc/default/grub:
...
GRUB_DEFAULT=0
GRUB_TIMEOUT=5
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null
How to enable full disk encryption after install?
In /etc/default/grub, remove the existing reference to the root partition from GRUB_CMDLINE_LINUX
there was no such reference.
How to enable full disk encryption after install?
/etc/fstab:
...
# <file system> <mount point> <type> <options> <dump> <pass>
# / was on /dev/vda2 during installation
UUID=8eb1534f-3…
How to enable full disk encryption after install?
/etc/crypttab:
# ...
rootfs UUID=8eb1534f-39c0-4ded-907e-aee490cb2f3f /etc/luks/boot_os.keyfile luks,discard
should…
How to enable full disk encryption after install?
cryptsetup luksAddKey /dev/vda2 /etc/luks/boot_os.keyfile
Enter any existing passphrase:
How to enable full disk encryption after install?
mkdir /etc/luks
dd if=/dev/urandom of=/etc/luks/boot_os.keyfile bs=4096 count=1
Output:
1+0 records in
1+0 records out
4096 bytes (4.1 kB,…
How to enable full disk encryption after install?
With the current setup, the system would ask the encryption passphrase twice: once to access the second-stage GRUB boot loader and once again for the Linux kernel to access the encrypted root…