Page 3 of 3
Re: Virtualbox not working after kernel upgrade
Posted: 22. Feb 2016, 04:04
by rsal
I am not clear about what to do. For this post, I have Salix-mate installed with kernel 4.1.4-smp from this page:
http://people.salixos.org/gapan/kernel-4.1.4/ (kernel, its firmware and modules were installed). Kernel source is also installed from
https://www.kernel.org/pub/linux/kernel ... 1.4.tar.xz . I downloaded and ran
http://download.virtualbox.org/virtualb ... ux_x86.run but it does not get installed:
Code: Select all
root[0-virtualbox]# ls -l
total 81900
-rwxr-xr-x 1 abcde users 83865038 Feb 20 09:22 VirtualBox-5.0.14-105127-Linux_x86.run
root[0-virtualbox]# ./VirtualBox-5.0.14-105127-Linux_x86.run
Verifying archive integrity... All good.
Uncompressing VirtualBox for Linux installation.............
VirtualBox Version 5.0.14 r105127 (2016-01-19T16:55:41Z) installer
Removing previous installation of VirtualBox from /usr/lib/virtualbox
root[0-virtualbox]# exit
exit
abcde[0-virtualbox]$ virtualbox
bash: virtualbox: command not found
Where do I run this command:
Code: Select all
patch -d src/VBox/Installer/linux -i $CWD/vboxdrv.sh-setup.diff
I do not have any vboxdrv.sh file on my system.
Re: Virtualbox not working after kernel upgrade
Posted: 22. Feb 2016, 07:53
by mimosa
Have you tried what was suggested, namely, completely remove any existing installation of virtualbox, ensure you have the correct kernel-source (remove the existing one first), then execute the virtualbox installation script using sudo sh (not as root)?
Re: Virtualbox not working after kernel upgrade
Posted: 22. Feb 2016, 13:12
by djemos
The kernel source downloaded from kernel.org is not a ready slackware kernel source tree to use to compile kernel modules. This has been tested. Vbox cannot be compiled. You have to prepare this kernel for slackware. I will not write here how to do it, because this will make things more difficult for you. And since in that link you download and installed the kernel does not exist the slackware ready kernel-source-4.1.4, i suggest to you to do the simple following steps to have vbox installed.
Install this
kernel,
kernel-modules,
kernel-source
run
reboot and boot using the 4.4.1 kernel.
and run
Code: Select all
sudo sh VirtualBox-5.0.14-105127-Linux_x86.run
Re: Virtualbox not working after kernel upgrade
Posted: 22. Feb 2016, 14:06
by rsal
Thanks for detailed instructions. What about kernel-firmware. I have it installed from this page:
http://people.salixos.org/gapan/kernel-4.1.4/ i.e. kernel-firmware-20150804git-noarch-1gv.txz
Should I install
http://slackware.uk/slackware/slackware ... arch-1.txz of Slackware-current.
Re: Virtualbox not working after kernel upgrade
Posted: 22. Feb 2016, 14:39
by djemos
Yes you can.
Re: Virtualbox not working after kernel upgrade
Posted: 23. Feb 2016, 00:52
by laprjns
Your problem is that that you installed VirtualBox from Slackbuilds most likely using either sourcey, slapt-src or spi. The slackbuild does not install the vboxdrv script in /etc/rc.d and you therefore cannot build a new kernel modulo for the new kernel. In addition this VirtualBox installation is blocking the install of the binary version that you are trying to install using the installation script from VirtualBox. This is why you get this output when you try running the script.
Code: Select all
rich[Downloads]$ sudo sh VirtualBox-5.0.14-105127-Linux_x86.run
Password:
Verifying archive integrity... All good.
Uncompressing VirtualBox for Linux installation.............
VirtualBox Version 5.0.14 r105127 (2016-01-19T16:55:41Z) installer
Removing previous installation of VirtualBox from /usr/lib/virtualbox
rich[Downloads]$
It just kind of crashes trying to remove the previous version. So you need to completely remove the previous version manually. Here's how:
First, find out what you have installed by using spkg -l. It should look something like this:
Code: Select all
rich[Downloads]$ spkg -l | grep virtual
virtualbox-4.3.24-i486-1_SBo
virtualbox-kernel-4.3.24_3.10.17_smp-i486-1_SBo
In this example there are two packages that need to be removed. You may have more since you also mention something about a slacky version that you tried. To remove the packages use spkg -d
Code: Select all
rich[Downloads]$ sudo spkg -d virtualbox virtualbox-kernel
Password:
Removing package virtualbox-4.3.24-i486-1_SBo...
WARNING: File was already removed. (etc/default/virtualbox.new)
WARNING: File was already removed. (etc/rc.d/rc.vboxautostart-service.new)
WARNING: File was already removed. (etc/rc.d/rc.vboxballoonctrl-service.new)
WARNING: File was already removed. (etc/rc.d/rc.vboxdrv.new)
WARNING: File was already removed. (etc/vbox/vbox.cfg.new)
WARNING: Can't remove directory etc/vbox. (Directory not empty)
Removing package virtualbox-kernel-4.3.24_3.10.17_smp-i486-1_SBo...
Remove the /etc/vbox directory
Code: Select all
rich[Downloads]$ sudo rm -r /etc/vbox
Remove ther vbox user and group
Code: Select all
rich[Downloads]$ sudo userdel vboxadd
rich[Downloads]$ sudo groupdel vboxusers
Now it should be cleaned up and you are ready to install VirtualBox using the bianry installer. Of course, make sure that you have the kernel-source package installed.
Code: Select all
rich[Downloads]$ sudo sh VirtualBox-5.0.14-105127-Linux_x86.run
Verifying archive integrity... All good.
Uncompressing VirtualBox for Linux installation.............
VirtualBox Version 5.0.14 r105127 (2016-01-19T16:55:41Z) installer
Installing VirtualBox to /opt/VirtualBox
Python found: python, installing bindings...
Building the VirtualBox kernel modules
VirtualBox has been installed successfully.
You will find useful information about using VirtualBox in the user manual
/opt/VirtualBox/UserManual.pdf
and in the user FAQ
http://www.virtualbox.org/wiki/User_FAQ
We hope that you enjoy using VirtualBox.
Now typing virtualbox on the command line should start VirtualBox.
Re: Virtualbox not working after kernel upgrade
Posted: 23. Feb 2016, 09:19
by rsal
Thanks for detailed instructions. I followed and virtualbox got installed this time (after manual removal of /etc/vbox folder- rest had already been removed earlier). However, I got following output during installation (which includes an error):
Code: Select all
$ sudo sh ./VirtualBox-5.0.14-105127-Linux_x86.run
Password:
Verifying archive integrity... All good.
Uncompressing VirtualBox for Linux installation.............
VirtualBox Version 5.0.14 r105127 (2016-01-19T16:55:41Z) installer
Installing VirtualBox to /opt/VirtualBox
Python found: python, installing bindings...
Building the VirtualBox kernel modules
Error! echo <<<<< NOTE <<<<<<<<<<
Your kernel headers for kernel 4.1.4-smp cannot be found at
/lib/modules/4.1.4-smp/build or /lib/modules/4.1.4-smp/source.
VirtualBox has been installed successfully.
You will find useful information about using VirtualBox in the user manual
/opt/VirtualBox/UserManual.pdf
and in the user FAQ
http://www.virtualbox.org/wiki/User_FAQ
We hope that you enjoy using VirtualBox.
abcde[0-virtualbox]$ virtualbox
WARNING: The vboxdrv kernel module is not loaded. Either there is no module
available for the current kernel (4.1.4-smp) or it failed to
load. Please recompile the kernel module and install it by
sudo /sbin/rcvboxdrv setup
You will not be able to start VMs until this problem is fixed.
abcde[0-virtualbox]$
I have following installed (seen by spkg -l | grep kernel-header):
How can I install kernel-headers for version 4.1.4? There is no header package on this page:
http://people.salixos.org/gapan/kernel-4.1.4/
Re: Virtualbox not working after kernel upgrade
Posted: 23. Feb 2016, 11:17
by laprjns
According to this post by gapan you can used the kernel-headers from 14.1.
http://forum.salixos.org/viewtopic.php?f=20&t=6628
gapan wrote:The kernel-headers package is tied to the glibc package, not the kernel itself. If you don't update glibc, you don't update kernel-headers.
Just do slapt-get -i kernel-headers
Re: Virtualbox not working after kernel upgrade
Posted: 23. Feb 2016, 11:27
by djemos
Kernel headers are in the kernel 4.1.4 source. You have to prepare the kernel-source for slackware to be able to compile kernel modules. So
Code: Select all
sudo zcat /proc/config.gz > /usr/src/linux-4.1.4/.config
cd /usr/src/linux-4.1.4
sudo make oldconfig
sudo make prepare
sudo make scripts
cd where/is/VirtualBox-5.0.14-105127-Linux_x86.run
Code: Select all
sudo sh VirtualBox-5.0.14-105127-Linux_x86.run
Re: Virtualbox not working after kernel upgrade
Posted: 23. Feb 2016, 11:42
by rsal
@djemos: The set of instructions clearly listed by you did the trick and although following error persisted:
Code: Select all
Error! echo
Your kernel headers for kernel 4.1.4-smp cannot be found at
/lib/modules/4.1.4-smp/build or /lib/modules/4.1.4-smp/source.
virtualbox started without any error or warning and I was able to load and run a virtual disk with an operating system on it. Thanks.