Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- WARNING: The character device /dev/vboxdrv does not exist.
- Please install the virtualbox-dkms package and the appropriate
- headers, most likely linux-headers-generic.
- You will not be able to start VMs until this problem is fixed.
- #!/bin/bash
- # sign-vbox script, copyright (c) 2017 by Rod Smith
- # Distributed under the terms of the GPLv3
- if [ "$#" -ne 1 ] && [ "$#" -ne 0 ]; then
- echo "Usage: $0 [ {kernel-version} ]"
- exit 1
- fi
- if [ "$#" == 0 ]; then
- kernel_version=$(uname -r)
- else
- kernel_version="$1"
- fi
- sign_file=$(find /usr/src/ -name sign-file | tail -n 1)
- if [ -z $sign_file ]; then
- echo "Can't find the sign-file binary! Exiting!"
- exit 1
- else
- path_to_modules="/lib/modules/$kernel_version/updates/dkms"
- if [ ! -f $path_to_modules/vboxdrv.ko ]; then
- echo "Could not find $path_to_modules/vboxdrv.ko!"
- echo "Is the kernel version correct?"
- exit 1
- fi
- echo "Signing modules for $kernel_version"
- $sign_file sha256 /etc/refind.d/keys/refind_local.key /etc/refind.d/keys/refind_local.cer $path_to_modules/vboxdrv.ko
- $sign_file sha256 /etc/refind.d/keys/refind_local.key /etc/refind.d/keys/refind_local.cer $path_to_modules/vboxnetadp.ko
- $sign_file sha256 /etc/refind.d/keys/refind_local.key /etc/refind.d/keys/refind_local.cer $path_to_modules/vboxnetflt.ko
- $sign_file sha256 /etc/refind.d/keys/refind_local.key /etc/refind.d/keys/refind_local.cer $path_to_modules/vboxpci.ko
- modprobe vboxdrv
- modprobe vboxnetflt
- modprobe vboxpci
- modprobe vboxnetadp
- echo "Loaded vbox modules:"
- lsmod | grep vbox
- fi
- tom@fancy:~/bin$ ll /etc/refind.d/keys/
- total 20
- drwxr-xr-x 2 root root 4096 Dec 14 09:54 ./
- drwxr-xr-x 3 root root 4096 Dec 14 09:53 ../
- -r--r--r-- 1 root root 767 Dec 14 09:54 refind_local.cer
- -r--r--r-- 1 root root 1094 Dec 14 09:54 refind_local.crt
- -r--r--r-- 1 root root 1708 Dec 14 09:54 refind_local.key
- tom@fancy:~/bin$ sudo ./sign-vbox.sh
- Signing modules for 4.13.0-19-generic
- modprobe: ERROR: could not insert 'vboxdrv': Required key not available
- modprobe: ERROR: could not insert 'vboxnetflt': Required key not available
- modprobe: ERROR: could not insert 'vboxpci': Required key not available
- modprobe: ERROR: could not insert 'vboxnetadp': Required key not available
- Loaded vbox modules:
Add Comment
Please, Sign In to add comment