Changeset 79186 in vbox
- Timestamp:
- Jun 17, 2019 3:00:03 PM (6 years ago)
- svn:sync-xref-src-repo-rev:
- 131358
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Installer/linux/vboxdrv.sh
r78047 r79186 87 87 fi 88 88 89 KERN_VER=`uname -r` 90 MODULE_LIST="vboxdrv vboxnetflt vboxnetadp vboxpci" 91 # Secure boot state. 92 case "`mokutil --sb-state 2>/dev/null`" in 93 *"disabled in shim"*) unset HAVE_SEC_BOOT;; 94 *"SecureBoot enabled"*) HAVE_SEC_BOOT=true;; 95 *) unset HAVE_SEC_BOOT;; 96 esac 97 # So far we can only sign modules on Ubuntu and on Debian 10 and later. 98 DEB_PUB_KEY=/var/lib/shim-signed/mok/MOK.der 99 DEB_PRIV_KEY=/var/lib/shim-signed/mok/MOK.priv 100 unset HAVE_DEB_KEY 101 case "`mokutil --test-key "$DEB_PUB_KEY" 2>/dev/null`" in 102 *"is already"*) DEB_KEY_ENROLLED=true;; 103 *) unset DEB_KEY_ENROLLED;; 104 esac 105 89 106 [ -r /etc/default/virtualbox ] && . /etc/default/virtualbox 90 107 … … 252 269 if [ -d /proc/xen ]; then 253 270 failure "Running VirtualBox in a Xen environment is not supported" 271 fi 272 if test -n "$HAVE_SEC_BOOT" && test -z "$DEB_KEY_ENROLLED"; then 273 if test -n "$HAVE_DEB_KEY"; then 274 begin_msg "You must re-start your system to finish Debian secure boot set-up." console 275 else 276 begin_msg "You must sign these kernel modules before using VirtualBox: 277 $MODULE_LIST 278 See the documenatation for your Linux distribution." console 279 fi 280 return 0 254 281 fi 255 282 if ! running vboxdrv; then … … 464 491 sync 465 492 succ_msg "VirtualBox kernel modules built" 493 # Secure boot on Ubuntu and Debian. 494 if test -n "$HAVE_SEC_BOOT" && 495 type update-secureboot-policy >/dev/null 2>&1; then 496 SHIM_NOTRIGGER=y update-secureboot-policy --new-key 497 fi 498 if test -f "$DEB_PUB_KEY" && test -f "$DEB_PRIV_KEY"; then 499 HAVE_DEB_KEY=true 500 for i in $MODULE_LIST; do 501 kmodsign sha512 /var/lib/shim-signed/mok/MOK.priv \ 502 /var/lib/shim-signed/mok/MOK.der \ 503 /lib/modules/"$KERN_VER"/misc/"$i".ko 504 done 505 # update-secureboot-policy "expects" DKMS modules. 506 # Work around this and talk to the authors as soon 507 # as possible to fix it. 508 mkdir -p /var/lib/dkms/vbox-temp 509 update-secureboot-policy --enroll-key 2>/dev/null || 510 begin_msg "Failed to enroll secure boot key." console 511 rmdir -p /var/lib/dkms/vbox-temp 2>/dev/null 512 fi 466 513 } 467 514
Note:
See TracChangeset
for help on using the changeset viewer.