Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

efi, BOOTX.efi unbootable, but grubx64.efi is

If none of the specific sub-forums seem right for your thread, ask here.
Post Reply
Message
Author
MagicPoulp
Posts: 431
Joined: 2018-11-05 21:30

efi, BOOTX.efi unbootable, but grubx64.efi is

#1 Post by MagicPoulp »

After installing debian on usb,

I must choose between grub-install --removable or --force-extra-removable

Which one is best?

they say it installs in BOOTX.EFI.

this is the one that is autodetected by the bios when connecting the USB. But it does not boot even if either --removable or --force-extra-removable was used.
And I did not forget to use update-grub.

it picks /EFI/boot/BOOTX.EFI
And during the startup it gives the error below before rebooting
System BootOrder not found.

So manually, I have to pick /EFI/boot/grubx64.efi, and it works.
---------> Can I remove all the stuff in /EFI/boot except the grub.cfg and grubx64.efi?
Then perhaps the bios can only detect the one that works.

p.H
Global Moderator
Global Moderator
Posts: 3049
Joined: 2017-09-17 07:12
Has thanked: 5 times
Been thanked: 132 times

Re: efi, BOOTX.efi unbootable, but grubx64.efi is

#2 Post by p.H »

AFAIK, --force-extra-removable is just the combination of normal and removable path install :

Code: Select all

grub-install # installs as /EFI/debian/shimx64.efi or grubx64.efi and registers in EFI boot variables
grub-install --removable # installs as /EFI/Boot/bootx64.efi without registering in EFI boot variables
It should be bootx64.efi, not bootx.efi.

By default with Debian 10 (with secure boot packages), bootx64.efi is shimx64.efi. Without secure boot (or with --no-uefi-secure-boot), it is grubx64.efi. grubx64.efi alone won't boot if secure boot is enabled in the UEFI options.

MagicPoulp
Posts: 431
Joined: 2018-11-05 21:30

Re: efi, BOOTX.efi unbootable, but grubx64.efi is

#3 Post by MagicPoulp »

Yes I meant BOOTX64.

I reinstalled using --force-extra-removable, with the right chroot and with update-grub.

I removed all extra boot entries in the bios. Then connecting the usb makes the bios add a new boot entry on its own. And it points to BOOTX64.
When I try to boot on it, I get the error above.

Can I remove BOOTX64?
Can it be made bootable?

MagicPoulp
Posts: 431
Joined: 2018-11-05 21:30

Re: efi, BOOTX.efi unbootable, but grubx64.efi is

#4 Post by MagicPoulp »

Here they suggest renaming grubx64 to BOOTX64

https://unix.stackexchange.com/question ... 336#519336

Then perhaps I get a system that only boots without secure boot. But I am fine with that.
changing secure boot in the bios is much simpler than having to pick a specific boot loader in the boot sequence if the default one does not boot.

I am still interested if you know about this below, wher e I mea nthe BOOTX64 installed by grub:
Can I remove BOOTX64?
Can it be made bootable?

WHen I got the error I reported with bootx, it also mentioned shimx64.
So maybe grubx64 only boots in non secure boot mode. And shimx only boots in secure boot mode. And bootx64 would map to shimx. I am not sure, just speculation. But tha tis a reasonable explanation why somethign standard isntalled by grub would not work.

I need to try putting secure boot on, it was always off so far. I will try.

MagicPoulp
Posts: 431
Joined: 2018-11-05 21:30

Re: efi, BOOTX.efi unbootable, but grubx64.efi is

#5 Post by MagicPoulp »

To conclude,

I picked force-extra-removable since it seems to do a little more and this is what the debian installer has.

force-extra-removable, or only removable, and secure boot or not, the bootx64.efi is not bootable.

Therefore, I copied the grubx64.efi over the bootx64.efi. So when the bios needs to pick one and does not know, it now picks something that can boot.

I do not really understand why bootx64 is not bootable. Maybe my BIOS is special. The debian install say they have lots of buggy firmwares in the market.

I did the maximum. I would have preferred to understand why bootx64 is not bootable. But since it is not bootable I cannot keep it. I had to override it.

MagicPoulp
Posts: 431
Joined: 2018-11-05 21:30

Re: efi, BOOTX.efi unbootable, but grubx64.efi is

#6 Post by MagicPoulp »

I found the spec:
https://uefi.org/sites/default/files/re ... _Feb14.pdf

and the source code of Grub. I will dig to know why the bootx64 so different.
apt-get source grub2-common

MagicPoulp
Posts: 431
Joined: 2018-11-05 21:30

Re: efi, BOOTX.efi unbootable, but grubx64.efi is

#7 Post by MagicPoulp »

reading grub-install.c, I was wrong. --removable is preferable for what I do. There are many differences.

force-extra-removable is when one wants to fill in the place dedicated for removable, to ensure it always boots on buggy firmwares. But it is not really for a removable media.


removable is not just picking a file name it also changes the content of the signed_image.

Post Reply