More kernel panic

Hi all, i'm making this topic because i'm having a kernel panic.
I unknowingly used to software updater and installed everything available to update.
This failed with an error that a package had failed installing or unpacking.
I've looked at the other similar topics and, tried the devs fix,

  • sudo apt update
  • sudo apt dist-upgrade

but this doesnt work for me.

Next i tried booting into 6.17.0-40-generic and that worked as intended.
But how can i set the 6.17 kernel to the default one to boot instead of 7.00?

i tried

sudo nano /etc/default/grub

Change GRUB_DEFAULT=0 to GRUB_DEFAULT=saved
Hit enter to drop down a line.
Add GRUB_SAVEDEFAULT=true
ctrl+x to exit, then the y key to say yes to save, then the enter key to save as current configuration.

Run

sudo update-grub

but it still boots into the broken kernel every time i choose to start zorin os.

Boot in the 6.17 Kernel. Make sure, You use it with the Command uname -r in Terminal.

When You have already done the Changes in the GRUB Configuration linke decribed here:

and Your are on the 6.17 Kernel, type in Terminal sudo update-grub and then reboot and check if it works.

Do you have a Dualboot with another Linux Distribution and do you use the boot menu of the other distribution to launch Zorin? If yes, set Zorin/Ubuntu at first boot position and try then to boot Zorin.

Or do you have installed another special kernel, e.g. an oem kernel?

Hi, i tried that after searching the forums but it doesn't work for me.
after booting into 6.17, the next time i boot it's still going default for 7.0

Hi i tried the GRUB_DEFAULT and GRUB_SAVEDEFAULT thing before, and while it shows a * next to 6.17 it still loads 7.0 when i just choose zorin os in the boot menu.

is there a way i can set the first boot menu option to 6.17?

I dont have dual boot with another linux, just windows for when i need it.

What is the output of

uname -r

when booted successful?

6.17.0-40-generic

Okay, it should make no difference, but you can try to set in your grub file

GRUB_DEFAULT="Advanced options for Zorin OS>Zorin OS, with Linux 6.17.0-40-generic"

(keep all other lines as they are), save the file and then run

sudo update-grub

and reboot to see if it helps. Do nothing in grub menu, just wait until the system boots.

The method "[HOW-TO] set an older kernel to default boot" actually sets the 6.17 kernel at first position at boot (when everything is made correctly), but it can give situations, where other circumstances lead to boot another kernel than the saved one in grub (Dual-boot, other boot menus, configuration files at /etc/grub.d or /etc/default/grub.d....)

No that doesn't work for me.
It just goes straight to the new broken kernel.
I don't understand it, it's like all settings are ignored.

Maybe the error has to do with your virtualbox installation.

Could you please give us the content of:
Consult: /var/lib/dkms/virtualbox/7.1.16/build/make.log

Could You check /etc/grub.d/ if there are any Files and if there are some, what Files are there?

Also, You could uninstall the 7.0 Kernel and then try the Setup for the default Kernel again. And when done, install the 7.0 Kernel.

Here is the content of make.log

Summary

DKMS make.log for virtualbox-7.1.16 for kernel 7.0.0-28-generic (x86_64)
ma 27 jul 2026 15:43:52 CEST
make: Entering directory '/usr/src/linux-headers-7.0.0-28-generic'
make[1]: Entering directory '/var/lib/dkms/virtualbox/7.1.16/build'
warning: the compiler differs from the one used to build the kernel
The kernel was built by: x86_64-linux-gnu-gcc-13 (Ubuntu 13.3.0-6ubuntu2~24.04.1) 13.3.0
You are using: gcc-13 (Ubuntu 13.3.0-6ubuntu2~24.04.1) 13.3.0
warning: pahole version differs from the one used to build the kernel
The kernel was built with: 125
You are using: 0
CC [M] vboxdrv/linux/SUPDrv-linux.o
CC [M] vboxdrv/SUPDrv.o
CC [M] vboxdrv/SUPDrvGip.o
CC [M] vboxdrv/SUPDrvSem.o
CC [M] vboxdrv/SUPDrvTracer.o
CC [M] vboxdrv/SUPLibAll.o
CC [M] vboxdrv/common/string/strformatrt.o
CC [M] vboxdrv/combined-agnostic1.o
CC [M] vboxdrv/combined-agnostic2.o
CC [M] vboxdrv/combined-os-specific.o
LD [M] vboxdrv/vboxdrv.o
CC [M] vboxnetflt/linux/VBoxNetFlt-linux.o
CC [M] vboxnetflt/VBoxNetFlt.o
CC [M] vboxnetflt/SUPR0IdcClient.o
CC [M] vboxnetflt/SUPR0IdcClientComponent.o
CC [M] vboxnetflt/linux/SUPR0IdcClient-linux.o
LD [M] vboxnetflt/vboxnetflt.o
CC [M] vboxnetadp/linux/VBoxNetAdp-linux.o
CC [M] vboxnetadp/VBoxNetAdp.o
LD [M] vboxnetadp/vboxnetadp.o
MODPOST Module.symvers
ERROR: modpost: module vboxdrv uses symbol cr4_update_irqsoff from namespace module:kvm,kvm-amd,kvm-intel, but does not import it.
ERROR: modpost: module vboxdrv uses symbol cr4_read_shadow from namespace module:kvm,kvm-amd,kvm-intel, but does not import it.
make[3]: *** [/usr/src/linux-headers-7.0.0-28-generic/scripts/Makefile.modpost:147: Module.symvers] Error 1
make[2]: *** [/usr/src/linux-headers-7.0.0-28-generic/Makefile:2065: modpost] Error 2
make[1]: *** [/usr/src/linux-headers-7.0.0-28-generic/Makefile:248: __sub-make] Error 2
make[1]: Leaving directory '/var/lib/dkms/virtualbox/7.1.16/build'
make: *** [Makefile:248: __sub-make] Error 2
make: Leaving directory '/usr/src/linux-headers-7.0.0-28-generic'

here is the contents of the grub.d folder

Can you please also show the content of the folder /etc/default/grub.d?

The default grub.d is empty

I see here 2 Things:

  1. At first Position the backup Folder
  2. At the last Position the File .script_sources.txt

Could You check the Content of both of this? Open the Files with the Text Editor and see if the File Content is visible.

1 Like

I'm wondering if e.g. grub-customizer could also cause such problems with setting a kernel as default to boot.
@Aravisian

Yes, Grub Customizer could do it, since it writes new values and stores them in a different location.

1 Like

Would you please also post the content of your /etc/default/grub file?

Hi, yes i used Grub Customizer yesterday about 30 minutes after Ponce-De-Leon made his comment at 19:25 yesterday. but this didnt made any difference also.
Whatever caused my problem, it wasn't caused by grub customizer.

.script_sources.txt is empty, it's 0 bytes.

/etc/default/grub

Summary

If you change this file, run 'update-grub' afterwards to update

/boot/grub/grub.cfg.

For full documentation of the options in this file, see:

info -f grub -n 'Simple configuration'

GRUB_DEFAULT="Advanced options for Zorin OS>Zorin OS, with Linux 6.17.0-40-generic"
GRUB_SAVEDEFAULT=saved
GRUB_TIMEOUT_STYLE="menu"
GRUB_TIMEOUT="10"
GRUB_DISTRIBUTOR="( . /etc/os-release; echo ${NAME:-Ubuntu} ) 2>/dev/null || echo Ubuntu"
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
GRUB_CMDLINE_LINUX=""

If your computer has multiple operating systems installed, then you

probably want to run os-prober. However, if your computer is a host

for guest OSes installed via LVM or raw disk devices, running

os-prober can cause damage to those guest OSes as it mounts

filesystems to look for things.

GRUB_DEFAULT="Advanced options for Zorin OS>Zorin OS, with Linux 6.17.0-40-genericGRUB_DISABLE_OS_PROBER=false"

Uncomment to enable BadRAM filtering, modify to suit your needs

This works with Linux (no patch required) and with any kernel that obtains

the memory map information from GRUB (GNU Mach, kernel of FreeBSD ...)

#GRUB_BADRAM="0x01234567,0xfefefefe,0x89abcdef,0xefefefef"

Uncomment to disable graphical terminal

GRUB_TERMINAL="console"

The resolution used on graphical terminal

note that you can use only modes which your graphic card supports via VBE

you can see them in real GRUB with the command `vbeinfo'

#GRUB_GFXMODE="1920x1080"

Uncomment if you don't want GRUB to pass "root=UUID=xxx" parameter to Linux

#GRUB_DISABLE_LINUX_UUID="true"

Uncomment to disable generation of recovery mode menu entries

#GRUB_DISABLE_RECOVERY="true"

Uncomment to get a beep at grub start

#GRUB_INIT_TUNE="480 440 1"

#GRUB_THEME="/usr/share/grub/themes/zorin/theme.txt"
GRUB_DISABLE_MEMTEST="true"

export GRUB_COLOR_NORMAL="light-gray/black"
export GRUB_COLOR_HIGHLIGHT="magenta/black"

But I strongly suspect that grub-customizer is the culprit here.

How is it the culprit when the problem existed before I installed grub customizer?