New
#1
Windows 7 and windows PE boot
Hi i am trying to build a WDS setup where a Recovery partition is created. The recovery partition have the drive letter R, and the content of the drive corosponds to that of a bootable USB or CD.
I want to add my R drive to my BCD file and create a Boot loader entry that makes it possible to boot into the windows setup on the recovery drive and install windows anew on the C drive.
For this purpose I have created the following script.
SCRIPT START ……………………………………………………….
bcdedit /set {default} description "Recovery"
bcdedit /copy {default} /d "Windows"
bcdedit /deletevalue {default} nx
bcdedit /deletevalue {default} inherit
bcdedit /deletevalue {default} resumeobject
bcdedit /set {default} device ramdisk=[R:]\sources\boot.wim,{ramdiskoptions}
bcdedit /set {default} path \Windows\System32\Boot\winload.exe
bcdedit /set {default} locale en-US
bcdedit /set {default} osdevice ramdisk=[R:]\sources\boot.wim,{ramdiskoptions}
bcdedit /set {default} systemroot \Windows
bcdedit /set {default} detecthal Yes
bcdedit /set {default} winpe Yes
setlocal enabledelayedexpansion
set description=Windows
for /f "tokens=1*" %%a in ('bcdedit.exe') do (
if /i "%%a"=="identifier" (set identifier=%%~b)
if /i "%%a %%b"=="description %description%" (goto :descriptionFound)
)
echo Did not find description matching '%description%'
exit /b 1
:descriptionFound
echo Found description %description% at ID %identifier%.
ECHO bcdedit /default %identifier%
bcdedit /default %identifier%
bcdedit /displayorder %identifier% /addfirst
bcdedit /timeout 5
SCRIPT END ……………………………………………………….
The script executes perfectly but when I reboot and chose the Recovery boot option Windows PE ends in blue screen of death after the first loading screen.
I have tried creating the same entry using the EasyBCD software and that works perfect, can anyone help ??