Artix Linux Forum

Artix Linux => Installation / Migration / Configuration => Topic started by: tom-a on 14 May 2024, 18:29:44

Title: Artix loading error on Qemu (EFI)
Post by: tom-a on 14 May 2024, 18:29:44
Hi all . Please tell me what this error is and how to boot the system?
(https://files.catbox.moe/cyhj7k.png)
Title: Re: Artix loading error on Qemu (EFI)
Post by: MaxLPM on 14 May 2024, 19:53:34
Are you using the secure boot firmware file? I can replicate the error by using the /usr/share/OVMF/OVMF_CODE_4M.secboot.fd file.
Setting it to /usr/share/OVMF/OVMF_CODE_4M.fd works correctly. Also, are you using a GUI for managing the virtual machine?
Title: Re: Artix loading error on Qemu (EFI)
Post by: tom-a on 14 May 2024, 21:53:48
Hello MaxLPM . Thank you for your answer .
After searching for a solution on the Internet for a long time, I found the answer, here https://record99.blogspot.com/2021/12/bdsdex-failed-to-load-boot0001-uefi-bhyve-sata-disk.html
but I have not yet figured out how to copy bootx64.efi during system installation so that this error does not appear after the system starts.

As for loading, I use this command after which I received the error from the screenshot

Code: [Select]
$ qemu-system-x86_64 -bios /usr/share/ovmf/OVMF.fd  -cdrom  artix-base-openrc-20230814-x86_64.iso  -m 2048  -smp 2 -enable-kvm 
Title: Re: Artix loading error on Qemu (EFI)
Post by: MaxLPM on 15 May 2024, 11:59:51
Hm, weird, the qemu command you mentioned works fine on my machine.
What command did you use to install the bootloader?
Title: Re: Artix loading error on Qemu (EFI)
Post by: tom-a on 16 May 2024, 20:18:07
I didn't install the bootloader from the repository, I built Grub that supports argon2id, you can see it here https://forum.artixlinux.org/index.php/topic,6789.30.html

I had no problems installing the bootloader, I used the command:

Code: [Select]
sh-5.2# grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=grub /dev/vda --recheck

Title: Re: Artix loading error on Qemu (EFI)
Post by: MaxLPM on 16 May 2024, 21:12:17
The grub-install command you provided works fine for me, even though it doesn't create the bootx64.efi file. Also, I'm pretty sure that /dev/vda gets ignored if --efi-directory is used.
Maybe try running
Code: [Select]
grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=grub --removable
From the Arch wiki (https://wiki.archlinux.org/title/GRUB#Default/fallback_boot_path):
Quote
Some UEFI firmwares require a bootable file at a known location before they will show UEFI NVRAM boot entries. If this is the case, grub-install will claim efibootmgr has added an entry to boot GRUB, however the entry will not show up in the VisualBIOS boot order selector. The solution is to install GRUB at the default/fallback boot path:
# grub-install --target=x86_64-efi --efi-directory=esp --removable
Edit: just checked, adding --removable creates the /boot/efi/EFI/BOOT/BOOTX64.EFI file, maybe this is what you're looking for?
Title: Re: Artix loading error on Qemu (EFI)
Post by: tom-a on 19 May 2024, 14:57:24
Hello MaxLPM. Thanks for your answer and help. Your advice worked 100%)) Yes, indeed, after adding
Code: [Select]
 --removable
  BOOTX64.EFI was created, I booted again, there was no error and I need to enter a password. After entering the password, the system booted!

I will also make a correction to my test instructions https://forum.artixlinux.org/index.php/topic,6789.30.html

I'll write it here to help others:

Code: [Select]
# mount /dev/sda1   /boot/efi

# grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=grub --removable