Benjamin_Loison commented on issue Benjamin_Loison/linux#58 2025-03-26 18:22:01 +01:00
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…
Benjamin_Loison commented on issue Benjamin_Loison/linux#58 2025-03-26 18:20:12 +01:00
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…
Benjamin_Loison commented on issue Benjamin_Loison/linux#58 2025-03-26 18:19:37 +01:00
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)…
Benjamin_Loison commented on issue Benjamin_Loison/linux#58 2025-03-26 18:19:08 +01:00
How to enable full disk encryption after install?
sudo cryptsetup open /dev/vda2 rootfs
Enter passphrase for /dev/vda2:
Benjamin_Loison commented on issue Benjamin_Loison/linux#58 2025-03-26 18:18:36 +01:00
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,…
Benjamin_Loison commented on issue Benjamin_Loison/linux#58 2025-03-26 18:17:30 +01:00
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.

Benjamin_Loison commented on issue Benjamin_Loison/linux#58 2025-03-26 18:14:55 +01:00
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…
Benjamin_Loison commented on issue Benjamin_Loison/linux#58 2025-03-26 18:14:32 +01:00
How to enable full disk encryption after install?
resize2fs
bash: resize2fs: command not found
Benjamin_Loison commented on issue Benjamin_Loison/linux#58 2025-03-26 18:14:04 +01:00
How to enable full disk encryption after install?
man resize2fs 
Benjamin_Loison commented on issue Benjamin_Loison/linux#58 2025-03-26 18:13:09 +01:00
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…
Benjamin_Loison commented on issue Benjamin_Loison/linux#58 2025-03-26 18:07:47 +01:00
How to enable full disk encryption after install?
sudo blkid -s UUID -o value /dev/vda2
8eb1534f-39c0-4ded-907e-aee490cb2f3f
Benjamin_Loison commented on issue Benjamin_Loison/linux#58 2025-03-26 18:06:50 +01:00
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…
Benjamin_Loison commented on issue Benjamin_Loison/linux#58 2025-03-26 18:04:36 +01:00
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…

Benjamin_Loison commented on issue Benjamin_Loison/linux#58 2025-03-26 18:04:09 +01:00
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

Benjamin_Loison commented on issue Benjamin_Loison/linux#58 2025-03-26 18:03:32 +01:00
How to enable full disk encryption after install?

On Debian UEFI virtual machine:

sudo ls /boot/efi/
EFI
[ -d /sys/firmware/efi ] && echo UEFI 
Benjamin_Loison commented on issue Benjamin_Loison/linux#58 2025-03-26 17:59:16 +01:00
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.

Benjamin_Loison commented on issue Benjamin_Loison/linux#58 2025-03-26 17:45:11 +01:00
How to enable full disk encryption after install?

DuckDuckGo search Linux check if booted with UEFI.

Benjamin_Loison commented on issue Benjamin_Loison/linux#58 2025-03-26 17:44:43 +01:00
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…