vmware-secureboot-sign-linux/sign.sh
2024-10-27 18:08:31 -04:00

20 lines
445 B
Bash
Executable file

#!/bin/bash
if [[ $EUID -ne 0 ]]; then
echo "This script must be run as root. Exiting."
exit 1
fi
/usr/src/kernels/$(uname -r)/scripts/sign-file \
sha256 \
MOK.priv \
MOK.der \
/lib/modules/$(uname -r)/misc/vmmon.ko
echo "Signed vmmon"
/usr/src/kernels/$(uname -r)/scripts/sign-file \
sha256 \
MOK.priv \
MOK.der \
/lib/modules/$(uname -r)/misc/vmnet.ko
echo "Signed vmnet"
modprobe vmmon