- https://github.com/Benjamin-Loison
- Joined on
2022-10-16
Block a user
How to enable full disk encryption after install?
Bash script:
sudo mount /dev/mapper/rootfs /mnt
sudo mount /dev/vda1 /mnt/boot/efi
sudo mount --bind /dev /mnt/dev
sudo mount --bind /dev/pts…
How to enable full disk encryption after install?
mount /dev/mapper/rootfs /mnt
Output:
mount: /mnt: must be superuser to use mount.
dmesg(1) may have more information after failed…
How to enable full disk encryption after install?
sudo resize2fs /dev/mapper/rootfs
Output:
resize2fs 1.47.0 (5-Feb-2023)
Resizing the filesystem on /dev/mapper/rootfs to 4857344 (4k)…
How to enable full disk encryption after install?
sudo cryptsetup open /dev/vda2 rootfs
Enter passphrase for /dev/vda2:
How to enable full disk encryption after install?
sudo cryptsetup reencrypt /dev/vda2 --new --reduce-device-size 16M --type=luks1
Output:
Enter new passphrase:
Verify passphrase:
Finished,…
How to enable full disk encryption after install?
cryptsetup reencrypt /dev/vda2 --new --reduce-device-size 16M --type=luks1
bash: cryptsetup: command not found
Should try without --type
if it works fine.
How to enable full disk encryption after install?
sudo resize2fs -M /dev/vda2
Output:
resize2fs 1.47.0 (5-Feb-2023)
Resizing the filesystem on /dev/vda2 to 3049008 (4k) blocks.
The filesystem…
How to enable full disk encryption after install?
e2fsck -f /dev/vda2
bash: e2fsck: command not found
sudo e2fsck -f /dev/vda2
Output:
e2fsck 1.47.0 (5-Feb-2023)
Pas…
How to enable full disk encryption after install?
sudo blkid -s UUID -o value /dev/vda2
8eb1534f-39c0-4ded-907e-aee490cb2f3f
How to enable full disk encryption after install?
From a virtual live USB:
sudo fdisk -l
Output:
Disk /dev/vda: 20 GiB, 21474836480 bytes, 41943040 sectors
Units: sectors of 1 * 512 = 512…
How to enable full disk encryption after install?
Reboot your workstation, enter your UEFI firmware, set the USB device to boot before the hard disk, save your changes, leave the firmware and boot in the live USB selecting the “Try Ubuntu…
How to enable full disk encryption after install?
there is no way to encrypt a mounted partition in Linux and you cannot unmount the root partition from which you have booted, so you will have to boot from a live USB
How to enable full disk encryption after install?
On Debian UEFI virtual machine:
sudo ls /boot/efi/
EFI
[ -d /sys/firmware/efi ] && echo UEFI
How to enable full disk encryption after install?
https://www.ovh.com/manager/#/dedicated/vps/vps713872.ovh.net/dashboard does not seem to help switching to UEFI.
DuckDuckGo search OVH Boot UEFI.
How to enable full disk encryption after install?
DuckDuckGo search Linux check if booted with UEFI.
How to enable full disk encryption after install?
ssh root@oc3k ls /boot/efi/
ls: cannot access '/boot/efi/': No such file or directory
On Oracle Cloud free ARM VPS:
ssh ubuntu@129.151.245.17 sudo ls…