WinPE/Wim 映像 - 映像后出现启动问题,需要重新启动才能修复 MBR

WinPE/Wim 映像 - 映像后出现启动问题,需要重新启动才能修复 MBR

我在谷歌上进行了大量搜索,直到找到一篇文章确实能在某种程度上帮助我解决问题......这里:应用 WIM 文件后无法重新启动

我已经使用 Microsoft 教程(主要针对 Windows 10)创建了一个 64 位 WinPE 映像棒。我有一些旧的 Windows 7 播放器,想将它们映像到 Windows 10...我们以前使用 Ghost 64 位。

我创建了一个基于菜单的批处理脚本来映像我的播放器,我的前 2 个原生 Windows 10 播放器(PC)运行良好,但较旧的 Windows 7 播放器无法通过... 重新映像。我可以应用映像,但我总是在某种程度上遇到启动问题。通过启动问题,当 Windows 应该启动时,我在屏幕左上角看到一条闪烁的“_”线,或者我缺少启动记录。

我正在使用标准 EUFI 分区脚本(是的,我的播放器是基于 EUFI 的)

rem == CreatePartitions-UEFI.txt ==
rem == These commands are used with DiskPart to
rem    create four partitions
rem    for a UEFI/GPT-based PC.
rem    Adjust the partition sizes to fill the drive
rem    as necessary. ==
select disk 0
clean
convert gpt
rem == 1. System partition =========================
create partition efi size=260
rem    ** NOTE: For Advanced Format 4Kn drives,
rem               change this value to size = 260 ** 
format quick fs=fat32 label="System"
assign letter="S"

rem == 2. Microsoft Reserved (MSR) partition =======
create partition msr size=16

rem == 3. Windows partition ========================
rem ==    a. Create the Windows partition ==========
create partition primary 
rem ==    b. Create space for the recovery tools ===
rem       ** Update this size to match the size of
rem          the recovery tools (winre.wim)
rem          plus some free space.
shrink minimum=650
rem ==    c. Prepare the Windows partition ========= 
format quick fs=ntfs label="Windows"
assign letter="W"
list volume
exit

我已经尝试了以下方法来解决启动问题(请参阅 echo警告...)

:W10OPSPS
echo imaging c: drive for W10 OPS-PCAEQ-PS
echo.
@echo Find a drive that has a folder titled ApplyImages.
@for %%a in (C D E F G H I J K L M N O P Q R S T U V W X Y Z) do @if exist %%a:\ApplyImages\ set DriveLetter=%%a
@echo The ApplyImages folder is on drive: %DriveLetter%
@dir %DriveLetter%:\ApplyImages /w
echo.
echo Got the usb drive letter and move forward
echo.

DiskPart /s %DriveLetter%:\CreatePartitions-UEFI.txt

rem == Set high-performance power scheme to speed deployment ==
call powercfg /s 8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c

cls

rem == Apply the image to the Windows partition ==
dism /Apply-Image /ImageFile:%DriveLetter%:\ApplyImages\%OPS-PCAEQ-PSImageName% /Index:1 /ApplyDir:W:\


rem == Copy boot files to the System partition ==
W:\Windows\System32\bcdboot W:\Windows /s S:


echo *WARNING* this is only needed on this player to fix some odd issue with the hardware imaging portion
DiskPart /s %DriveLetter%:\assignPartitionsAfterImaging(fix).txt
C:\Windows\System32\bcdboot C:\Windows /s C: /f ALL
bootsect /nt60 sys

echo.
echo the system has been imaged, press any key reboot, take out the USB stick once the reboot has commenced
echo.
echo.
PAUSE
exit

这是我尝试修复该问题时调用的另一个部分,只是为了说我最终发出了相同的命令来修复该问题:

select disk 0
select vol W
assign letter=C

无论我在应用映像创建引导记录后放置了什么,如果我重新启动,我将无法启动。但是,除了我重新启动到 WinPE 并运行以下命令外:

C:\Windows\System32\bcdboot C:\Windows /s C: /f 全部

那我就一切都好了......还有窗户启动。

到底发生了什么?我该如何自动化这一部分?

答案1

也许应该S:

bcdboot C:\Windows /s S: /f ALL

相关内容