grub2 – Failed to set MokListRT: Out of Resources


I am running Ubuntu 20.04 and Windows 10 in dual boot configuration using UEFI. I am running LUKS on the Ubuntu instance with secure boot enabled.

I updated my system today which resulted in a kernel update. I am running VMware workstation on my system, and because I am running secure boot, any time I update the linux kernel I am required to sign specific VMware drivers and enroll the public keys in my system’s MOK list before being able to run virtual machines again.

Following this VMware guide https://kb.vmware.com/s/article/2146460 (which I have utilized many times in the past successfully), I ran the following commands:

openssl req -new -x509 -newkey rsa:4096 -keyout MOK.priv -outform DER -out MOK.der -nodes -days 36500 -subj "/CN=VMware/"

sudo /usr/src/linux-headers-`uname -r`/scripts/sign-file sha256 ./MOK.priv ./MOK.der $(modinfo -n vmmon)

sudo /usr/src/linux-headers-`uname -r`/scripts/sign-file sha256 ./MOK.priv ./MOK.der $(modinfo -n vmnet)

sudo mokutil --import MOK.der

I then rebooted and was prompted to enroll my keys in the MOK. After doing so, the system rebooted and I was presented with the following error message when trying to boot Ubuntu:

Failed to set MokListRT: Out of Resources
Could not create MokListRT: Out of Resources
Something has gone seriously wrong: import_mok_state() failed
: Out of resources

Now you may have noticed that during this process I created a pair of keys for signing rather than using a pre-existing key. Being the massive idiot that I am, I never stopped to think about what was going on under the hood: every time I did this a new public key was being appended to my system’s MOK list and I might run into resource constraints if I constantly appended. My naive assumption is that this is what happened here. I am currently unable to boot into my Ubuntu instance or a live cd. I am able to access my bios and get into Windows. Any help mitigating this problem would be greatly appreciated.