image.ffu deployment error reported

Bieber Fu 236 Reputation points
2021-01-27T02:10:46.737+00:00

After making the ffu image, when the deployment is suitable, why there is a probability of error when installing on some machines

60821-%E5%BE%AE%E4%BF%A1%E5%9B%BE%E7%89%87-20210127093734.jpg

DISM /apply-ffu /ImageFile=%FFU% /ApplyDrive:\.\PhysicalDrive%InboxDisk%
@Echo .
if %errorlevel% NEQ 0 echo "Failed to deploy FFU" && goto :ERROR

set creoRecFFU=X:\creoRecFFU.script
@Echo select disk %InboxDisk% >%creoRecFFU%
@Echo select partition 1 >>%creoRecFFU%
@Echo assign letter="S">>%creoRecFFU%
@Echo select partition 3 >>%creoRecFFU%
@Echo assign letter="W">>%creoRecFFU%
@Echo shrink minimum=1000 >>%creoRecFFU%
@Echo extend>>%creoRecFFU%
@Echo shrink minimum=%Recoverypartition% >>%creoRecFFU%
@Echo create partition primary>>%creoRecFFU%
@Echo format quick fs=ntfs label="Recovery">>%creoRecFFU%
@Echo assign letter="Z">>%creoRecFFU%
@Echo set id="de94bba4-06d1-4d40-a16a-bfd50179d6ac">>%creoRecFFU%
@Echo gpt attributes=0x8000000000000001>>%creoRecFFU%
@Echo list volume>>%creoRecFFU%
@Echo exit>>%creoRecFFU%

diskpart /s %creoRecFFU%
if %errorlevel% NEQ 0 echo "Failed create recovery partition" && goto :ERROR

md Z:\Recovery\WindowsRE

set windowsdrive=W:\
set recoveryfolder=%windowsdrive%Windows\System32\Recovery\

attrib %recoveryfolder%winre.wim -s -h -a -r
move %recoveryfolder%winre.wim Z:\Recovery\WindowsRE\
if %errorlevel% NEQ 0 echo "Error moving WinRe.wim in Z:\recovery\windowsre" && goto :ERROR
attrib Z:\Recovery\WindowsRE\winre.wim +s +h +a +r

%windowsdrive%Windows\System32\Reagentc /Setreimage /Path Z:\Recovery\WindowsRE /Target %windowsdrive%Windows
if %errorlevel% NEQ 0 echo "Error setting WinRe" && goto :ERROR

md S:\EFI\Recovery
xcopy /e /h S:\EFI\Microsoft* S:\EFI\Recovery\
del /a S:\EFI\Recovery\Boot\BCD
del /a S:\EFI\Recovery\Boot\BCD.LOG
bcdedit /createstore S:\BCD
if %errorlevel% NEQ 0 echo Error impostazioni delle informazioni di recovery in EFI 1 && goto :ERROR
bcdedit /store S:\BCD /create {bootmgr} /d "Windows Boot Manager"
bcdedit /store S:\BCD /set {bootmgr} device partition=S:
bcdedit /store S:\BCD /set {bootmgr} locale en-us
bcdedit /store S:\BCD /set {bootmgr} integrityservices Enable
if %errorlevel% NEQ 0 echo Error impostazioni delle informazioni di recovery in EFI 2 && goto :ERROR
bcdedit /store S:\BCD /create {11111111-1111-1111-1111-111111111111} /d "Windows Recovery" /device
bcdedit /store S:\BCD /set {11111111-1111-1111-1111-111111111111} ramdisksdidevice partition=Z:
bcdedit /store S:\BCD /set {11111111-1111-1111-1111-111111111111} ramdisksdipath \Recovery\WindowsRE\boot.sdi
if %errorlevel% NEQ 0 echo Error impostazioni delle informazioni di recovery in EFI 3 && goto :ERROR
bcdedit /store S:\BCD /create {22222222-2222-2222-2222-222222222222} /d "Windows Recovery Environment" /application osloader
bcdedit /store S:\BCD /set {bootmgr} default {22222222-2222-2222-2222-222222222222}
bcdedit /store S:\BCD /set {bootmgr} displayorder {22222222-2222-2222-2222-222222222222}
if %errorlevel% NEQ 0 echo Error impostazioni delle informazioni di recovery in EFI 4 && goto :ERROR
bcdedit /store S:\BCD /set {default} device ramdisk=[Z:]\Recovery\WindowsRE\winre.wim,{11111111-1111-1111-1111-111111111111}
bcdedit /store S:\BCD /set {default} path \Windows\System32\winload.efi
bcdedit /store S:\BCD /set {default} locale en-us
bcdedit /store S:\BCD /set {default} displaymessage "Recovery"
bcdedit /store S:\BCD /set {default} osdevice ramdisk=[Z:]\Recovery\WindowsRE\winre.wim,{11111111-1111-1111-1111-111111111111}
bcdedit /store S:\BCD /set {default} systemroot \Windows
bcdedit /store S:\BCD /set {default} nx OptIn
bcdedit /store S:\BCD /set {default} bootmenupolicy Standard
bcdedit /store S:\BCD /set {default} winpe Yes
if %errorlevel% NEQ 0 echo Error impostazioni delle informazioni di recovery in EFI 5 && goto :ERROR
xcopy /h S:\BCD* S:\EFI\Recovery\Boot\
del /a S:\BCD*
if %errorlevel% NEQ 0 echo Error impostazioni delle informazioni di recovery in EFI 6 && goto :ERROR

set nascondoRec=X:\nascondoRec.script
@Echo select disk %InboxDisk% >%nascondoRec%
@Echo select partition 4 >>%nascondoRec%
@Echo remove>>%nascondoRec%
@Echo set id="de94bba4-06d1-4d40-a16a-bfd50179d6ac">>%nascondoRec%
@Echo gpt attributes=0x8000000000000001>>%nascondoRec%
@Echo list volume>>%nascondoRec%
@Echo exit>>%nascondoRec%
diskpart /s %nascondoRec%
if %errorlevel% NEQ 0 echo "Failed hide recovery partition" && goto :ERROR

%windowsdrive%Windows\System32\Reagentc /Info /Target %windowsdrive%Windows

Windows for business | Windows Client for IT Pros | User experience | Other
{count} votes

Accepted answer
  1. AliceYang-MSFT 2,106 Reputation points
    2021-01-28T10:01:10.397+00:00

    Hi,

    It seems that there are system partitions needing to be deleted on the failed machines. But they have to be deleted in WinPE mode while there might be something wrong with WinPE.

    Please try to format the disks and check whether it helps. If it doesn't, you can try whether wipe disk can help if third party product is acceptable.

    Please note: The mentioned product is owned and operated by a third party. Microsoft has no control regarding to the product's performance and reliability.

    ----------

    If the Answer is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.