• Recent
    • Unsolved
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    Windows 11 -- Changes boot order priority following image deployment.

    Scheduled Pinned Locked Moved
    General
    3
    3
    444
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • L
      LiamRetrams
      last edited by LiamRetrams

      I have a setup with Fog w/ PxE booting over UEFI and image deployments + domain joins – all working perfectly.

      Our systems are mostly whiteboxes (i.e Gigabyte / Asus motherboards) with i9-14900K and NVMe SSD Boot drives.

      Typically, we’d get a system, set its boot order in the BIOS/UEFI config to UEFI: PXE over IPv4 and then leave it. That way, way, the fog agent can reboot the system which in turn causes it to boot over PxE and pull down the latest image which was all working fantastically.

      Unfortunately, the latest round of systems we have appear to have an annoying quirk where following image deployment, the first reboot goes via PxE, then windows does its initial boot “OOBE” setup, - and finally, it reboots a second time. After that second reboot, Windows Boot Manager becomes teh #1 boot device (i.e. PXE Boot removed from the primary boot order). Which means I can no longer re-image the system – if I task something via Fog, the system just gets stuck in a reboot loop because it the fog agent reboots it and the system goes straight into windows without PxE booting.

      Is there any easy way to resolve this? Can I maybe modify my image to prevent windows from shotgunning the boot order like that? Interestingly, once booted, if I type bcdedit /enum /raw I do not see PXE boot in the order. Just Windows Boot Manager and WindowsBoot Loader

      So far, I’ve tried disabling “Fast Boot” which worked for our last round of systems and also password-protecting the BIOS but windows still meddles with it.

      Any guidance on how to resolve this would be extremely helpful!

      george1421G JJ FullmerJ 2 Replies Last reply Reply Quote 0
      • george1421G
        george1421 Moderator @LiamRetrams
        last edited by

        @LiamRetrams I can’t give you the exact steps to solve this but I can point you in a direction.

        You will need to solve this in the windows realm. Once oobe starts FOG imaging is out of the picture so we can’t do anything in a post install script. You will need to use the bcdedit commands from inside windows to reset the boot order. You should be able to do this within the startupcomplete.cmd batch file or using the unattend.xml file in the first run section, or possibly deploy a fog snapin to run a batch file with the bcdedit commands.

        I would manually reset the boot order to the way you want it then from within windows use the bcdedit commands to look at how it is ordered via bcdedit. That should give you the structure of what you need to do with the bcdedit commands to rebuild that format on a different system.

        Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG!

        1 Reply Last reply Reply Quote 0
        • JJ FullmerJ
          JJ Fullmer Testers @LiamRetrams
          last edited by JJ Fullmer

          @LiamRetrams I recently published a function related to this in my FogApi Powershell module (see my signature)

          I posted an example of using it in a snapin to change a host’s boot order to pxe boot as the first boot option

          https://forums.fogproject.org/topic/16784/powershell-snapin-no-output-non-error?_=1729112272355

          as @george1421 stated this is a windows issue, part of the oobe process involves changing the boot order. But you can utilize bcdedit to fix it. I’ve made an attempt at creating a universal option with my Set-WinToBootToPxe function, It works for me on some Asus motherboard based systems, I’d be very interested to hear if it works on custom Gigabyte builds as well.

          See also

          • https://github.com/darksidemilk/FogApi/blob/master/FogApi/Public/Set-WinToBootToPxe.ps1
          • https://fogapi.readthedocs.io/en/latest/commands/Set-WinToBootToPxe/
          • https://github.com/darksidemilk/FogApi/blob/master/FogApi/Public/Get-WinBcdPxeID.ps1
          • https://fogapi.readthedocs.io/en/latest/commands/Get-WinBcdPxeId/

          Have you tried the FogApi powershell module? It's pretty cool IMHO
          https://github.com/darksidemilk/FogApi
          https://fogapi.readthedocs.io/en/latest/
          https://www.powershellgallery.com/packages/FogApi
          https://forums.fogproject.org/topic/12026/powershell-api-module

          1 Reply Last reply Reply Quote 0
          • 1 / 1
          • First post
            Last post

          196

          Online

          12.0k

          Users

          17.3k

          Topics

          155.2k

          Posts
          Copyright © 2012-2024 FOG Project