Cannot boot to native fedora-42 kernel

I am trying to create a qube based on Fedora 42 that uses its own kernel, rather than the kernel provided from dom0. This is supposed to be a template qube, but for the sake of simplicity, I tried to create a standalone VM as well, with the same result: the qube doesn’t boot.

What I did:

  1. Change the virtualization mode to HVM
  2. Set to use kernel “provided by qube”
  3. Start the qube – it does respond within 60 seconds.

I am using Qubes r4.3. I tried this procedure using the following standard templates as base: fedora-42-xfce, fedora-42, with the same result: the qube becomes unbootable. It becomes bootable again when I change the kernel to use to the one provided by dom0.

I also tried this procedure with the standard Debian templates (e.g. debian-13-xfce) and the Debian-based StandaloneVM, when set to use its own native kernel, boots just fine.

Am I missing some important steps with Fedora templates?

I have found a similar post on this forum from 3 years ago, but the solution that worked for the poster back then does not work in my case.

@otter2 is currently rewriting the documentation page about this. Maybe it’s worth trying to follow the current preview?

2 Likes

Thanks @parulin for the tip, though the current version still claims that the steps I performed should be enough to use the standard kernel provided by the template, see section Using kernel installed in the VM.

I see that there are changes to instructions for using non-default kernel, like running grub2-install /dev/xvda and grub2-mkconfig -o /boot/grub2/grub.cfg, which I also did, just to be sure, but it didn’t help. Maybe the documentation is still a WIP, I’ll be checking later again, in case anything changes.

BTW, are you somehow able to create a bootable Fedora 42 based qube with a native kernel?

1 Like

Yes, here’s the essence of what I used, first:

prepare-template:
  pkg.installed:
    - names:
      - qubes-kernel-vm-support
      - kernel
      - grub2-pc
  cmd.run:
    - names:
      - grub2-install /dev/xvda
      - grub2-mkconfig -o /boot/grub2/grub.cfg
    - requires:
      - pkg: prepare-template

And then:

create-qube:
  qvm.vm:
    - name: fedora-42-minimal-cuda
    - prefs:
      - label: blue
      - vcpus: 4
      - memory: 4000
      - maxmem: 0
      - virt_mode: hvm
      - kernel:
    - features:
      - set:
        - menu-items: qubes-run-terminal.desktop

It is based off of fedora-42-minimal

Maybe you forgot to disable memory balancing and give it some more memory (more than the default 400)? Happens to me all the time

p.s. There is no difference between grub2 and grub2-pc on fedora, it installs grub2-pc in both cases

2 Likes

Yes! Thanks! That was it. The qube starts now OK.

1 Like