UNSOLVED Windows 10 change BIOS boot order after deploy

  • Hello,

    FOG work ok. Capture and deploy works fine.

    My BIOS (UEFI) boot order:

    1. PXE IPv4 Intel
    2. SSD M.2 Windows loader

    After deploy Windows 10 Pro x64 to PC (HP Z2 Tower G4 Workstation), change BIOS boot order to:

    1. SSD M.2 Windows loader
    2. PXE IPv4 Intel

    How to prevent change BIOS boot order after deploy?

    Thank you for your advice

  • @Valer i know that some bios let the „windows boot manager“ always go on position 1 if found afaik this can be turned off to keep your current order:


    Regards X23

  • Moderator

    This may be useless information at the moment, but I’m going to post it here for completeness.

    1. I deployed a Dell 7010 today. The system is/was in uefi mode but I had to deploy the image in bios mode because in uefi mode iPXE will never finish initializing the devices. In this configuration the Windows Boot manager was not installed in the firmware and I had to go in manually and select the hard drive for booting. I can understand why this seems a bit broken but in this case FOG didn’t change the boot order.
    2. When I was working on another project I know that efibootmgr (linux utility) can be used to modify the uefi boot order. So it may be possible to write a postinstall script to change the order to what ever order you need (if its fog that is changing the boot order and not windows). At this time I don’t know if the efibootmgr is compiled into the inits or I grabbed it from a centos install when I was testing the project.

    And in the fwiw bucket, the dell cctk was mentioned below. There is a linux version of cctk that again could be used in a postinstall script. But that would be a dell hardware specific tool, where the efibootmgr would be hardware agnostic.

  • Testers

  • Testers

    My workaround for this happening was to use refind as my default bootloader, which I configure before capturing the image and then again after I deploy the image in scripts to ensure it sticks. That way I have a boot menu that I can pick between windows, fog (required copying latest ipxe.efi file to each machine’s uefi partition), and even options for uefi shell and uefi firmware settings without any special keystrokes. I find it gives a nice balance between faster boot time for users and flexibility in support.

    I am fairly sure this is a ‘feature’ of windows 10 with the intent of helping users that had changed their boot order to boot to install media and then don’t have to worry about going back into the bios settings and changing it to the new boot manager.
    When I get a moment (like that will ever happen) I’ll try to universalize my bootmgr configuration powershell functions a bit and share them. Probably will put them in the fog community scripts git or add them to my fogAPI module, the former might make more sense, so they’re findable outside of a single blog post. If I remember I’ll try to make some time to do that tomorrow.

  • Hi,
    Same problem here with Windows 10 and UEFI.
    If you have Dell Computers see solution here with Powershell Script and tools Dell Command Configure :

  • Moderator

    Its not clear at this time if fog is doing this or Windows playing with the boot order. I know in uefi mode windows can do this, but not in bios mode.

    What I want you to do is set the boot order like you want it then schedule a deploy to this computer but tick the checkbox to shutdown after deployment.
    Go ahead and deploy to this computer.
    After the computer shuts down, power it up and immediately go into the firmware and confirm the boot order before the deployed OS boots the first time.

    With that info we can think about the next steps.

    Also what version of FOG are you running, that may have an impact on the next steps.

  • Senior Developer

    @Valer As far as I know the UEFI firmware itself must be doing this change. Some UEFIs do some kind of magic enumerating and re-ordering the loaders. It’s definitely not something FOG is doing. Yeah, most probably the deployment is triggering it but it’s not actually doing it!

    How to prevent change BIOS boot order after deploy?

    See if you can find out more about this in your mainboard/UEFI firmware manual! As well you might want to look into other tools that do boot loader settings for you after the deploy. @JJ-Fullmer has good knowledge on this kind of things.