Menu
Modern Workplace Blog
  • Home
  • About: Kenneth van Surksum
  • Cookie Policy
Modern Workplace Blog
October 22, 2019October 22, 2019

Litetouch deployment failed, Return Code = -2147467259 0x80004005 when installing Surface Pro 6 devices using MDT

TL;DR; – When reinstalling Windows on a Surface Pro 6 and it fails, make sure that you “temporarely” disable the ” Enable boot configuration lock” option and try again.

At one of my customers we are using MDT to install Surface Pro 6 devices in order to make sure that the latest version of Windows 10 is available when starting the Out of the Box Experience (OOBE).

While testing this solution, we experienced some machines starting to fail to install Windows 10, where MDT would exit with the following error code:  Litetouch deployment failed, Return Code = -2147467259  0x80004005

Time for a deepdive:

Within MDT, the LTIApply.wsf script is responsible for applying the WIM image to the system, the logging (LTIApply.log) stated the following:

The image D:\Deploy\Operating Systems\REFW10-001_10-2-2019\REFW10-001_10-2-2019.wim was applied successfully. LTIApply 16-10-2019 16:54:40 0 (0x0000)
Find the boot drive (if any) [True] [10.0.18362.329] [False] LTIApply 16-10-2019 16:54:40 0 (0x0000)
New ZTIDiskPartition : \MININT-RU22TRD\root\cimv2:Win32_DiskPartition.DeviceID=”Disk #0, Partition #0″ \MININT-RU22TRD\root\cimv2:Win32_LogicalDisk.DeviceID=”V:” LTIApply 16-10-2019 16:54:40 0 (0x0000)
New ZTIDisk : \MININT-RU22TRD\root\cimv2:Win32_DiskDrive.DeviceID=”\\.\PHYSICALDRIVE0″ LTIApply 16-10-2019 16:54:40 0 (0x0000)
Found bootable drive (No Boot File Test) [ V: ]: \MININT-RU22TRD\root\cimv2:Win32_LogicalDisk.DeviceID=”V:” LTIApply 16-10-2019 16:54:40 0 (0x0000)
Ready to Prepare boot partition: V: LTIApply 16-10-2019 16:54:40 0 (0x0000)
Property UILanguage is now = en-US LTIApply 16-10-2019 16:54:40 0 (0x0000)
About to run command: cscript.exe //nologo “D:\Deploy\Scripts\ztiRunCommandHidden.wsf” “”D:\Deploy\Tools\X64\BCDBoot.exe” F:\windows /l en-US ” LTIApply 16-10-2019 16:54:40 0 (0x0000)
Command has returned: 19 LTIApply 16-10-2019 16:54:41 0 (0x0000)
FAILURE ( 5616 ): 19: Verify BCDBootEx LTIApply 16-10-2019 16:54:41 0 (0x0000

As you can see the command being executed was: cscript.exe //nologo “D:\Deploy\Scripts\ztiRunCommandHidden.wsf” “”D:\Deploy\Tools\X64\BCDBoot.exe” F:\windows /l en-US  “

So instead of the “0x80004005” error code the error became a little bit more specific, since the command above returned error code 19 and “FAILURE ( 5616 ): 19: Verify BCDBootEx”

Time to do some further testing:

After the Task Sequence fails, we luckely can open a command prompt and start testing, at the command prompt we executed the same command with the /v switch for verbose mode 🙂 – you can find the command line options for BCDBoot.exe here: https://docs.microsoft.com/en-us/windows-hardware/manufacture/desktop/bcdboot-command-line-options-techref-di

X:\Deploy\Tools\x64>bcdboot.exe F:\Windows /l en-US /v
BFSVC: ServiceBootFiles MuiOnly:n Res:y Fonts:y BootMgrOvw:n BootStatOvw:n DbgTrn:y SuspendBDE:n
BFSVC: Using source OS version a000047ba0001
BFSVC: Copying boot files CopyBootManager(Yes) F:\Windows\boot\EFI -> \?\GLOBALROOT\Device\HarddiskVolume7\EFI\Microsoft\Boot
BFSVC: Creating Recovery directory.
BFSVC: Logging boot file servicing to bootstat log \?\GLOBALROOT\Device\HarddiskVolume7\EFI\Microsoft\Boot\BOOTSTAT.DAT.
BFSVC Warning: Failed to log servicing event to bootstat \?\GLOBALROOT\Device\HarddiskVolume7\EFI\Microsoft\Boot\BOOTSTAT.DAT. Status: 0x80000005
BFSVC: Copying font files from F:\Windows\boot\Fonts to \?\GLOBALROOT\Device\HarddiskVolume7\EFI\Microsoft\Boot\Fonts…
BFSVC: Copying resource files from F:\Windows\boot\Resources to \?\GLOBALROOT\Device\HarddiskVolume7\EFI\Microsoft\Boot\Resources…
BFSVC: Servicing debugger files
BFSVC: Copying boot debugging files from F:\Windows\system32 to \?\GLOBALROOT\Device\HarddiskVolume7\EFI\Microsoft\Boot (kd__.dll)
BFSVC: Copying boot debugging files from F:\Windows\system32 to \?\GLOBALROOT\Device\HarddiskVolume7\EFI\Microsoft\Boot (kdstub.dll)
BFSVC: Done servicing debugger files.
BFSVC: BfsInitializeBcdStore flags(0x0000000c) RetainElementData:n DelExistinObject:n
BFSVC: VolumePathName for F:\Windows is F:\
BFSVC: Opening template from \Device\HarddiskVolume9\Windows\System32\config\BCD-Template.
BFSVC: BCD Error: File is not system store. File: \Device\HarddiskVolume7\EFI\Microsoft\Boot\BCD Status: 0
BFSVC: BCD Error: Failed to open system store. Status: c0000098

As you can see, BCDboot failed to open the System Store.

Let’s do some more testing with the command line options, in order to see if that helps:

Run BCDBoot.exe with the option to specify the volume letter (/s) and specify the firmware type (/f).

X:\Deploy\Tools\x64>bcdboot.exe F:\Windows /l en-US /s V: /f ALL /v
BFSVC: ServiceBootFiles MuiOnly:n Res:y Fonts:y BootMgrOvw:n BootStatOvw:n DbgTrn:y SuspendBDE:n
BFSVC: Using source OS version a000047ba0001
BFSVC: Copying boot files CopyBootManager(Yes) F:\Windows\boot\PCAT -> \?\GLOBALROOT\Device\HarddiskVolume7\Boot
BFSVC: Unable to open file \?\GLOBALROOT\Device\HarddiskVolume7\Boot\bootmgr for read because the file or path does not exist
BFSVC: Logging boot file servicing to bootstat log \?\GLOBALROOT\Device\HarddiskVolume7\Boot\BOOTSTAT.DAT.
BFSVC Warning: Failed to log servicing event to bootstat \?\GLOBALROOT\Device\HarddiskVolume7\Boot\BOOTSTAT.DAT. Status: 0x80000005
BFSVC: Copying font files from F:\Windows\boot\Fonts to \?\GLOBALROOT\Device\HarddiskVolume7\Boot\Fonts…
BFSVC: Copying resource files from F:\Windows\boot\Resources to \?\GLOBALROOT\Device\HarddiskVolume7\Boot\Resources…
BFSVC: Servicing debugger files
BFSVC: List of debugger files is empty
BFSVC: BfsInitializeBcdStore flags(0x0000021c) RetainElementData:n DelExistinObject:n
BFSVC: VolumePathName for F:\Windows is F:\
BFSVC: Opening template from \Device\HarddiskVolume9\Windows\System32\config\BCD-Template.
BFSVC: Opening store from \Device\HarddiskVolume7\boot\BCD
BFSVC: Creating General objects.
BFSVC: Creating Resume object.
BFSVC: Creating MemTest object.
BFSVC: Creating OsLoader object.
BFSVC: OsLoader identifier: {d831c116-6216-11e9-99b4-ca2c466ae3f4}
BFSVC: Removing duplicate entries.
BFSVC: Removing duplicate object {d21712be-6216-11e9-99b4-ca2c466ae3f4}
BFSVC: Create BOOTMGR object RetainBootDefault:n
BFSVC: Setting {default} to {d831c116-6216-11e9-99b4-ca2c466ae3f4}
BFSVC: Cleaning up debugger settings.
BFSVC: ServiceBootFiles MuiOnly:n Res:y Fonts:y BootMgrOvw:n BootStatOvw:n DbgTrn:y SuspendBDE:n
BFSVC: Using source OS version a000047ba0001
BFSVC: Copying boot files CopyBootManager(Yes) F:\Windows\boot\EFI -> \?\GLOBALROOT\Device\HarddiskVolume7\EFI\Microsoft\Boot
BFSVC: Creating Recovery directory.
BFSVC: Logging boot file servicing to bootstat log \?\GLOBALROOT\Device\HarddiskVolume7\EFI\Microsoft\Boot\BOOTSTAT.DAT.
BFSVC Warning: Failed to log servicing event to bootstat \?\GLOBALROOT\Device\HarddiskVolume7\EFI\Microsoft\Boot\BOOTSTAT.DAT. Status: 0x80000005
BFSVC: Copying font files from F:\Windows\boot\Fonts to \?\GLOBALROOT\Device\HarddiskVolume7\EFI\Microsoft\Boot\Fonts…
BFSVC: Copying resource files from F:\Windows\boot\Resources to \?\GLOBALROOT\Device\HarddiskVolume7\EFI\Microsoft\Boot\Resources…
BFSVC: Servicing debugger files
BFSVC: Copying boot debugging files from F:\Windows\system32 to \?\GLOBALROOT\Device\HarddiskVolume7\EFI\Microsoft\Boot (kd__.dll)
BFSVC: Copying boot debugging files from F:\Windows\system32 to \?\GLOBALROOT\Device\HarddiskVolume7\EFI\Microsoft\Boot (kdstub.dll)
BFSVC: Done servicing debugger files.
BFSVC: BfsInitializeBcdStore flags(0x0000021c) RetainElementData:n DelExistinObject:n
BFSVC: VolumePathName for F:\Windows is F:\
BFSVC: Opening template from \Device\HarddiskVolume9\Windows\System32\config\BCD-Template.
BFSVC: Opening store from \Device\HarddiskVolume7\EFI\Microsoft\Boot\BCD
BFSVC: Creating General objects.
BFSVC: Creating Resume object.
BFSVC: Creating MemTest object.
BFSVC: Creating OsLoader object.
BFSVC: OsLoader identifier: {d8c631aa-6216-11e9-99b4-ca2c466ae3f4}
BFSVC: Removing duplicate entries.
BFSVC: Removing duplicate object {d2691890-6216-11e9-99b4-ca2c466ae3f4}
BFSVC: Create BOOTMGR object RetainBootDefault:n
BFSVC: Setting {default} to {d8c631aa-6216-11e9-99b4-ca2c466ae3f4}
BFSVC: Cleaning up debugger settings.
BFSVC: Opening recovery store from \Device\HarddiskVolume7\EFI\Microsoft\Recovery\BCD
BFSVC: Creating General objects.
BFSVC: Create BOOTMGR object RetainBootDefault:y
Boot files successfully created.

Here you can see it seems to be succesfull, but unfortunately the system didn’t boot. Probably it was succesfull on the BIOS part, but failed on the UEFI part. And since the Surface Pro 6 boots UEFI only, that made sense.

And:

Execute BCDBoot and preserve the default Windows Boot Manager firmware entry and the OS boot entry in the Windows Boot Manager using /p /d

X:\Deploy\Tools\x64>bcdboot.exe F:\Windows /l en-US /p /d /v
BFSVC: ServiceBootFiles MuiOnly:n Res:y Fonts:y BootMgrOvw:n BootStatOvw:n DbgTrn:y SuspendBDE:n
BFSVC: Using source OS version a000047ba0001
BFSVC: Copying boot files CopyBootManager(Yes) F:\Windows\boot\EFI -> \?\GLOBALROOT\Device\HarddiskVolume7\EFI\Microsoft\Boot
BFSVC: Creating Recovery directory.
BFSVC: Logging boot file servicing to bootstat log \?\GLOBALROOT\Device\HarddiskVolume7\EFI\Microsoft\Boot\BOOTSTAT.DAT. BFSVC Warning: Failed to log servicing event to bootstat \?\GLOBALROOT\Device\HarddiskVolume7\EFI\Microsoft\Boot\BOOTSTAT.DAT. Status: 0x80000005
BFSVC: Copying font files from F:\Windows\boot\Fonts to \?\GLOBALROOT\Device\HarddiskVolume7\EFI\Microsoft\Boot\Fonts…
BFSVC: Copying resource files from F:\Windows\boot\Resources to \?\GLOBALROOT\Device\HarddiskVolume7\EFI\Microsoft\Boot\Resources…
BFSVC: Servicing debugger files
BFSVC: Copying boot debugging files from F:\Windows\system32 to \?\GLOBALROOT\Device\HarddiskVolume7\EFI\Microsoft\Boot (kd__.dll)
BFSVC: Copying boot debugging files from F:\Windows\system32 to \?\GLOBALROOT\Device\HarddiskVolume7\EFI\Microsoft\Boot (kdstub.dll)
BFSVC: Done servicing debugger files.
BFSVC: BfsInitializeBcdStore flags(0x0000110c) RetainElementData:n DelExistinObject:n
BFSVC: VolumePathName for F:\Windows is F:\
BFSVC: Opening template from \Device\HarddiskVolume9\Windows\System32\config\BCD-Template.
BFSVC: BCD Error: File is not system store. File: \Device\HarddiskVolume7\EFI\Microsoft\Boot\BCD Status: 0
BFSVC: BCD Error: Failed to open system store. Status: c0000098
BFSVC Error: BcdOpenStore failed with unexpected error code, Status = [c0000098]

We then tried to install the system using the original Windows 10 ISO, which also failed, see the output of setuperr.log below:

2019-04-18 12:02:49, Error [0x060126] IBS CallBack_ImageWasSelectedInUi: An error occurred while removing the MultiEdition key from the blackboard.[gle=0x00000490]
2019-04-18 12:04:19, Error IBSLIB BCD: File is not system store. File: \Device\HarddiskVolume2\EFI\Microsoft\Boot\BCD Status: 0[gle=0x00000002]
2019-04-18 12:04:19, Error IBSLIB BCD: BcdExportStore: Failed to open system store. Status: c0000098[gle=0x00000002]
2019-04-18 12:07:26, Error [0x064230] IBSLIB BFSVC: Failed to create a new system store. Status = [c00000a2]
2019-04-18 12:07:26, Error [0x0641b8] IBSLIB ModifyBootEntries: Error modifying bcd boot entries. dwRetCode=[0x13][gle=0x00000013]

The solution:

Since we could install some machines over and over again, while other started failing all of the sudden we didn’t expect the UEFI settings directly.

The documentation is also very high-level and doesn’t give any in-depth information about the ins- and outs of certain settings: https://support.microsoft.com/en-us/help/4023531/surface-how-to-use-surface-uefi.

At first we thought of updating the EUFI firmware, but couldn’t find an option to do this while out of the Booted OS, since firmware for the Surface Pro 6 is supplied via MSI files or via Windows Update by Microsoft

In the end, it turned out that the setting called: “Enable boot configuration lock“, was causing the issue. While at first it seems that this option allows you to define the order in which devices boot, it really locks the configuration in the UEFI, not even giving access to the BCDBoot.exe tool.

Boot Configuation settings Surface Pro 6

So for now, when encountering this issue, (which is not consequent) we are disabling the “Enable boot configuration lock” option, install the OS using USB and enable the option again just before the OS boots for the first time. We needed to go into the UEFI settings already to enable and disable Secure Boot already, since we couldn’t boot the USB with Secure Boot enabled.

Tweet
Follow me
Tweet #WPNinjasNL

Continue Reading

← SCSM 2012: Failed to execute Submit Operation, event id 26319

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Founding member of:

Recent Posts

  • MAM vs. MDM: Choosing the Right Mobile Management Approach
  • Comparing Web Filtering and Security: Microsoft Entra Internet Access (Global Secure Access) vs. Microsoft Defender for Endpoint (MDE)
  • Navigating New Authentication Methods: SMS for Password Reset, Not for MFA
  • From SPF to DANE: Securing Microsoft 365 Email Communications
  • Protecting your Break Glass accounts in Entra now that MFA gets enforced on more and more Admin portals

Books

System Center 2012 Service Manager Unleashed
Amazon
System Center 2012 R2 Configuration Manager Unleashed: Supplement to System Center 2012 Configuration Manager
Amazon
System Center Configuration Manager Current Branch Unleashed
Amazon
Mastering Windows 7 Deployment
Amazon
System Center 2012 Configuration Manager (SCCM) Unleashed
Amazon

Archives

  • February 2025
  • January 2025
  • September 2024
  • February 2024
  • January 2024
  • December 2023
  • November 2023
  • September 2023
  • August 2023
  • February 2023
  • December 2022
  • November 2022
  • October 2022
  • September 2022
  • August 2022
  • May 2022
  • February 2022
  • January 2022
  • December 2021
  • November 2021
  • October 2021
  • September 2021
  • July 2021
  • June 2021
  • May 2021
  • April 2021
  • March 2021
  • February 2021
  • January 2021
  • December 2020
  • November 2020
  • October 2020
  • September 2020
  • August 2020
  • July 2020
  • June 2020
  • May 2020
  • April 2020
  • March 2020
  • February 2020
  • January 2020
  • December 2019
  • November 2019
  • October 2019
  • August 2019
  • July 2019
  • November 2016
  • November 2015
  • June 2015
  • May 2015
  • November 2014
  • July 2014
  • April 2014
  • March 2014
  • February 2014
  • January 2014
  • November 2013
  • August 2013
  • April 2013
  • March 2013
  • January 2013
  • December 2012
  • November 2012
  • August 2012
  • July 2012
  • June 2012

Meta

  • Log in
  • Entries feed
  • Comments feed
  • WordPress.org

Categories

  • ABM (4)
  • Advanced Threat Protection (4)
  • Announcement (44)
  • Azure (3)
  • AzureAD (73)
  • Certification (2)
  • Cloud App Security (5)
  • Conditional Access (58)
  • Configuration Manager (24)
  • Entra (2)
  • Entra Id (8)
  • Events (14)
  • Exchange Online (9)
  • Identity Protection (5)
  • Intune (27)
  • Licensing (2)
  • Microsoft Defender (1)
  • Microsoft Defender for Endpoint (1)
  • Microsoft Endpoint Manager (35)
  • Mobile Application Management (4)
  • Modern Workplace (74)
  • Office 365 (10)
  • Overview (11)
  • Power Platform (1)
  • PowerShell (2)
  • Presentations (9)
  • Privileged Identity Management (5)
  • Role Based Access Control (2)
  • Security (63)
  • Service Manager (4)
  • Speaking (30)
  • Troubleshooting (4)
  • Uncategorized (11)
  • Windows 10 (15)
  • Windows 11 (5)
  • Windows Update for Business (4)
  • WMUG.nl (16)
  • WPNinjasNL (32)

Tags

#ABM #AzureAD #community #conditionalaccess #ConfigMgr #IAM #Intune #m365 #MEM #MEMCM #microsoft365 #modernworkplace #office365 #security #webinar #wmug_nl ATP authentication strength AzureAD Branding Community Conditional Access ConfigMgr ConfigMgr 2012 Email EXO Identity Intune Licensing M365 MCAS MFA Modern Workplace Office 365 OSD PIM Policy Sets Presentation RBAC roles Security System Center Task Sequence troubleshooting webinar

Recent Comments

  • brc on Protecting your Break Glass accounts in Entra now that MFA gets enforced on more and more Admin portals
  • [m365weekly] #186 – M365 Weekly Newsletter on MAM vs. MDM: Choosing the Right Mobile Management Approach
  • Dean Gross on Comparing Web Filtering and Security: Microsoft Entra Internet Access (Global Secure Access) vs. Microsoft Defender for Endpoint (MDE)
  • nikhil tech on Protecting your Break Glass accounts in Entra now that MFA gets enforced on more and more Admin portals
  • Kenneth on Comparing Web Filtering and Security: Microsoft Entra Internet Access (Global Secure Access) vs. Microsoft Defender for Endpoint (MDE)

This information is provided “AS IS” with no warranties, confers no rights and is not supported by the author.

Copyright © 2021 by Kenneth van Surksum. All rights reserved. No part of the information on this web site may be reproduced or posted in any form or by any means without the prior written permission of the publisher.

Shorthand: Don’t pass off my work as yours, it’s not nice.

©2025 Modern Workplace Blog | Powered by WordPress and Superb Themes!
This website uses cookies to improve your experience. We'll assume you're ok with this, but you can opt-out if you wish. Cookie settingsACCEPT
Privacy & Cookies Policy

Privacy Overview

This website uses cookies to improve your experience while you navigate through the website. Out of these cookies, the cookies that are categorized as necessary are stored on your browser as they are essential for the working of basic functionalities of the website. We also use third-party cookies that help us analyze and understand how you use this website. These cookies will be stored in your browser only with your consent. You also have the option to opt-out of these cookies. But opting out of some of these cookies may have an effect on your browsing experience.
Necessary
Always Enabled
Necessary cookies are absolutely essential for the website to function properly. This category only includes cookies that ensures basic functionalities and security features of the website. These cookies do not store any personal information.
Non-necessary
Any cookies that may not be particularly necessary for the website to function and is used specifically to collect user personal data via analytics, ads, other embedded contents are termed as non-necessary cookies. It is mandatory to procure user consent prior to running these cookies on your website.
SAVE & ACCEPT