Created
June 24, 2020 11:22
-
-
Save bjorndown/11b99dde4d6d6856d922995937a17f28 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
set -o errexit | |
kernel_release=$(uname -r) | |
private_key_file="private_key.pem" | |
public_key_file="public_key.der" | |
find /lib/modules/"${kernel_release}" -name 'vbox*.ko' | while read -r module_path; do | |
module_name=$(basename -s .ko ${module_path}) | |
echo "Signing ${module_name} ..." | |
/usr/src/kernels/"${kernel_release}"+debug/scripts/sign-file \ | |
sha256 \ | |
"${private_key_file}" \ | |
"${public_key_file}" \ | |
"${module_path}" | |
done; | |
# easiest to first sign all modules, then load them | |
find /lib/modules/"${kernel_release}" -name 'vbox*.ko' | while read -r module_path; do | |
module_name=$(basename -s .ko "${module_path}") | |
echo "Loading ${module_name}" | |
modprobe "${module_name}" | |
done; | |
echo "Checking VBoxManage output: " | |
VBoxManage --version |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment