[SOLVED] How to install PVE 7 with Secure Boot enabled?

Why do you need secure boot enable on the host? If it is for Windows 11 guests, I believe all that can be done at the guest level with its BIOS and adding a TPM.
 
It is possible - I achieved that by using Debian vanilla kernel. But that would be an UNSUPPORTED SETUP and you will lose ZFS (though technically you can create your own MOK, add the key to MOK manager, and sign ZFS kernel module with the key).

Bash:
root@pve:~# pveversion
pve-manager/7.1-10/6ddebafe (running kernel: 5.10.0-12-amd64)
root@pve:~# mokutil --sb-state
SecureBoot enabled

Also, you'll need to use vanilla Debian's apparmor features file, namely:

Bash:
mv /usr/share/apparmor-features/features /usr/share/apparmor-features/features.pve
mv /usr/share/apparmor-features/features.stock /usr/share/apparmor-features/features

Otherwise apparmor will fail to load at boot.

In addition, you probably want to edit grub scripts so that each time when kernel updates, pve kernels do not get automatically added to grub menu.
 
It is possible - I achieved that by using Debian vanilla kernel. But that would be an UNSUPPORTED SETUP and you will lose ZFS (though technically you can create your own MOK, add the key to MOK manager, and sign ZFS kernel module with the key).

Bash:
root@pve:~# pveversion
pve-manager/7.1-10/6ddebafe (running kernel: 5.10.0-12-amd64)
root@pve:~# mokutil --sb-state
SecureBoot enabled

Also, you'll need to use vanilla Debian's apparmor features file, namely:

Bash:
mv /usr/share/apparmor-features/features /usr/share/apparmor-features/features.pve
mv /usr/share/apparmor-features/features.stock /usr/share/apparmor-features/features

Otherwise apparmor will fail to load at boot.

In addition, you probably want to edit grub scripts so that each time when kernel updates, pve kernels do not get automatically added to grub menu.
I want to either sign the pve kernel to keep secure boot or use the vanilla kernel. Are those the only changes required for the vanilla kernel? And might you have a guide for signing the pve kernel?
 
For using Debian vanilla kernels, yes those are the steps I did (of course you'll need to install Debian kernel and supporting packages first - I installed Proxmox over existing Debian so all those are automatically done) - except for one thing that you will need to edit grub scripts somehow to exclude pve kernels from being added to grub. For that, I did in a very hacky way - basically modified grub_file_is_not_garbage() function in /usr/share/grub/grub-mkconfig_lib that excludes any pve kernels.

Regarding signing PVE kernels, I have not done that myself, which is why I say "technically". You can find the general ideas here: https://wiki.archlinux.org/title/Un...are_Interface/Secure_Boot#Using_your_own_keys
 
Last edited:

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!