I used Xubuntu minimal in live mode, which already had dosfstools cryptsetup (v2.7) and efibootmgr installed so I didn't have to install those.That's a really nice find! I completely missed it, SED support now from cryptsetup!
https://lore.kernel.org/all/cd409f6c-5d51-482c-8a26-340822754ff1@gmail.com/T/
I am literally curious how that will work out for you now.
On my server, when I install PVE it creates the 1M BIOS boot partition starting at sector 34, but on my PC where I'm doing this (my server is a Lenovo M710 Tiny which only has one SSD SATA port) fdisk only allows me to start creating partitions at sector 2048, so I skipped the BIOS boot partition as you suggest and just created three partitions.
However, when I tried to encrypt the third partition with 'cryptsetup luksFormat --hw-opal-only /dev/sda3' I got an error "Cannot setup OPAL segment"
so I download and untarred sedutil-cli and ran 'sedutil-cli --scan' and that identified that "The Kernel flag libata.allow_tpm is not set correctly",
That needs to be set in the kernel parameters or by editing it on the running system.
https://wiki.archlinux.org/title/Self-encrypting_drives#Using_sedutil
The way to edit it on the running system is:
cd /sys/module/libata/parameters
sudo chmod 644 allow_tpm
sudo nano allow_tpm
Delete number 0 and write number 1. Save file.
but even though I'm logged in as root on Xubuntu live, when I tried to sudo nano allow_tpm it says "Error writing lock file ./.allow_tpm.swp: Permission denied ]" so I can't edit and save it. I can't permanently change the kernel parameters when booting Xubuntu live either, and it was getting a bit tedious having to keep rebooting and reinstalling stuff at this point, so I installed a fresh copy of PVE on a spare SSD on my server, and booted my PC from that, and then edited /etc/default/grub to add the libata.allow_tpm=1 parameter and regenerated grub.cfg with 'grub-mkconfig -o /boot/grub/grub.cfg' and rebooted.
After installing sedutil-cli I ran 'sedutil-cli --scan' to confirm that it's no longer warning about the flag not being set correctly. However, when I try to run cryptsetup it says its not installed, and when I try to install it with apt install it says:
"Package cryptsetup is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package 'cryptsetup' has no installation candidate"
which is weird, because it was definitely installed on my previous PVE. That was v8.2.7 though and this new install is v8.2.2. I've installed ttecks's PVE Post Install script from here https://tteck.github.io/Proxmox/#proxmox-ve-tools and it's added the no-subscription repository, but apt update, apt upgrade, apt dist-upgrade all say it's up to date, so I'll have to work out how to update it to v8.2.7 and then see if cryptsetup is installed after that.
EDIT: It's showing that it's v8.2.7 now and I can install cryptsetup with apt install, but it's v2.6 which doesn't have the OPAL support, so I still don't know how I had v2.7 on my previous PVE install.
EDIT2: OK, I discovered how I'd done it. I'd edited /etc/apt/sources.list and added 'deb http://ftp.de.debian.org/debian sid main' to the end. Adding that and running 'apt update' then allows me to upgrade cryptsetup to v2.7.5 with 'apt install cryptsetup'.
Last edited: