HackBGRT icon indicating copy to clipboard operation
HackBGRT copied to clipboard

Faster enabling of an installed, but disabled BGRT

Open Raffo84 opened this issue 6 years ago • 10 comments

In my experience, the BGRT gets replaced by the default during every windows update. As a windows insider on the fast update ring, I get updates pretty much every other week. This means, that my beautiful, custom boot logo only lasts for a few weeks. Having to go through the full installation process every time was getting annoying.

These commits introduce 2 new features:

  1. A new option "E" to re-enable a BGRT, which was found to be installed, but not active (basically the opposite of "D"). It's basically the same as the installation, without opening the config/logo file first.
  2. The very simple possibility to pass the intended keypress as command line argument (without any decoration, literally just "setup.exe E" for example). This will automatically select the given option, and close the program afterwards.

This allows me to quickly enable my nice boot logo after an update through a shortcut.

Raffo84 avatar Mar 22 '18 07:03 Raffo84

I've never had this issue on my HackBGRT setup (also Insider fast). Are you replacing the Microsoft bootmgfw.efi? That's kinda expected.

If you manually add HackBGRT to the EFI partition in its own folder, change the config to point to the bootmgfw.efi and then add it to the EFI boot managers list as first entry (with the Linux efibootmgr command), you won't have this issue. You'll even see the custom boot logo during the reboots that occur while upgrading builds.

sylveon avatar Mar 22 '18 13:03 sylveon

@sylveon Mind giving some help of how to make it standalone without linux?

KorewaKiyo avatar Jun 27 '18 20:06 KorewaKiyo

I haven't found anything that allows to set a EFI boot entry on Windows except for EasyBCD which I am not fond of.

sylveon avatar Jun 27 '18 22:06 sylveon

You're right: HackBGRT gets disabled, and that's annoying.

I think the best way to fix this is to add HackBGRT as a new EFI boot entry instead of replacing the Windows boot loader. That's already on my todo list, but it's not the easiest thing to do (or rather, having a bug could make Windows unbootable).

I deliberately removed E(nable) option from the menu just a few commits ago. Less options makes it easier to use.

Also, I'm sorry to say, but your code is somewhat too messy for my taste (white space and style in general). Did you know that you can actually fix clearly bad commits (git commit --amend) before pushing, instead of making such "Oops..." commits?

Metabolix avatar Jul 11 '18 13:07 Metabolix

Creating a new boot entry alone is relatively safe (as long as you make sure you're not overwriting any existing one), but the behavior of machines with BootOrder is really mixed. For example my laptop straightly ignores it and uses an internally-stored boot ordering. BootOrder is left (and refreshed each boot) only for convenience so the OS can know it.

I've also parsed EFI boot entries before (finalising this and making it into a Windows efibootmgr equivalent is on my backlog), and I agree that it is rather hard to decipher the format.

sylveon avatar Jul 11 '18 20:07 sylveon

@sylveon: If BootOrder is not working, then how do you boot anything else than Windows? Do you have to add everything manually with some vendor-specific tool? What laptop is that?

Metabolix avatar Jul 12 '18 06:07 Metabolix

It's an HP Pavilion. To change the real boot order I have to open my BIOS, go to boot settings. Then in the boot order list, select and open the "OS Boot Manager" entry. It opens a popup with the currently registered EFI bootloaders (that I previously added with efibootmgr). I can then reorganize them with f5, f6 and arrow keys. When I'm done I press f10 to confirm the changes.

sylveon avatar Jul 12 '18 11:07 sylveon

@Metabolix Althought the code is somewhat messy, I'm hoping you can proceed with the functionality as well. I would very much like to have the option to automatically run this program as part of a more elaborate setup of a system.

Thanks for the work!

FireDrunk avatar Sep 22 '18 14:09 FireDrunk

Where can I download it?

Lixuannan avatar Jul 13 '21 01:07 Lixuannan

@Lixuannan

It's only a code, you can, technically, download it, but you'll need to make release (binary executable file) yourself. At this point, I don't think this will ever get merged though...

Msprg avatar Jul 31 '21 07:07 Msprg

Implemented more cleanly in version 2.0.0.

Metabolix avatar Sep 10 '23 20:09 Metabolix