[MSI PRO H610M-E DDR4] Cannot boot Qubes after a successful installation

problem : Cannot boot Qubes after a successful installation. There is a problem with booting Qubes 4.1.2 after an installation marked successful by the installer. After installation efibootmgr -v shows : boot 0000* Qube OS and boot 0001* usb drive but after rebooting " boot 0000* Qube OS" disappears and I am directed straight to the bios.

my setup:

  • Intel Core i3-12100 (With integrated graphics Intel UHD Graphics 730)
  • MSI PRO H610M-E DDR4 (bios updated to the latest version AA0)
  • memory Samsung 16x2 (32gb)
  • m.2 ssd Samsung 970 EVO Plus 512 gb
  • usb flash drive 64 gb

setup preparation:

  1. Installed a clean win 10. I ran a stress test on the PC components for more than 2 hours. The stress tests showed no problems with the components. Next I tried to install the actual distributions fedora 38/ubuntu 22/debian 12. All installed with no problems and no visible performance issues.
    2)A)Reset UEFI to default. B) Disable Secure Boot. C) Checked Enable VT-x(d) and ssd has the first boot priority.
    3)writing to usb Qubes-R4.1.2 using rufus 3.22.2009(also test rufus 4.1.2045) according to the guide.
    4)install qubes os using last kernel 6.1.12-1.qubes.fc32

installation result:
I have tried different types of installation: “media test and install” and “install using the latest kernel” Both options lead to the same result.
The installation is successful and without error messages. I click on the suggested reboot.
After reboot Qubes doesn’t boot. Instead I get to the bios automatically (ssd hard drive is available in the bios). After rebooting, I am redirected straight to the bios menu instead of loading the GRUB menu.

TROUBLESHOOTING::
Based on my problem, I conclude that my situation falls under “Boot device not recognized after installation”. Then I found a thread on the forum with a similar problem (link).
Then I tried to repeat the solutions suggested in the thread.
I did a clean install of 4.1.2 using the latest kernel (default settings, auto disk configuration). The installation was successful and completed with no visible errors. Next I start working with the console .
The efibootmgr -v shows :
boot 0000* Qube OS
boot 0001* usb drive.
lsblk shows:
/dev/nvme0n1p1 600 mb efi /mnt/sysroot/boot/efi
/dev/nvme0n1p2 1gb linux /mnt/sysroot/boot
/dev/nvme0n1p3 465 gb linux sustem

Next I try repeating the commands from the thread:
mount /dev/nvme0n1p1 /mnt
mount /dev/nvme0n1p2 /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/boot/bootx64.cfg
efibootmgr -v -c -c -u -L “Newqubeboot” -l /EFI/boot/boot/bootx64.efi -d /dev/nvme0n1 -p 1
reboot

When I try to repeat the cp commands I get a response:
cp:cannot stat ‘…grubx64.efi’ no such files or directory
cp:cannot stat ‘…grub.cfg’ no such files or directory

What can be the error ?

This might be a problem with MSI motherboards, since I have had the same issue.

It seems that those partitions are already mounted. You can confirm that this is the case with something like ls /mnt/sysroot/boot, which should display some files.
If that is the case, try these commands:
rm -r /mnt/sysroot/boot/efi/EFI/BOOT (type this correctly, so you don’t accidentally delete more than needed; if it gives you a no such file or directory, that is fine)
cp -r /mnt/sysroot/boot/efi/EFI/qubes /mnt/sysroot/boot/efi/EFI/BOOT
mv /mnt/sysroot/boot/efi/EFI/BOOT/grubx64.efi /mnt/sysroot/boot/efi/EFI/BOOT/BOOTX64.efi
After this, it should boot, even without running any efibootmgr command. If this does indeed work, you’ll have to run these commands (with different paths of course) on every dom0 update, so you boot with the latest kernel and Xen versions.

EDIT: fixed first command

2 Likes

Thanks for the solution. I was able to fix it on the first try. The system works correctly.

Hi everyone. I installed a clean version of os 4.2 and encountered the problem again. The system installs correctly, but the first system startup does not happen. efibootmgr -v shows only the usb image of the OS. The options from the previous post and the official faq did not help to find a solution.
“cp -r /boot/efi/EFI/qubes/. /boot/efi/EFI/BOOT” or "cp -r /mnt/sysroot/boot/efi/EFI/qubes /mnt/sysroot/boot/efi/EFI/BOOT "
Produce results: no such file or directory

What do I need to do to solve the problem?

Add the boot entry using efibootmgr:

1 Like

Followed the command as instructed. After rebooting qubes UEFI record disappears.

Then try this:

mkdir /mnt/efi
mount /dev/nvme0n1p1 /mnt/efi
cp -r /mnt/efi/EFI/qubes/* /mnt/efi/EFI/BOOT/.
mv /mnt/efi/EFI/BOOT/grubx64.efi /mnt/efi/EFI/BOOT/BOOTX64.efi
mv /mnt/efi/EFI/BOOT/grub.cfg /mnt/efi/EFI/BOOT/BOOTX64.cfg
1 Like

Thank you! It worked.