Qubes Booting Errors

Hello, to get straight into it when I boot into Qubes I get the following message “Booting ‘Qubes, with Xen hypervisor’
Loading Xen 4.14.5 …
error: file ‘/xen-4.14.5.gz’ not found
Loading Linux 5.15.94-1.qubes.fc32.x86_64 …
error: you need to load the kernel first.
Loading initial ramdisk …
error: you need to load the kernel first.
Press any key to continue …
Failed to boot both default and fallback entries.
Press any key to continue…”

For some background, I updated my BIOS and I think that removed my bootable option to Qubes so I followed the instructions in my previous post here Can't boot into Qubes I followed that and got Qubes to be in my bootable options but I’m now getting this error. I recently updated from Qubes 4.1.2 to Qubes 4.2.1

Did you upgrade the Qubes OS from Qubes OS 4.1 to 4.2 successfully?
Because based on the booting log the GRUB config have old xen and kernel versions from Qubes OS 4.1.
Did you use the UEFI fallback path by copying the files from /boot/efi/EFI/qubes to /boot/efi/EFI/BOOT and changed filenames grubx64.efi → BOOTX64.efi and grub.cfg → BOOTX64.cfg?
Then it might be that the old GRUB config (BOOTX64.cfg) didn’t get updated after the Qubes OS upgrade.
Check your GRUB config files in EFI partition and files in /boot partition.

Hey there, yes I have successfully upgraded Qubes OS 4.1 to 4.2.1 successfully, I have completed the in place upgrade and restarted a few times making sure I can boot into it.
I don’t think I set the UEFI fallback path, when in rescue mode and going into the shell I tried mounting my /boot and /efi partitions from my usb by doing
mount /dev/sdb2 /mnt
and mount /dev/sdb1 /mnt/ef but they both gave me errors saying that they cannot be mounted, the only commands I ran and worked were
mount /dev/sda2 /mnt
mount /dev/sda1 /mnt/efi
cp /mnt/efi/EFI/qubes/grubx64.efi /mnt/efi/EFI/boot/bootx64.efi
cp /mnt/efi/EFI/qubes/grub.cfg /mnt/efi/EFI/boot/bootx64.cfg
efibootmgr -v -c -u -L "Qubes" -l /EFI/boot/bootx64.efi -d /dev/sda -p 1 reboot
In this situation the sda drive was my 240 gig ssd that has Qubes on it, the sdb from before was my usb.

These commands set up UEFI fallback path (/EFI/boot directory).
So this seems to be your problem.
You can copy the new GRUB config (cp /mnt/efi/EFI/qubes/grub.cfg /mnt/efi/EFI/boot/bootx64.cfg) and see if it’ll fix the issue.

Hey here’s what i did
mount /dev/sda2 /mnt
mount /dev/sda1 /mnt/efi
cp /mnt/efi/EFI/qubes/grub.cfg /mnt/efi/EFI/boot/bootx64.cfg
reboot
All these commands ran without an error but I still received the same error messages in the beginning

What’s the content of these directories after mounting boot and EFI partitions?

ls /mnt /mnt/efi/EFI/qubes

What’s the content of GRUB config? Does it have xen 4.14 and kernel 5.15 or xen 4.17 and kernel 6?
Check these two config files (you can use nano/vi/less/etc instead of cat):

cat /mnt/grub2/grub.cfg
cat /mnt/efi/EFI/qubes/grub.cfg

The contents of /mnt are config files, initrams, grub2, efi, symvers and system maps, the contents of /mnt/efi/EFI/qubes is fonts, grub configs, initram 5.15.94, xen4.17.3

The contents of grub.cfg in /mnt/grub2 seems to be xen 4.17.3 and Linux 6.6.24-1.qubes.fc37.x86_64

I apologize if this seems messy so I have also attached pictures in this reply.



What’s the content of /mnt/efi/EFI/qubes/grub.cfg?

The contents of /mnt/efi/EFI/qubes/grub.cfg is
search --no-floppy --fs-uuid --set=dev 0d1a6bba-0d8b-4c03-b4ea-639ce86be509
set prefix=($dev)/grub2
export $prefix
configfile $prefix/grub.cfg

What’s the content of /mnt/efi/EFI/boot/bootx64.cfg? Is it the same as /mnt/efi/EFI/qubes/grub.cfg?

Yes they are the same

Do you maybe have another EFI partition besides /dev/sda1? Maybe on the same disk or on another disk?

This might sound dumb but I have 2 efi partitions on my windows drive and my usb, I can’t tell for the 240 gig qubes ssd though when I type ‘fdisk -l’ I can’t scroll up to see what its contents are

Remove the old Qubes OS boot entry and add new one:
efibootmgr -v -c -u -L "Qubes OS" -l /EFI/qubes/grubx64.efi -d /dev/sda -p 1
You can see all boot entries using this command:

efibootmgr -v

And remove the specific boot entry using this command:

efibootmgr -b <bootnum> -B
1 Like

It worked, I was able to boot into my qubes installation and can begin working, thank you so much for all your help