Ubuntu upgrade issue 6.14.0-37-generic to 6.17.0-14-generic kernel

I hit a snag during this upgrade that might help others. The kernel package threw an error during installation, and after rebooting I landed in a kernel panic. The panic message complained about being unable to read sector 0 (or something similar), which made the system unbootable under the new kernel.

I was still able to boot into the previous kernel, which let me inspect the logs. After reviewing them (and running them through Copilot for pattern‑matching), the root cause became clear: there’s a known interaction between the 6.14 to 6.17 kernel upgrade path and VirtualBox. If VirtualBox is installed, the DKMS module build fails, and that failure cascades into a broken kernel install.

Removing VirtualBox allowed the kernel upgrade to proceed normally. After uninstalling it, I reran the upgrade and it completed without errors. I followed up with a couple of cleanup commands to make sure the package state and DKMS modules were consistent:

Code

sudo apt autoremove --purge
sudo apt autoclean
sudo dkms status

(You may also want to remove any stale VirtualBox DKMS entries if they linger.)

I haven’t reinstalled VirtualBox yet, but in theory it should work fine once the new kernel is fully in place. Posting this in case someone else hits the same failure mode. The symptoms are pretty alarming, but the fix is straightforward once you know where to look.

@pdecker ,
Are you trying to tell us that the presence of an app ( Virtualbox) interferes with the compiling of modules for kernel 6.17
but
it will not interfere with the running kernel once it is installed?

I thought one of the most basic things about a kernel was its independence?

OK, so it is only the compiling of modules that fails… but why? Has Vbox installed some library that conflicts?

and
Does anyone know why kernel modules have to be compiled? Why cant they be binaries? Does it really compile them, or is it just a linking operation?

I seem to remember last time I installed VirtualBox - it needed to install some kernel modules - which is hardly surprising - virtualization software / hypervisors - need to tie in closely to the kernel…

I should never need to worry about this in future - since I no longer use VirtualBox - just QEMU/KVM and Virt-Manager… i.e. “kvm” is part of the Linux kernel…

It’s a shame VirtualBox doesn’t use KVM instead of implementing its own sort of hypervisor…

Would it be possible to compile KVM for Windows maybe?
Virtualbox is crossplatform, runs on Windows / Mac / Linux, and something “Solaris”, so it needs an implementation, which is portable.

I have Vbox installed, and to be able to install it I needed various development packages on Debian. Linux-headers-xxx among them for sure, so my guess is those modules are really compiled.

It should at least offer KVM as an option. Not a proper linux port without it.

Which VirtualBox version and from where? I switched to the Virtualbox 7.2.X from Oracle instead of using Ubuntu’s. I ran into this problem a while back. Ubuntu’s version relies on the separate virtualbox-dkms package. Where as Oracle’s does not. Oracle’s include the kernel modules already compiled for common kernels. There is a known issue with Ubuntu’s repo version of VirtualBox 7.0.x not being compatible with kernel 6.17.

Thanks for this post Tim

a. How did you install VirtualBox?
b. Through a .deb file or oracle repository?

The previous answer of Joel has sense. I still remain in branch 7.1.x but with the problem of the Kernel issue (is not possible run a VM).

Soon as I can I am going to move to 7.2.x branch or work around the modprobe “blacklist” approach

@JoelA

  • Are you able to run a VM in peace with VB 7.2.x?
  • How did you install VirtualBox?
  • Through a .deb file or oracle repository?

Thanks in advance

I personally downloaded the .deb file to test it out. I will probably switch to the repo in future.

update- I removed the deb and added the repo- I just had not got around to doing it so I went ahead and did it. So far no problems everything seems to be running fine.

Also- if you are switching over to Oracle’s from Ubuntu’s, be sure to uninstall the virtualbox-dkms package.

Thanks for the feedback Joel

FYI- I do use qemu/kvm & virtualbox - So far with this setup, they all get along. (of course only one can grab the hypervision at a time-but at least the play nice)

my kernel is 6.17

I am in the same boat.
I could not master Vbox’s menus. For a Linux user it is quite counter intuitive.
Now we hear it has multiple versions, configured differently.

Why not give virt-manager a try? It is available in every Linux’s repo.

I prefer qemu/kvm (virt-manger)- I find myself using it more often than virtualbox- but they both have pros and cons. My use of virtual machines are mainly just for fun and learning.

Gnome Boxes doesn’t seem to have any of these problems.

I am in the same boat.
I could not master Vbox’s menus. For a Linux user it is quite counter intuitive.
Now we hear it has multiple versions, configured differently.

I work since 2016 with VirtualBox because my laptop had installed with Windows 10 and in that days I was very rust with Linux. So by facto it was the most common approach. IMHO there is no a big chaos with the Menu

Why not give virt-manager a try? It is available in every Linux’s repo.

It is on my “todo” list but after to did do a research on the web there is no a common way to install and configure (the configuration settings is complex). Even more in YouTube there are more ways to install

And yes, I’ve read many times “qemu/kvm/virt-manager” are better than VB

Here is what Copilot said about the kernel / virtualbox issue.

Here’s the good news, Pat:
Your system isn’t broken — VirtualBox DKMS is. And that’s exactly why the new kernel won’t finish installing and why you got the “can’t find sector zero” boot failure when trying to use it.

Let’s break this down cleanly and get you back to a healthy state.


:red_square: What Actually Failed

The key line is this:

Bad return status for module build on kernel: 6.17.0-14-generic
dkms autoinstall ... failed for virtualbox(10)

Your NVIDIA DKMS modules built fine.
Only VirtualBox’s kernel modules failed to build for the new kernel.

When DKMS fails during a kernel install:

  • The kernel install is marked as failed

  • GRUB may still add it, but the kernel is incomplete

  • Booting it can produce disk/sector errors, missing modules, or initramfs failures

So the “sector zero” message wasn’t actually a disk problem — it was the kernel booting without required modules.


:blue_square: Why VirtualBox DKMS Fails on Ubuntu 24.04

Ubuntu 24.04 uses the HWE kernel, which is now at 6.17.
VirtualBox 7.0.x DKMS is notoriously brittle with newer kernels.

Your installed version:

virtualbox/7.0.16

…is known to fail on 6.17 kernels.


:green_square: The Fix Depends on What You Want

Option A — You use VirtualBox and want it working

Then the fix is:

1. Install the official Oracle repo version (much more reliable)

sudo apt remove virtualbox-dkms virtualbox
sudo apt autoremove

wget https://www.virtualbox.org/download/oracle_vbox_2016.asc
sudo gpg --dearmor -o /usr/share/keyrings/vbox.gpg oracle_vbox_2016.asc

echo "deb [arch=amd64 signed-by=/usr/share/keyrings/vbox.gpg] https://download.virtualbox.org/virtualbox/debian noble contrib" | sudo tee /etc/apt/sources.list.d/virtualbox.list

sudo apt update
sudo apt install virtualbox-7.0

Oracle’s build includes prebuilt modules and DKMS patches that Ubuntu’s version lacks.

2. Re-run the kernel configuration

sudo dpkg --configure -a
sudo apt --fix-broken install

3. Reboot into the new kernel


Option B — You don’t need VirtualBox on this machine

Then the fix is even easier:

1. Remove the VirtualBox DKMS package

sudo apt remove virtualbox-dkms virtualbox
sudo apt autoremove

2. Re-run the kernel install

sudo dpkg --configure -a
sudo apt --fix-broken install

3. Reboot into the new kernel

This will immediately stop the DKMS failures and allow kernel updates to install cleanly.


:orange_square: Optional: Inspect the failing log

If you want to see the exact compiler error:

cat /var/lib/dkms/virtualbox/7.0.16/build/make.log

It will almost certainly show missing symbols or incompatible kernel API calls.


:blue_square: What I Recommend for You Specifically

Given your setup — Ubuntu 24.04, NVIDIA, VirtualBox, and a preference for stable, low-friction infrastructure — the Oracle repo version is the cleanest long-term fix.

It avoids DKMS breakage every time a new HWE kernel lands.


If you want, I can walk you through the exact commands step-by-step based on your current package state, or help you inspect the failing log to confirm the root cause.

That could also be an advantage when running on Windows. There may be more common code than trying to run some sort of KVM on Windows.

I’ve used Gnome Boxes and I do like it, but I can’t use both at the same time. VirtualBox seems to fit my use case better most of the time, so I use it more often.

I think the exact same.

Gnome Boxes is just another GUI on top of KVM/Qemu, Virtmanager is a more sophisticated implementation.
Virtualbox on the other hand is a complete solution, from virtualization drivers up to the GUI.
Yes, it is incompatible with KVM, recently there were other problems -starting with Debian 13.
I tried Virtmanager (KVM/Qemu), and while it performs slightly better than Virtualbox, the ease of use network, especially to create bridged network cards for guests, makes me Virtualbox the #1 solution.