Compile kernel module for non running kernel

Discussions related to using VirtualBox on Linux hosts.
Post Reply
Wolfgang.Klein
Posts: 11
Joined: 23. Feb 2009, 09:25

Compile kernel module for non running kernel

Post by Wolfgang.Klein »

Hello,

is it possible to compile the kernel module for a non running kernel? It would make a kernel update much easier if it was possible to compile the new kernel and the necessary Vbox module in one go.

If it isn't possible: may I make this possibility a wish for future versions?


Thanks in advance.
Sasquatch
Volunteer
Posts: 17798
Joined: 17. Mar 2008, 13:41
Primary OS: Debian other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows XP, Windows 7, Linux
Location: /dev/random

Post by Sasquatch »

If you have DKMS installed, it should install the module upon installation of the kernel, or at boot time. You can also run DKMS install manually. You can even add the build process and all taken from DKMS in your kernel build config.
Read the Forum Posting Guide before opening a topic.
VirtualBox FAQ: Check this before asking questions.
Online User Manual: A must read if you want to know what we're talking about.
Howto: Install Linux Guest Additions
Howto: Use Shared Folders on Linux Guest
See the Tutorials and FAQ section at the top of the Forum for more guides.
Try searching the forums first with Google and add the site filter for this forum.
E.g. install guest additions site:forums.virtualbox.org

Retired from this Forum since OSSO introduction.
Wolfgang.Klein
Posts: 11
Joined: 23. Feb 2009, 09:25

Post by Wolfgang.Klein »

I haven't used DKMS yet. I use a little bash script to update the kernel: the script fetches the latest vanilla kernel source from kernel.org, unpacks it and compiles it. After that it installs the modules and copies the new kernel to /boot. It would be nice if I could compile the necessary VBox module for the new kernel before I reboot into the new kernel.

Can DKMS do this?
Sasquatch
Volunteer
Posts: 17798
Joined: 17. Mar 2008, 13:41
Primary OS: Debian other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows XP, Windows 7, Linux
Location: /dev/random

Post by Sasquatch »

Yes, DKMS is made for things like this. If you're already compiling kernels yourself, I'm sure it would be quite easy to learn what DKMS is doing and how to use it.
Read the Forum Posting Guide before opening a topic.
VirtualBox FAQ: Check this before asking questions.
Online User Manual: A must read if you want to know what we're talking about.
Howto: Install Linux Guest Additions
Howto: Use Shared Folders on Linux Guest
See the Tutorials and FAQ section at the top of the Forum for more guides.
Try searching the forums first with Google and add the site filter for this forum.
E.g. install guest additions site:forums.virtualbox.org

Retired from this Forum since OSSO introduction.
Wolfgang.Klein
Posts: 11
Joined: 23. Feb 2009, 09:25

Post by Wolfgang.Klein »

Thank you very much for the information! :)

I will take a look at DKMS and I hope it won't take me too long to understand.
Post Reply