Okay back to How to RE - INSTALL Virtual Box vboxdrv kernel in boot

Asked by Lynne Stevens

So I can go back to Secure boot . . Something like sudo install vboxdrv ( but got to tell it where right )

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Solved by:
Lynne Stevens
Solved:
Last query:
Last reply:
Revision history for this message
actionparsnip (andrew-woodhead666) said :
#1

Why do you need another question about this? You already have a question regarding this?

Revision history for this message
Manfred Hampl (m-hampl) said :
#2

If you want to have secure boot and module signature checking enabled, then you have to activate module signing.

For instructions see e.g.:
https://gist.github.com/reillysiemens/ac6bea1e6c7684d62f544bd79b2182a4
or
https://nidomiro.de/2018/04/automatic-virtualbox-module-signing-for-uefi/

Revision history for this message
Lynne Stevens (jackie40d) said :
#3

Question there . . From reading it . . It is RE installing Virtual Box Again ? Major re install of lots of programs and files . . Or is this just going to be adding the Vboxdrv kernel back in to the boot spot ?

Revision history for this message
Manfred Hampl (m-hampl) said :
#4

The vboxdrv.ko kernel module has never been in some kind of "boot spot" and it never will be, but it is somewhere below the directory /lib/modules/<kernel-version>/

And no, it is not necessary to re-install the VirtualBox software if the version on your system has a sufficiently high version number.

Why do you see the need for "Major re install of lots of programs and files"?

What you need for re-enabling secure boot and module signature checking is just adding a signature to the existing vboxdrv kernel module with a trusted signature key (and the same for three additional modules).

Revision history for this message
Lynne Stevens (jackie40d) said :
#5

I am guessing you do not use Virtual Box much . . I have used it for years to avoid windows stuff and its problems . . And with out fail every time there is a change in the O/S like major change in to next version Virtual Box is zipped and start over again ! . . So I do a backup of things by moving files to the Shared folder on the Linux Desktop from inside Windows Like documents folder and download folder plus all of the STL files and all of Sketchup files . . The Win-crap Folder has grown to about 15 gigs of stuff !

Revision history for this message
Lynne Stevens (jackie40d) said :
#6

So If it does not belong in boot sector WHERE does it go and why does it get Deleted ? . . Then the question is HOW to put it back where it was at ?

Revision history for this message
Manfred Hampl (m-hampl) said :
#7

Why do you think that that the vboxdrv.ko kernel module file gets deleted? I assume that this is a misinterpretation of the message that you see when attempting to load an unsigned module on a system that has secure boot and module signature checking enabled.

Issue the commands
sudo updatedb
locate vboxdrv.ko
and you will see that the module exists in /lib/modules/<kernel-version>/… directories

You have, however, to be aware, that whenever a new version of the kernel is installed, a new version of that module (as well as vboxnetadp.ko, vboxnetflt.ko and vboxpci.ko) has to be built. This is caused by the fact that they must exactly fit to the kernel version.
That module compilation runs automatically when installing a new version of the kernel, but there is no automatic signing of these additional modules.

Your problem now is that the UEFI BIOS does not allow loading an unsigned module, if secure boot with signature checking is enabled.

(By the way, I am using VirtualBox myself, e.g. for test systems with different versions of Ubuntu. Up to now I never had any problem with it or with the virtual machines run under it. Upgrading the operating system of the host system, or upgrading to a newer version of the VirtualBox software on the host have always allowed me to continue running the virtual machines, without any need for re-creating them. Note: I do not have secure boot enabled.)

Revision history for this message
Lynne Stevens (jackie40d) said :
#8

Okay i hit a Key and watched the loading of Ubuntu and It seems the Vbox Services is the item holding it up . . keeps coming back to it trying to start it . . must have seen it 3 times where it gave up and did something else and came back to the Vbox services . .So what ever that is a file in wrong spot or missing is what is dragging the Laptop speed down ! . . So a File is missing from some place !

Revision history for this message
Manfred Hampl (m-hampl) said :
#9

I do not know why you always are talking about the vboxdrv.ko being missing or in a wrong spot.

What is the output of the commands

uname -a
lsb_release -crid
sudo updatedb
locate vboxdrv.ko
modinfo vboxdrv.ko
modprobe -v vboxdrv

Revision history for this message
Manfred Hampl (m-hampl) said :
#10

Sorry, my fault.
The last command in the previous list needs to be

sudo modprobe -v vboxdrv

Revision history for this message
Lynne Stevens (jackie40d) said :
#11

And this is why I say it is missing !
lynne@lynne-Notebook-PC:~$ uname -a
Linux lynne-Notebook-PC 5.0.0-36-generic #39-Ubuntu SMP Tue Nov 12 09:46:06 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
lynne@lynne-Notebook-PC:~$ lsb_release -crid
Distributor ID: Ubuntu
Description: Ubuntu 19.04
Release: 19.04
Codename: disco
lynne@lynne-Notebook-PC:~$ sudo updatedb
[sudo] password for lynne:
lynne@lynne-Notebook-PC:~$ locate vboxdrv.ko
/usr/lib/modules/5.0.0-35-generic/misc/vboxdrv.ko
/usr/lib/modules/5.0.0-36-generic/misc/vboxdrv.ko
lynne@lynne-Notebook-PC:~$ modinfo vboxdrv.ko
modinfo: ERROR: Module vboxdrv.ko not found.
lynne@lynne-Notebook-PC:~$

lynne@lynne-Notebook-PC:~$ sudo modprobe -v vboxdrv
lynne@lynne-Notebook-PC:~$

Revision history for this message
Manfred Hampl (m-hampl) said :
#12

Sorry, my command apparently was wrong. I mixed up two possible versions of the parameters.

Try

modinfo vboxdrv

and

modinfo /usr/lib/modules/5.0.0-36-generic/misc/vboxdrv.ko

Revision history for this message
Lynne Stevens (jackie40d) said :
#13

lynne@lynne-Notebook-PC:~$ modinfo vboxdrv
filename: /lib/modules/5.0.0-36-generic/misc/vboxdrv.ko
version: 6.0.10 r132072 (0x00290008)
license: GPL
description: Oracle VM VirtualBox Support Driver
author: Oracle Corporation
srcversion: 0BC064F1468807C3064D9A5
depends:
retpoline: Y
name: vboxdrv
vermagic: 5.0.0-36-generic SMP mod_unload
parm: force_async_tsc:force the asynchronous TSC mode (int)
lynne@lynne-Notebook-PC:~$ modinfo
/usr/lib/modules/5.0.0-36-generic/misc/vboxdrv.ko
filename: /usr/lib/modules/5.0.0-36-generic/misc/vboxdrv.ko
version: 6.0.10 r132072 (0x00290008)
license: GPL
description: Oracle VM VirtualBox Support Driver
author: Oracle Corporation
srcversion: 0BC064F1468807C3064D9A5
depends:
retpoline: Y
name: vboxdrv
vermagic: 5.0.0-36-generic SMP mod_unload
parm: force_async_tsc:force the asynchronous TSC mode (int)
lynne@lynne-Notebook-PC:~$

On Mon, Nov 18, 2019 at 5:53 AM Manfred Hampl <
<email address hidden>> wrote:

> Your question #685904 on Ubuntu changed:
> https://answers.launchpad.net/ubuntu/+question/685904
>
> Status: Open => Needs information
>
> Manfred Hampl requested more information:
> Sorry, my command apparently was wrong. I mixed up two possible versions
> of the parameters.
>
> Try
>
> modinfo vboxdrv
>
> and
>
> modinfo /usr/lib/modules/5.0.0-36-generic/misc/vboxdrv.ko
>
> --
> To answer this request for more information, you can either reply to
> this email or enter your reply at the following page:
> https://answers.launchpad.net/ubuntu/+question/685904
>
> You received this question notification because you asked the question.
>

Revision history for this message
Manfred Hampl (m-hampl) said :
#14

The kernel module does exist in the directory where it is suppsed to be.

Now, what is the output of the commands

mokutil --sb-state
lsmod | grep vbox

Revision history for this message
Lynne Stevens (jackie40d) said :
#15

lynne@lynne-Notebook-PC:~$ mokutil --sb-state
SecureBoot disabled
lynne@lynne-Notebook-PC:~$ lsmod | grep vbox
vboxpci 24576 0
vboxnetadp 28672 0
vboxnetflt 28672 0
vboxdrv 483328 3 vboxpci,vboxnetadp,vboxnetflt
lynne@lynne-Notebook-PC:~$

Revision history for this message
Manfred Hampl (m-hampl) said :
#16

Current status is that secure boot is disabled, and the Virtualbox driver modules are loaded.
This should let the Windows guest system correctly run. I expect that this will continue to work even after an upgrade of the kernel packages.

There is no signature information shown in the modinfo output, so they seem not to be signed.

You have to decide whether you now accept the situation as it is, or if you want to (re-)enable secure boot.
In the latter case you have to care for signing of the four virtualbox kernel modules and have to register the signature key in the MOK database. For details of the steps to be done see the links in comment #2

(Remark: In case that you do a release upgrade to Ubuntu 19.10 or to the 5.3.* series of the kernel packages, you must upgrade to virtualbox 6.0.14 or higher, otherwise the compilation of the kernel modules will fail.)

Revision history for this message
Lynne Stevens (jackie40d) said :
#17

Okay after I get ALL the files an stuff backedup . . Then UPGRADE to 19.10 and let it update a few times and THEN install Virtual Box and the guest dditions and the entension pack will it delete the Vboxdrv kernel with out the signing thing . . Which sounds like a pain it the . . . stuff ?

Revision history for this message
Manfred Hampl (m-hampl) said :
#18

Sorry, but I do not understand your last comment.
Is this a question, or a complaint, or you current plan, or …?

Revision history for this message
Lynne Stevens (jackie40d) said :
#19

It was a Question about Up Grading . . Since it will delete a lot of things when it gets installed . . Half the Programs will have to be found AGAIN then install them . .

Revision history for this message
Manfred Hampl (m-hampl) said :
#20

Why should an upgrade "delete a lot of things"?
What are you referring to - programs, data, your virtual machine with Windows, ...?

I have never experienced such problem.
The only thing you have to be aware of: If a certain program (or package) is no more _compatible_ with the newer release, then it will be removed during the release upgrade. But that is a very rare case.

As already noted above:
A release upgrade from Ubuntu 19.04 to 19.10 will upgrade the kernel packages to 5.3.*.
And the 5.3.* kernel packages require a certain change in the virtualbox software that is contained only in virtualbox version 6.0.14 (and later). So in course of the release upgrade to Ubuntu 19.10 you also must upgrade the virtualbox software. But all these changes should not have any effect on your Virtual Machine. If it runs with your current virtualbox software, then it should also run with an upgraded version of virtualbox.

Revision history for this message
Lynne Stevens (jackie40d) said :
#21

Okay will be Backing up the gigs of stuff on my laptop for Installing
19.10 and let it update at least 2 times before i install Virtual Box
plus the Extension and Guest Additions and go through the signing of
Virtual Box kernel so it does not get taken off the spot it got put in !
! . . I got an Ideal on the ISO for  3rd way of up grading to next
version .  .It has as Options "Try It" or "Install" why not a 3rd Option
of "UpGrade" it does same stuff doesn't it ? . . Maybe then it would not
erase a lot of things or Delete them . . I have 7 Pages of programs in
the "SHOW APPLICATIONS"  that I use ( off and on ) and 18 Icons on the
left hand side of screen I use a lot of ALL the time and NONE will be
there after UpGrade is done .  .. . There is a Deleting of programs that
goes on after finishing . . Which mean Having to go looking for them . .
Like ConvertAll, Prusa Slic3r, Synaptic Package Manager, Xfburn. ABI,
and Almanah Diary ( got from 2014 to now in there ) of daily things to
do of need done  Oh yeah the Mono Develop which is for Repetier-Host
will be gone and the Desktop Icons for Quicken and Repetier-Host will be
gone and I will have to install Tweek AGAIN so as to fix the way it
shows and color of Desktop and Icons Theme  . . Seems Programmer have
weird ideals as to Themes

On 11/20/19 9:43 AM, Manfred Hampl wrote:
> Your question #685904 on Ubuntu changed:
> https://answers.launchpad.net/ubuntu/+question/685904
>
> Status: Open => Needs information
>
> Manfred Hampl requested more information:
> Sorry, but I do not understand your last comment.
> Is this a question, or a complaint, or you current plan, or …?
>

Revision history for this message
Manfred Hampl (m-hampl) said :
#22

Until Ubuntu 12.04 (five years ago) there was an 'alternate' installer CD available, which offered the possibility to do a release upgrade from the CD to the system installed on hard disk. This has been abandoned, and nowadays if you want to do a release upgrade from one Ubuntu release to another one, you have to use the tools provided in the Ubuntu installation which download the needed files from the internet during installation.

Such release upgrade will not uninstall programs, unless they are incompatible with the new Ubuntu release (and if they are incompatible they cannot be used anyhow).

"There is a Deleting of programs that goes on after finishing"
I have never experienced such problem when doing an in-place release upgrade (e.g. with the command "do-release-upgrade").

If you boot the Ubuntu installer of the next release and tell it to "install Ubuntu", then of course this might overwrite your current installation and delete files (depending on your choice in the dialog for partitioning).

"and go through the signing of Virtual Box kernel so it does not get taken off the spot it got put in !"
You are misunderstanding the signature checking process. The VirtualBox kernel modules are located below the /usr/lib/modules/<kernel version> directory and nowhere else, no matter whether they are signed or not.

The issue is the following:
If module signature checking is enabled, then the module loader refuses to load an unsigned kernel module or a module that is signed only with untrusted keys. There is no "module is deleted" or similar problem.

Do you need further help with this problem?
If yes, then please formulate you problem as question that can be answered.

Revision history for this message
Lynne Stevens (jackie40d) said :
#23

Okay UPGRADED to 19.10 and Virtual Box is really dead now ! . . do i have to sign all of the mentioned files in this
RE do with sudo sbin/vboxconfig

lynne@lynne-Notebook-PC:~$ sudo /sbin/vboxconfig
[sudo] password for lynne:
Sorry, try again.
[sudo] password for lynne:
vboxdrv.sh: Stopping VirtualBox services.
depmod: WARNING: could not open modules.order at /lib/modules/5.0.0-35-generic: No such file or directory
depmod: WARNING: could not open modules.builtin at /lib/modules/5.0.0-35-generic: No such file or directory
vboxdrv.sh: Starting VirtualBox services.
vboxdrv.sh: Building VirtualBox kernel modules.
vboxdrv.sh: failed: Look at /var/log/vbox-setup.log to find out what went wrong.

There were problems setting up VirtualBox. To re-start the set-up process, run
  /sbin/vboxconfig
as root. If your system is using EFI Secure Boot you may need to sign the
kernel modules (vboxdrv, vboxnetflt, vboxnetadp, vboxpci) before you can load
them. Please see your Linux system's documentation for more information.
lynne@lynne-Notebook-PC:~$

Says files are not there at all !

Revision history for this message
Manfred Hampl (m-hampl) said :
#24

What is now the output of the commands

uname -a
lsb_release -crid
VBoxManage --version
cat /var/log/vbox-setup.log

Revision history for this message
Lynne Stevens (jackie40d) said :
#25

Never mind . . I RE Installed latest Version of Virtual Box AGAIN and it wanted latest version of Extension pack and i down loaded the latest version of Guest Additions and burn to a CD and installed it from inside of windows off the CD . . So all Works again with all the same stuff in it . . Seems the UPGRADE installed a password in CMOS as i CAN NOT go back to SECURE BOOT . . I seen the Password and know what it is . . Password XXX was in stalled in something in Virtual box area . . I watched the Details of install very close said was removing 6 programs and upgrading some where around 162 programs . . 2050 Files and 2.6 gigs of files . .I tried to install Guest Additions about 2 times and gave up . .

Revision history for this message
Lynne Stevens (jackie40d) said :
#26

That should have READ "IT" Tried to ( the Up Grade to 19.10 ) I downloaded the guest additions ISO file burned to CD and installed the Guest Additions from inside of Windows . .