Jump to content











Photo
- - - - -

Can not get WinPE4x to boot from local partition

winpe bcd

  • Please log in to reply
1 reply to this topic

#1 briang

briang
  • Members
  • 7 posts
  •  
    United States

Posted 16 September 2013 - 08:23 PM

I built the WinPE using Win 8's ADK and the boot.wim boots fine via USB and/or DVD, but when I place it in a local partition, update my BCD file using the script below.  It locks up!  I can't figure this out for the life of me!! Any help is much appreciated.  Im performing my testing in VMWare 9.

 

CreateBCD Script:

@echo off
setlocal

SET BCDEDIT=bcdedit.exe
SET BCDSTORE=C:\Boot\BCD
SET SDI_FILE=boot.sdi
SET WIM_File=boot.wim

attrib c:\boot\bcd -H -S
del c:\boot\bcd /F
%BCDEDIT% /createstore c:\boot\bcd

echo.
echo Adding {BootMgr} entries
echo ===========
echo.

%BCDEDIT% /store %BCDSTORE% /create {bootmgr}
%BCDEDIT% /store %BCDSTORE% /set {bootmgr} description "Boot Manager"
%BCDEDIT% /store %BCDSTORE% /set {bootmgr} device boot
%BCDEDIT% /store %BCDSTORE% /set {bootmgr} timeout 20

echo.
echo Adding Ram Disk Options
echo ===========


for /f "tokens=3" %%A in ('%BCDEDIT% /store %BCDSTORE% /create /device') do set ramdisk=%%A 

%BCDEDIT% /store %BCDSTORE% /set %ramdisk% ramdisksdidevice partition=R:
%BCDEDIT% /store %BCDSTORE% /set %ramdisk% ramdisksdipath \boot\boot.sdi 
echo.

echo.
echo Adding Win 7
echo ===========
echo.

for /f "Tokens=3" %%A in ('%BCDEDIT% /store %BCDSTORE% /create /application osloader') do set GUID=%%A

echo.
echo win7 guid=%GUID%
echo.

%BCDEDIT% /store %BCDSTORE% /set %GUID% device partition=C:
%BCDEDIT% /store %BCDSTORE% /set %GUID% systemroot \Windows
%BCDEDIT% /store %BCDSTORE% /set %GUID% osdevice partition=C:
%BCDEDIT% /store %BCDSTORE% /set %GUID% path \Windows\system32\winload.exe
%BCDEDIT% /store %BCDSTORE% /set %GUID% detecthal Yes
%BCDEDIT% /store %BCDSTORE% /set %GUID% description "Windows OS"
%BCDEDIT% /store %BCDSTORE% /displayorder %GUID%

echo.
echo Adding Win PE
echo ===========
echo.

for /f "Tokens=3" %%A in ('%BCDEDIT% /store %BCDSTORE% /create /application osloader') do set GUID=%%A

echo.
echo win7 guid=%GUID%
echo.

%BCDEDIT% /store %BCDSTORE% /set %GUID% systemroot \Windows
%BCDEDIT% /store %BCDSTORE% /set %GUID% detecthal Yes
%BCDEDIT% /store %BCDSTORE% /set %GUID% winpe Yes
%BCDEDIT% /store %BCDSTORE% /set %GUID% osdevice ramdisk=[R:]\Sources\boot.wim,%ramdisk%
%BCDEDIT% /store %BCDSTORE% /set %GUID% device ramdisk=[R:]\Sources\boot.wim,%ramdisk%
%BCDEDIT% /store %BCDSTORE% /set %GUID% description "Windows PE"
%BCDEDIT% /store %BCDSTORE% /displayorder %guid% /addlast

echo.
echo.
endlocal

Here is the final output from my bcdedit /enum


Windows Boot Manager
--------------------
identifier              {bootmgr}
device                  boot
description             Boot Manager
displayorder            {bcd81e17-1fac-11e3-8484-000c29b4fa17}
                        {bce66879-1fac-11e3-8484-000c29b4fa17}
timeout                 20

Windows Boot Loader
-------------------
identifier              {bcd81e17-1fac-11e3-8484-000c29b4fa17}
device                  partition=C:
path                    \Windows\system32\winload.exe
description             Windows OS
osdevice                partition=C:
systemroot              \Windows
detecthal               Yes

Windows Boot Loader
-------------------
identifier              {bce66879-1fac-11e3-8484-000c29b4fa17}
device                  ramdisk=[R:]\Sources\boot.wim,{bcd34c0a-1fac-11e3-8484-000c29b4fa17}
description             Windows PE
osdevice                ramdisk=[R:]\Sources\boot.wim,{bcd34c0a-1fac-11e3-8484-000c29b4fa17}
systemroot              \Windows
detecthal               Yes
winpe                   Yes

Device options
--------------
identifier              {bcd34c0a-1fac-11e3-8484-000c29b4fa17}
ramdisksdidevice        partition=R:
ramdisksdipath          \boot\boot.sdi

/Brian Gonzalez



#2 briang

briang
  • Members
  • 7 posts
  •  
    United States

Posted 17 September 2013 - 07:21 PM

Copying the C:\bootmgr from WinPE4x to the Boot Partition (Win 7) worked like a charm.







Also tagged with one or more of these keywords: winpe, bcd

2 user(s) are reading this topic

0 members, 2 guests, 0 anonymous users