How can I revert back to the previous dom0 kernel?

I upgraded dom0 to kernel-latest to fix a shutdown problem, but now the sound doesn’t work anymore. I have no sound coming out of the laptop! The driver and alsamixer work and I can see that sound is detected, but it’s not coming out the of the speakers.
Now I want to revert back to the previous kernel. kernel-1000:5.15… is already installed. How can I choose that now, instead of kernel-latest?

This links to a section describing how to select a different kernel at boot time:

https://www.qubes-os.org/doc/how-to-install-software-in-dom0/#changing-default-kernel

2 Likes

Thank you for your reply.
Prior to posting my question on this forum, I had attempted
sudo nano /boot/efi/EFI/qubes/xen.cfg
My system is UEFI. But I got an empty document for xen.cfg. There’s no [global] section at the top, or a default= line.
This leaves me with the Grub2 option.
I guess I should try that option. I would need to modify this line:

GRUB_DISABLE_SUBMENU=false

and Add this line:

GRUB_SAVEDEFAULT=true

Then run

sudo grub2-mkconfig -o /boot/grub2/grub.cfg

And reboot.
I will backup my computer prior to doing this and see if it will work.

nevermind, sorry

You can also uninstall kernel-latest via dnf in dom0. Just make sure you keep kernel installed.
You can always check via e.g. dnf list | grep kernel what kernels you have installed.

There’s also kernel-510 for the 5.10 LTS line, if you prefer that. If you need to install a specific kernel version, I’m not sure whether there’s an easy way for that.

At boot you can select installed kernels from GRUB as previously mentioned already.

I’ve been losing sound the past few days too. I wasn’t sure why though. I have to switch the output device back and forth a few times until it works, but it’s only good for the open vm or until I put the computer in suspend.

sudo nano /boot/efi/EFI/qubes/xen.cfg seems to be an old instruction for R4.0: Cannot boot into Qubes 4.1 - what has changed in 4.1 boot routine (UEFI)? - #5 by icequbes1

When using the Grub2 option on R4.1 with UEFI, I do see multiple boot options for different kernel versions. However, when I try to boot any of these, I get:

Loading Xen 4.14.6.config
error: no multiboot header found
Loading Linux 6.5.8-1.qubes.fc32.x86_64 *(or any other installed version)*
error: you need to load the kernel first
Loading initial ramdisk
error: you need to load the kernel first

It seems to me default kernel is already loaded by EFI, so the Grub2 option does not work because I use EFI boot.
The linked post above mentions that for 4.1, you can simply edit the boot entry by hitting e during boot. First of all, that’s not really a solution because then you have to do that every boot. Secondly, when I manually change all displayed kernel versions to another installed kernel version, the system freezes at the disk password screen.

Does anyone know how to change dom0 kernel versoin on R4.1 with EFI?

When you get to the Grub boot screen, you select the advanced menu from there you can select any kernel installed in /boot.

I tried that already, then I get the errors in my post above.

As fare as I know, it means the boot files can’t be found or are corrupt.

Did you try to manually edit the cfg file?

But even my current kernel won’t load if I choose it from that menu.

Which one?

In 4.1 with UEFI it’s /boot/efi/EFI/qubes/grub.cfg and for legacy bios /boot/grub2/grub.cfg

/boot/efi/EFI/qubes/grub.cfg shows this at the top:

# DO NOT EDIT THIS FILE
#
# It is automatically generated by grub2-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub

Would it work then? And what exactly would I need to edit to change default dom0 kernel?

Edit /etc/default/grub and regenerate grub config with:

grub2-mkconfig -o /boot/efi/EFI/qubes/grub.cfg

I did that.

GRUB_DISABLE_SUBMENU=false
GRUB_SAVEDEFAULT=true

Was already in /etc/default/grub
After running grub2-mkconfig -o /boot/efi/EFI/qubes/grub.cfgand rebooting, I still get the same errors when trying to choose another kernel version at boot.

Do you have initramfs and vmlinuz files for this kernel version in your /boot partition?
Maybe they are missing or corrupted (compare the file size with the working kernel version files).
You can try to regenerate initramfs in dom0 terminal with:
sudo dracut -vf --regenerate-all
If your initrafms files are missing or corrupted.
You can also try to reinstall grub:

grub2-install --efi-directory=/boot/efi

Yes I have them, and normal file size.

I don’t think that’s the issue. When I take the default boot option, it boots fine with 6.5.8-1, but if I go to the advanced selection, and select any version (including 6.5.8-1) I get these errors. If there as something wrong with the 6.5.8-1 files, then why would it boot fine with the default boot option?

Check the differences between default boot option and advanced boot option in grub config.

It seems I didn’t look far enough :sweat_smile: Sorry for not looking properly.
When I choose the advanced boot option, I have 2 options:
Qubes with Xen 4.14.6 and Qubes with Xen 4.14.6.config

When I choose either of them, then I can choose the kernel version. I first found the multiple kernel choices under Xen 4.14.6.config, those are the ones who don’t work.

If I take the other option, the other kernels do boot properly.
That leaves me with 2 questions:

  1. What is the .config option meant for and why does it not seem to work?
  2. While the other options do work, it still doesn’t set another kernel version as default, so I still have to select it everytime.Why doesn’t GRUB_SAVEDEFAULT=true work?

The .config file is the config file in /boot that tells you how that version of Xen was compiled.

GRUB_SAVEDEFAULT=true only works if you have configured grubenv correctly, that is the location grub uses to store the information about the kernel you selected, without it the data is not persistent between boots.