[arch-general] efibootmgr doesn't change boot order!
Marc Ranolfi
mranolfi at gmail.com
Thu Jan 21 17:48:26 UTC 2021
Some motherboards will boot the file
'/boot/efi/EFI/Microsoft/Boot/bootmgfw.efi' if it is present, regardless of
what is set elsewhere. This is an incredibly weird behavior but I've seen
it (my MB is an example).
My workaround is to rename this file to 'bootmgfw.efi.bkp' and configure
GRUB to load that file when I opt to boot Windows natively.
Since most, if not all Windows updates will restore that file, I also have
bash and powershell scripts to revert it so that my workaround keeps
working.
On Mon, Dec 28, 2020 at 10:10 AM Maarten de Vries via arch-general <
arch-general at archlinux.org> wrote:
> Hey,
>
> On 28-12-2020 12:12, Peter K Haokip wrote:
> > thanks for the reply,
> > I am able to change the boot order from the BIOS menu. It works
> > A-okay from there, I am trying to accomplish that with efibootmgr.
>
> If you're unlucky, maybe the motherboard firmware prevents you from
> doing that. You could fall back to adding chain-load entries for grub in
> that case, to have grub start the next bootloader.
>
>
> > could you cite any link where I could read about it in details ? where
> > the bootx64.efi file will be stored if I install it in NOT IN PORTABLE
> > mode(?)? cuz that would help me know whether the grub is installed in
> > portable or none portable mode.
>
> You can add boot entries for any EFI executable on the EFI system
> partition, regardless of the name. These boot entries are stored on
> non-volatile storage on the motherboard. Normally, grub-install takes
> care of this, and the binary is installed as `efi/grub/grub.efi`. All
> you need to do is not pass `--removable` to grub-install.
>
> You would install a bootloader as `efi/boot/bootx64.efi` only if you
> want to create a bootable USB stick, or if your motherboards UEFI
> implementation is so broken that that's the only thing that works.
>
> > Also, would be nice if you could provide any source where I can read
> > about how I make my motherboard detect regular boot entries (instead
> > of the /Efi/boot/bootx64.efi)
> >
> You can find everything in the specifications if you dig deep enough:
>
> https://uefi.org/specifications
>
> See in particular section 3.5.1.1 on "Removable Media Boot Behavior" of
> the "UEFI Specification Version 2.8":
>
>
> https://uefi.org/sites/default/files/resources/UEFI%20Spec%202.8B%20May%202020.pdf
>
>
> Regards,
>
> -- Maarten
>
> >
> > thanks,
> >
> >
> > On Mon, 28 Dec 2020, 15:45 Maarten de Vries, <maarten at de-vri.es
> > <mailto:maarten at de-vri.es>> wrote:
> >
> > On 28-12-2020 10:42, Peter K Haokip via arch-general wrote:
> > > I read an forum entry from nearly 6 years ago about am
> > efibootmgr bug that
> > > Doesn't let you change the boot order on a multi OS system if
> > you have arch
> > > linux as the default OS. Had some users report this as well in
> > other
> > > forums.
> > > Now i am facing the that problem in my system with arch ubuntu
> > and windows.
> > >
> > > when i change the boot order , it shows the change 'temporarily'
> > but when i
> > > restart it boots the default (Arch linux Grub ) and the change
> > disappears.
> > >
> > > I faced this issue last month and gave up on it since I couldn't
> > find any
> > > detailed resource on this on the net.
> > > This list may be my last hope.
> > >
> > > If anybody could give some direction , would be much appreciated.
> > >
> > > regards,
> > > khaithang39
> >
> > Hey,
> >
> > It could be a motherboard problem. Sadly I've seen more motherboards
> > with weird bugs in their UEFI implementation than without. You
> > could try
> > to change the boot order through the motherboard firmware interface
> > (often called "the BIOS" even if that isn't technically correct
> > anymore)
> > and see if that helps.
> >
> > Another thing that may have happened is that you installed grub as
> > portable bootloader. It will be called `efi/boot/bootx64.efi` on
> > the EFI
> > system partition if that happened. A bootloader under that name is
> > auto-detected by the motherboard, even if you didn't add a boot entry
> > for it manually. Perhaps your motherboard always favors such
> > bootloaders
> > over the normal boot entries.
> >
> > If this is the case, you could install grub as non-portable
> > bootloader
> > by not passing `--removable` to `grub-install`, and then delete
> > `efi/boot/bootx64.efi`. Alternatively, you might also be able to
> > configure your motherboard to prefer regular boot entries before
> > running
> > `bootx64.efi` from that partition.
> >
> > I hope this helps,
> >
> > -- Maarten
> >
>
More information about the arch-general
mailing list