SparkyLinux Forums

Installation & Upgrade => System upgrading => Topic started by: kanliot on August 02, 2019, 12:52:32 AM

Title: [Solved] Huh, VirtualBox is asking for headers on Sparky 5 Stable
Post by: kanliot on August 02, 2019, 12:52:32 AM
I bought an ebook off google, so now I need a Virtual machine.  I tried to install Oracle's virtualbox, but on the command line.  'apt-install virtualbox'  complained about the lack of headers for Sparky 5 stable.

I checked for headers, and I cannot find headers in the repo for Sparky 5 stable.   
https://sparkylinux.org/wiki/doku.php/linux_kernel

Thanks in advance for any help.  I'd like to get Virtualbox installed on one of my pc's this week.
Title: Re: Huh, VirtualBox is asking for headers on Sparky 5 Stable
Post by: lami07 on August 02, 2019, 07:58:09 AM
What kernel we are talking about ?  (uname -a)
Title: Re: Huh, VirtualBox is asking for headers on Sparky 5 Stable
Post by: paxmark1 on August 02, 2019, 08:23:11 PM
And also are you going through Debian or Virtualbox. 

I went from my Stretch May 2016 install (was still deep into testing at that time)  that terminated in Debians .deb Vbox 5.x and sucessfully went to a clean install (on ssd and now 12 gb mem) via Vbox ppa, there are some improvements in 6.x (although I like the theme and layout better in 5).    Key word in /etc/apt/sources.list  is "bionic" as they model it off of ubuntu.  But they do test on Debian.  Not sure how the Sparky sources.list.d is set up.  For me the following worked.
deb http://download.virtualbox.org/virtualbox/debian bionic contrib

I doubt that Debian will ever again issue a .deb of virtualbox. It seemed a finale had been decided in the path towards the freeze, 6 or more months before the freeze. 

I try hard to avoid, but I choose to continue vbox to not buy a new license for Win 7 - license  will not transfer to kvm/qemu .qcow.  i will be using kvm/qemu for any non windows virtual machines. 

I am still on kernel 4.19 but I hope that dkms should work - it works for others in the 5.x line. 
Title: Re: Huh, VirtualBox is asking for headers on Sparky 5 Stable
Post by: pavroo on August 03, 2019, 12:14:26 AM
Don't need to add VBox repo, VirtualBox 6 can be installed from Sparky repos now.
Title: Re: Huh, VirtualBox is asking for headers on Sparky 5 Stable
Post by: kanliot on August 06, 2019, 11:44:12 PM
Quote from: pavroo on August 03, 2019, 12:14:26 AM
Don't need to add VBox repo, VirtualBox 6 can be installed from Sparky repos now.

I have retested the install today, by removing the virtualbox-6.0 package and then doing:
The error given by apt-install is
# apt install virtualbox-6.0
....
Please install the Linux kernel "header" files matching the current kernel
for adding new hardware support to the system.


I believe I require the headers for a compatible sparkylinux kernel so that virtualbox can build a kernel module for my kernel

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.

I haven't changed my kernel, since I've never had a problem with the kernel from sparkylinux.org.  Again, I'm running the new "Sparky 5 stable"
Linux MYPC  5.1.16-sparky-amd64 #1 SMP Wed Jul 3 15:22:22 CEST 2019 x86_64 GNU/Linux


# cat /etc/apt/sources.list
deb http:/ftp.debian.org/debian/ buster main contrib non-free
deb-src http:/ftp.debian.org/debian/ buster main contrib non-free
deb http:/security.debian.org/ buster/updates main contrib non-free
deb-src http:/security.debian.org/ buster/updates main contrib non-free
deb http:/www.deb-multimedia.org buster main non-free
## Other repos can be found in /etc/apt/sources.list.d directory ##



to paxmark1:  KVM is an option.  It's an good option for me.   However I have a GNS3 virtualbox image that I wanted to use to study for my CCNA.   If I can't get this done by next week, i'll just install KVM.
Title: Re: Huh, VirtualBox is asking for headers on Sparky 5 Stable
Post by: pavroo on August 07, 2019, 12:20:04 AM
Edit
What you need is linux-headers to be installed of your present linux-image.
The Sparky's Linux kernels starting from 5.0 don't support building VirtualBox module (the Debian package which is build via dkms; not any more), but the Oracle VirtualBox doesn't need the module to be build.

The stable line of Sparky doesn't get access to Sparky's kernels, you need to add Sparky unstable repos and install the latest kernel & headers or use Debian's kernel instead.