Solved PC fails to complete reboot after installing VirtualBox

This happened to me twice within 2 weeks time. The first time it happened I ended up reinstalling FreeBSD 11.2-STABLE because I was not able to distinguish the problem. Now it turns out it was VirtualBox. Here's what happened:

After installing VirtualBox via pkg (the first time I had it was via ports), I followed other instructions at the end of the installation ie: the devfs.conf configuration for USB, then adding
Code:
vboxnet_enable="YES"
to rc.conf and
Code:
vboxdrv_load="YES"
to loader.conf. I don't know if I'm missing something but that's about it. Then I restarted the computer. Only this time, boot up will only get halfway through and then computer will restart again, automatically. Even in Single-user Mode it's the same thing. Tried safe mode as well, same problem. Computer just keeps on restarting halfway through the boot process.

Now, this time I'm positive it was VirtualBox since it was the only change I made before the problem occur. But how or why, I don't know. To fix the problem temporarily so I can boot up again, I loaded up my live USB installer, mounted my root partition and then commented out
Code:
#vboxnet_enable="YES"
and
Code:
#vboxdrv_load="YES"
ONLY then I was able to reboot properly. But of course VirtualBox won't work because I don't have the proper configurations.

Hopefully you guys can enlighten me up here a little bit, or point me in the right direction. I really need VB for my daily work. Two weeks ago everything was working fine with FreeBSD 11.1-STABLE until my old hard drive gave up the ghost and I had to start over again on a new SSD with FreeBSD 11.2-STABLE. Any suggestions will be greatly appreciated. Thanks guys!
 
Why run STABLE though? Although less bleeding edge than CURRENT it's still a developer snapshot which means that stuff could go wrong sometimes. Not saying that this is the case here, but you can never rule it out.
 
Folks still get confused by the STABLE terminology. Fred Cash wrote a good explanation of it years ago, that he generously allowed me to use. http://srobb.net/release.html which despite having different versions, explains it well.

Also, as far as I know (though this is for RELEASE rather than STABLE) in 11..2 VirtualBox still has to be installed from ports. There is an issue with kernel mismatching because of 11.1. I could be wrong about that, but I believe VirtualBox, NVidia drivers and a few others for 11.2 will require being installed from ports until 11.1 goes EOL. https://forums.freebsd.org/threads/how-to-fix-no-screens-found-ee-nvidia-issue.67179/post-398344 gives some mention of it.
 
I had the same problem when upgrading to 11.2-Release. I had to disable VirtualBox to get the system to boot. Since VB is optional for my needs (I just use it to test out various Linux distros), I removed it entirely. This is probably not an option for most people.
 
You probably don't have to (re)build the whole emulators/virtualbox-ose from ports to get it working again, I'm fairly certainly only emulators/virtualbox-ose-kmod needs to be built from ports. This is the port that contains the kernel modules, and it's those kernel modules that need to be specifically built for your kernel version.
 
FreeBSD promises a stable user program API/ABI but that doesn't cover the kernel programming interface/kernel binary interface that the kernel modules use. It's entirely possible that parts of this interface change with minor releases and that's why kernel modules installed from ports have to be recompiled when upgrading to a new minor version of FreeBSD.
 
FreeBSD promises a stable user program API/ABI but that doesn't cover the kernel programming interface/kernel binary interface that the kernel modules use. It's entirely possible that parts of this interface change with minor releases and that's why kernel modules installed from ports have to be recompiled when upgrading to a new minor version of FreeBSD.

If that is the case (I do believe you that it is), then it would be nice if those ports were re-built in the package system so that those of us with pure binary installs could safely perform a binary upgrade. I do realize that this is probably a big task as I don't believe the package system has a way to tie a specific package to a specific release.
 
If that is the case (I do believe you that it is), then it would be nice if those ports were re-built in the package system so that those of us with pure binary installs could safely perform a binary upgrade.
This will get "fixed" eventually, when 11.1 becomes EoL (30 September). The packages are built for the lowest, still supported version. For 99.9% of the packages this isn't a problem. It's only problem for a handful of kernel modules.

Another option is to try this package repository: http://pkg.freebsd.org/FreeBSD:11:amd64/release_2/

I do realize that this is probably a big task as I don't believe the package system has a way to tie a specific package to a specific release.
Actually, they are.
Code:
root@molly:~ # pkg info -A samba48
samba48-4.8.3:
        FreeBSD_version: 1102501
        cpe            : cpe:2.3:a:samba:samba:4.8.3:::::freebsd11:x64
        repo_type      : binary
        repository     : dicelan-server
Notice the FreeBSD_version? If you try to install a package with a newer FreeBSD_version on an older system pkg(8) is going to complain loudly about it.
 
Actually, they are.
Code:
root@molly:~ # pkg info -A samba48
samba48-4.8.3:
        FreeBSD_version: 1102501
        cpe            : cpe:2.3:a:samba:samba:4.8.3:::::freebsd11:x64
        repo_type      : binary
        repository     : dicelan-server
Notice the FreeBSD_version? If you try to install a package with a newer FreeBSD_version on an older system pkg(8) is going to complain loudly about it.

Unfortunately, the issue we are experiencing with VirtualBox is the other way around. The package is being installed on a newer version of FreeBSD than the package supports.

While I can wait until October, others need to compile VB from source (or at least the kernel module portion). Most of us know how challenging it can be to mix ports and packages.
 
Unfortunately, the issue we are experiencing with VirtualBox is the other way around. The package is being installed on a newer version of FreeBSD than the package supports.
Yes. If the official packages had been built for 11.2 from the start, everybody still on 11.1 would have a problem. And that would include users that use FreeBSD as a server platform (which is the overwhelming majority).
 
Why run STABLE though? Although less bleeding edge than CURRENT it's still a developer snapshot which means that stuff could go wrong sometimes. Not saying that this is the case here, but you can never rule it out.

I understand that. This is actually the first time I tried a STABLE version. Anyways, I was able to make it work by recompiling VirtualBox from ports. It was just a little strange for me because the first time it happened I did installed it from ports. Again, maybe I just missed something. As of the moment everything are pretty much running smoothly. Thanks for the input guys. I really appreciate it.
 
Back
Top