/build/static/layout/Breadcrumb_cap_w.png

No Windows Boot Manager after first reboot

I recently created an image that we are going to deploy with KACE. Everything works perfectly except for the first reboot. I noticed that after it reboots the first time that the computer attempts to boot to the network. Upon further investigation I noticed that when I went into the BIOS settings and check the boot order it only listed (in this order) IPv4, IPv6 and Local Hard drive. If I select the local drive then it will boot the OS and from that point on Windows Boot Manager was the first option in the boot order (followed by the other 3). I did another test deploy and verified while still in the KACE boot environment with BCDEdit /enum Firmware and it showed that Windows Boot Manager was the first option. I also checked BCDEdit that the Windows Boot Manager was setup correctly. Has anyone run into this before? This image was setup to only be used on UEFI enabled computers. Below is the Preinstall and Mid Level tasks that I got from a guide on this site for deploying images. The image is sysprepped as well. Laptop is a Dell Precision 7510.

Preinstall Task

(
ECHO select disk 0
ECHO clean
ECHO convert gpt noerr
ECHO create partition efi size=200
ECHO assign letter=s
ECHO format quick fs=FAT32
ECHO Create partition msr size=128
ECHO create partition primary
ECHO assign letter=c
ECHO format quick fs=NTFS
ECHO exit
)>X:\Windows\System32\UEFI.txt
diskpart /s X:\Windows\System32\UEFI.txt

Mid Level Task

@echo off
for %%I in (Z W V U S R Q P O N M L K J I H G F E D C) do (
if exist %%I:\WINDOWS if not exist %%I:\SOURCES\BOOT.WIM set WINDOWS_DRIVE=%%I:
)
bcdedit /createstore x:\emptystore
bcdedit /import x:\emptystore /clean
bcdboot %WINDOWS_DRIVE%\windows /s s: /f UEFI
bcdedit /store S:\efi\microsoft\boot\bcd /set {bootmgr} device partition=s:
bcdedit /store S:\efi\microsoft\boot\bcd /set {memdiag} device partition=s:
bcdedit /store S:\efi\microsoft\boot\bcd /set {default} device partition=%WINDOWS_DRIVE%
bcdedit /store S:\efi\microsoft\boot\bcd /set {default} osdevice partition=%WINDOWS_DRIVE%
Bcdedit /store S:\efi\microsoft\boot\bcd /set {FWbootmgr} displayorder {Bootmgr} /addfirst
bootsect /nt60 s:



2 Comments   [ + ] Show comments
  • "This image was setup to only be used on UEFI enabled computers. "


    How is this statement true?

    What partitions are inside this Image?

    Are you deploying to UEFI devices as well? - Channeler 4 years ago
  • The image was captured with a C and S partitions. I had originally followed a guide here about capturing an image with a single partition so that it could be applied to both BIOS and UEFI computers. But it seemed to have issues deploying. Our environment doesnt have any computers that cant do UEFI, in fact its a standard to switch our laptops to UEFI. So I modified the Pre and Mid scripts to only worry about setting up the deploy as UEFI. - fletch8527 4 years ago

Answers (2)

Answer Summary:
Posted by: fletch8527 4 years ago
White Belt
1

Top Answer

I was finally able to fix this issue.

TL:DR I needed to add bcdedit /enum firmware to the Post-Apply script after the other bcdedit commands.

We are using Dell computers and they have a program (cctk.exe) that allows the BIOS to be manipulated from Windows (or PE in this case). During my troubleshooting I was running cctk.exe bootorder --bootlisttype=uefi that would list what the BIOS would have for boot options. bcdedit /enum firmware should have done the same thing. I noticed that after the image was deployed and all scripts ran, but before it restarted for the first time that the cctk command would show no boot options but bcdedit /enum firmware would show the correct options. Then I ran the cctk command again and suddenly it showed Windows Boot Manager as the first boot option. I then updated the Post Apply script to include that bcdedit command and everything worked as expected. Seems that this might be a Dell BIOS/Firmware issue where the BIOS doesnt know of any boot options but when bcdedit queries the BIOS/Firmware for its options the BIOS its able to locate them and then updates itself. Just a guess but its working for me now.


Comments:
  • Hey fletch8527,

    Will you be able to share the complete script that you used and fixed this issue?

    Looks like we have the same problem here with Dell's after are imaged the Windows Boot Manager is not pre-selected on the BIOS. We as well capture C: and S: partitions and our environment deploys fully UEFI Windows 10 images.

    Thanks in advance! - horacior 3 years ago
Posted by: Miller.Deng 2 years ago
White Belt
0

<p>Here is the powershell to got the bootmgr&nbsp; identifier guid:

$boomgr=bcdedit.exe /store s:\efi\microsoft\boot\bcd /enum "{bootmgr}" /v
  $newguid=($boomgr |Select-String -Pattern '^identifier')
  $guid= $newguid.ToString().Replace('identifier','').Trim()
  bcdedit.exe /set "{fwbootmgr}" displayorder $($guid) "{bootmgr}"
  bcdedit.exe /set "{fwbootmgr}" displayorder "{bootmgr}" /addfirst
</P>

Don't be a Stranger!

Sign up today to participate, stay informed, earn points and establish a reputation for yourself!

Sign up! or login

Share

 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ