Incomplete update of linux kernel 6.17.0-14 resulting in Kernel Panic

Ubuntu Version: 24.04.3
Desktop Environment: GNOME
Hardware: Macbook air (2015)

Problem Description:
I Installed Ubuntu 24.04 on my old Macbook almost a year ago. I have been using it almost daily and updating without problems since then.

I updated today using the software updater and it indicated a problem of an incomplete update. Unfortunately I did not keep the original message.

I therefore went to do the update again through the terminal to see what was happening.

roland@Ubuntu-mac:~$ sudo apt update
[sudo] password for roland: 
Hit:1 http://archive.ubuntu.com/ubuntu noble InRelease
Hit:2 http://archive.ubuntu.com/ubuntu noble-updates InRelease                                     
Hit:3 http://archive.ubuntu.com/ubuntu noble-backports InRelease                                   
Hit:4 http://security.ubuntu.com/ubuntu noble-security InRelease                                   
Hit:5 https://cloud.r-project.org/bin/linux/ubuntu noble-cran40/ InRelease                         
Hit:6 http://linux.dropbox.com/ubuntu noble InRelease                                      
Hit:7 https://esm.ubuntu.com/apps/ubuntu noble-apps-security InRelease
Hit:8 https://esm.ubuntu.com/apps/ubuntu noble-apps-updates InRelease
Hit:9 https://esm.ubuntu.com/infra/ubuntu noble-infra-security InRelease
Hit:10 https://esm.ubuntu.com/infra/ubuntu noble-infra-updates InRelease
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
1 package can be upgraded. Run 'apt list --upgradable' to see it.
roland@Ubuntu-mac:~$ apt list --upgradable
Listing... Done
alsa-ucm-conf/noble-updates,noble-updates 1.2.10-1ubuntu5.9 all [upgradable from: 1.2.10-1ubuntu5.8]
N: There are 2 additional versions. Please use the '-a' switch to see them.
roland@Ubuntu-mac:~$ sudo apt upgrade
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Calculating upgrade... Done
The following upgrades have been deferred due to phasing:
  alsa-ucm-conf
0 to upgrade, 0 to newly install, 0 to remove and 1 not to upgrade.
4 not fully installed or removed.

As you can see it notes that there are 4 not fully installed packages

the update continued and I got the following error messages:

4 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y
Setting up linux-image-6.17.0-14-generic (6.17.0-14.14~24.04.1) ...
Setting up linux-headers-6.17.0-14-generic (6.17.0-14.14~24.04.1) ...
/etc/kernel/header_postinst.d/dkms:
 * dkms: running auto installation service for kernel 6.17.0-14-generic
Sign command: /usr/bin/kmodsign
Signing key: /var/lib/shim-signed/mok/MOK.priv
Public certificate (MOK): /var/lib/shim-signed/mok/MOK.der

Building module:
Cleaning build area...
make -j4 KERNELRELEASE=6.17.0-14-generic KVER=6.17.0-14-generic...(bad exit status: 2)
ERROR: Cannot create report: [Errno 17] File exists: '/var/crash/broadcom-sta-dkms.0.crash'
Error! Bad return status for module build on kernel: 6.17.0-14-generic (x86_64)
Consult /var/lib/dkms/broadcom-sta/6.30.223.271/build/make.log for more information.
dkms autoinstall on 6.17.0-14-generic/x86_64 failed for broadcom-sta(10)
Error! One or more modules failed to install during autoinstall.
Refer to previous errors for more information.
 * dkms: autoinstall for kernel 6.17.0-14-generic
   ...fail!
run-parts: /etc/kernel/header_postinst.d/dkms exited with return code 11
dpkg: error processing package linux-headers-6.17.0-14-generic (--configure):
 installed linux-headers-6.17.0-14-generic package post-installation script subprocess returned erro
r exit status 11
dpkg: dependency problems prevent configuration of linux-headers-generic-hwe-24.04:
 linux-headers-generic-hwe-24.04 depends on linux-headers-6.17.0-14-generic; however:
  Package linux-headers-6.17.0-14-generic is not configured yet.

dpkg: error processing package linux-headers-generic-hwe-24.04 (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of linux-generic-hwe-24.04:
 linux-generic-hwe-24.04 depends on linux-headers-generic-hwe-24.04 (= 6.17.0-14.14~24.04.1); howeve
r:
  Package linux-headers-generic-hwe-24.04 is not configured yet.

dpkg: error processing package linux-generic-hwe-24.04 (--configure):
 dependency problems - leaving unconfigured
Processing triggers for linux-image-6.17.0-14-generic (6.17.0-14.14~24.04.1) ...
No apport report written because the error message indicates it's a follow-up error from a previous 
failure.
        No apport report written because the error message indicates it's a follow-up error from a p
revious failure.
                /etc/kernel/postinst.d/dkms:
 * dkms: running auto installation service for kernel 6.17.0-14-generic
Sign command: /usr/bin/kmodsign
Signing key: /var/lib/shim-signed/mok/MOK.priv
Public certificate (MOK): /var/lib/shim-signed/mok/MOK.der

Building module:
Cleaning build area...
make -j4 KERNELRELEASE=6.17.0-14-generic KVER=6.17.0-14-generic...(bad exit status: 2)
ERROR: Cannot create report: [Errno 17] File exists: '/var/crash/broadcom-sta-dkms.0.crash'
Error! Bad return status for module build on kernel: 6.17.0-14-generic (x86_64)
Consult /var/lib/dkms/broadcom-sta/6.30.223.271/build/make.log for more information.
dkms autoinstall on 6.17.0-14-generic/x86_64 failed for broadcom-sta(10)
Error! One or more modules failed to install during autoinstall.
Refer to previous errors for more information.
 * dkms: autoinstall for kernel 6.17.0-14-generic
   ...fail!
run-parts: /etc/kernel/postinst.d/dkms exited with return code 11
dpkg: error processing package linux-image-6.17.0-14-generic (--configure):
 installed linux-image-6.17.0-14-generic package post-installation script subprocess returned error 
exit status 11
No apport report written because MaxReports has already been reached
                                                                    Errors were encountered while processing:
 linux-headers-6.17.0-14-generic
 linux-headers-generic-hwe-24.04
 linux-generic-hwe-24.04
 linux-image-6.17.0-14-generic
E: Sub-process /usr/bin/dpkg returned an error code (1)

I then restarted the system to see if this would sort itself out and got:

KERNEL PANIC!
Please reboot your computer.
VFS: Unable to mount root fs on unknown-block(0,0)

Restarting the computer gave the same message.

I then tried restarting and accessing the GRUB menu.

It gave me GNU GRUB version 2.12

I chose advanced options for Ubuntu

which showed:

Ubuntu, with Linux 6.17.0-14 generic
Ubuntu, with Linux 6.17.0-14 generic (recovery mode)
Ubuntu, with Linux 6.14.0-37 generic
Ubuntu, with Linux 6.14.0-37 generic (recovery mode)

When I tried to boot with the first two it took me to the Kernel Panic, but when I booted with 6.14.0-37 it booted normally and everything worked well. The problem is that I can now only boot through the GRUB menu.

I would like to know how to either delete or repair the Linux 6.17.0-14.

Any suggestions welcome. Thank you

3 Likes

Hello, @rnclarke. You can first boot using the 6.14 kernel, completely remove the 6.17 kernels, then rebuild initramfs and GRUB configuration to fix the issue. Since I don’t know the specific method for replacing the kernel, you’ll need to wait for others to respond.

Thanks very much for the quick reply @qwedsaz . How do I remove the 6.17 kernels? I am afraid that I am not a linux expert.

Thanks

1 Like

@rnclarke, While I understand the general approach, I’m sorry that I don’t know the specific and safe steps to remove the 6.17 kernel. To avoid risking your system, you’ll need to wait for replies from more experienced users.

Thanks anyway. I will be patient!

1 Like

This is likely related to:

https://bugs.launchpad.net/ubuntu/+source/broadcom-sta/+bug/2120508

The fixed broadcom dkms package (version 6.30.223.271-23ubuntu1.2) has not migrated out of proposed yet …

2 Likes

Thanks for the information. What should I do in the meantime? Can I delete the 6.17 kernel? and if so how?

Thanks

1 Like

I would just boot with the former kernel (select it from the bootloader) and wait until you see the broadcom-sta package getting offered to you, then switch over to 6.17 …

(dkms packages can be a pain, but that is what you (as a manufacturer) get when you do not submit your driver to the mainline tree … and the users of your hardware then suffer from it :confused: )

3 Likes

Thanks I will do that. I

Is there no way to get rid of the 6.17 for the moment, because it is always difficult to get the timing of the keys right to enter the bootloader?

You can edit Grub so that it always appears.
Then, it’s easy to select an alternative kernel or even UEFI settings.

sudo nano /etc/default/grub

Here’s an example:-

GRUB_DEFAULT=0
GRUB_TIMEOUT_STYLE=menu
GRUB_TIMEOUT=10 # or however many seconds for your own comfort
GRUB_DISTRIBUTOR=`( . /etc/os-release; echo ${NAME:-Ubuntu} ) 2>/dev/null || echo Ubuntu`
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
GRUB_CMDLINE_LINUX=""

Don’t forget to run:-

sudo update-grub
5 Likes

@tea-for-one That helps a lot. Thanks

This worked for me:

https://askubuntu.com/questions/1338398/how-do-i-remove-newest-kernel

2 Likes

Hello all, I have the same issue, thank you all for the information.

Thanks very much @mikestew62 - this worked very well, but for other who want to use it, it may be necessary to do twice. The instructions from the previous post are as follows:

  1. Open Terminal (if it’s not already open)

  2. List the available kernels:

    dpkg -l | grep linux-image
    
    
  3. Remove the kernel(s) you don’t want:

    sudo apt-get purge linux-image-6.17.0-14-generic
    
    
  4. Remove the headers as well:

    sudo apt-get purge linux-headers-6.17.0-14-generic
    
    
  5. Reboot

I did not do step 5 once I had done the other 4. What I did was to repeat step 2 and discovered there was still some bits of the 6.17.0 kernel. I therefore repeated steps 3 and 4 again and then checked and found the 6.17.0 had been completely purged.

I then rebooted and everything worked well - the booting was from 6.14.0.

5 Likes

Hi, have the same problem, but on different hardware, I have Lenovo ThinkPadT14 Gen 1.
Is there any chance, that it will be fixed onece or shall I remove the defect kernel?

I have the same problem.

I am not a linux expert, but as far as I can see, the solution is not hardware dependent.

I have the same problem too on a MacBoook Pro 8.1 but now that I went back to Linux 6.14.0-37-generic, since a few days trying to update my system either automatically or manually does not install the Linux 6.17.0-14-generic kernel that causes the problem anymore. It seems that the problem has been recognized and I hope that it will be resolved soon. The status of the bug https://bugs.launchpad.net/ubuntu/+source/broadcom-sta/+bug/2120508 is “Fix released” for Questing but only “Fix commited” for Noble at the moment. We may simply have to wait until that is completed.

2 Likes

It seems to depend on the WLAN hardware. In our case certain Broadcom WLAN hardware that is used by diferent PC manufacturers in certain PC or laptop models and needs Broadcom software drivers see the already mentioned bug: https://bugs.launchpad.net/ubuntu/+source/broadcom-sta/+bug/2120508

Thanks, that worked for me. Had the same issue on an Thinkpad T470s with 6.17.0.14