Jump to content
Strawberry Orange Banana Lime Leaf Slate Sky Blueberry Grape Watermelon Chocolate Marble
Strawberry Orange Banana Lime Leaf Slate Sky Blueberry Grape Watermelon Chocolate Marble

MSFN is made available via donations, subscriptions and advertising revenue. The use of ad-blocking software hurts the site. Please disable ad-blocking software or set an exception for MSFN. Alternatively, register and become a site sponsor/subscriber and ads will be disabled automatically. 


necrosis

WinPE v2.1 From USB HDD

Recommended Posts

I am trying to make a external USB HDD boot two WinPE images. A x86 and a x64 image. Everything is working fine except for the image label's when booting.

Here is the script I use to make the BCD file.

@ECHO OFF

Rem Creates BCD (boot configuration data) for x86 and x64 Windows PE 2.1 images

set BCD-File="%HOMEDRIVE%%HOMEPATH%\Desktop\BCD"
IF EXIST %BCD-File% del %BCD-File%

Bcdedit /createstore %BCD-File%
Bcdedit /store %BCD-File% /create {ramdiskoptions} /d "Ramdisk Options"
Bcdedit /store %BCD-File% /set {ramdiskoptions} ramdisksdidevice boot
Bcdedit /store %BCD-File% /set {ramdiskoptions} ramdisksdipath \boot\boot.sdi

for /f "tokens=1-3" %%a in ('Bcdedit /store %BCD-File% /create /d "WinPE x86" /application osloader') do set guid1=%%c
Bcdedit /store %BCD-File% /set %guid1% systemroot \Windows
Bcdedit /store %BCD-File% /set %guid1% detecthal Yes
Bcdedit /store %BCD-File% /set %guid1% winpe Yes
Bcdedit /store %BCD-File% /set %guid1% osdevice ramdisk=[boot]\sources\winpe_x86.wim,{ramdiskoptions}
Bcdedit /store %BCD-File% /set %guid1% device ramdisk=[boot]\sources\winpe_x86.wim,{ramdiskoptions}

for /f "tokens=1-3" %%a in ('Bcdedit /store %BCD-File% /create /d "WinPE x64" /application osloader') do set guid2=%%c
Bcdedit /store %BCD-File% /set %guid2% systemroot \Windows
Bcdedit /store %BCD-File% /set %guid2% detecthal Yes
Bcdedit /store %BCD-File% /set %guid2% winpe Yes
Bcdedit /store %BCD-File% /set %guid2% osdevice ramdisk=[boot]\sources\winpe_x64.wim,{ramdiskoptions}
Bcdedit /store %BCD-File% /set %guid2% device ramdisk=[boot]\sources\winpe_x64.wim,{ramdiskoptions}

Bcdedit /store %BCD-File% /create {bootmgr} /d "Windows Vista Boot Manager"
Bcdedit /store %BCD-File% /set {bootmgr} timeout 30
Bcdedit /store %BCD-File% /set {bootmgr} displayorder %guid1% %guid2%
Bcdedit /store %BCD-File% /enum all
pause

/enum all spits out

Windows Boot Manager
--------------------
identifier {bootmgr}
description Windows Vista Boot Manager
displayorder {53bf03c1-fcea-11dc-a141-0016cfd9a77b}
{5515c9c1-fcea-11dc-a141-0016cfd9a77b}
timeout 30

Windows Boot Loader
-------------------
identifier {53bf03c1-fcea-11dc-a141-0016cfd9a77b}
device ramdisk=[boot]\sources\winpe_x86.wim,{ramdiskoptions}
description WinPE x86
osdevice ramdisk=[boot]\sources\winpe_x86.wim,{ramdiskoptions}
systemroot \Windows
detecthal Yes
winpe Yes

Windows Boot Loader
-------------------
identifier {5515c9c1-fcea-11dc-a141-0016cfd9a77b}
device ramdisk=[boot]\sources\winpe_x64.wim,{ramdiskoptions}
description WinPE x64
osdevice ramdisk=[boot]\sources\winpe_x64.wim,{ramdiskoptions}
systemroot \Windows
detecthal Yes
winpe Yes

Setup Ramdisk Options
---------------------
identifier {ramdiskoptions}
description Ramdisk Options
ramdisksdidevice boot
ramdisksdipath \boot\boot.sdi

The problem is when the HDD boots and gets to the image selection screen it labels both options as "Ramdisk Options" not "WinPE x86" and "WinPE x64" like I want it to.

What on earth am I doing wrong?

Edited by necrosis

Share this post


Link to post
Share on other sites

I'm having the same issue. From the looks of it every thing should be fine, but I just get two "Ramdisk options" on the boot menu.

Anyone have any ideas?

Cheers

Share this post


Link to post
Share on other sites

I configure my BCD to boot a WIM into RAM from C: and NTLDR from D:, but I was able to add lines to my BCD creation script to add another entry for booting a separate WIM on C: into RAM and it worked no problem. Here's my script:

bcdedit -createstore C:\TEMP\BCD
bcdedit -store C:\TEMP\BCD -create {bootmgr} /d "Boot Manager"
bcdedit -store C:\TEMP\BCD -set {bootmgr} device boot
bcdedit -store C:\TEMP\BCD -create {ramdiskoptions} /d "RAM Disk"
bcdedit -import C:\TEMP\BCD
bcdedit -set {ramdiskoptions} ramdisksdidevice partition=C:
bcdedit -set {ramdiskoptions} ramdisksdipath \BOOT\BOOT.sdi
for /f "tokens=3" %%a in ('bcdedit -create /d "First WIM" -application osloader') do set guid=%%a
bcdedit -set %guid% device ramdisk=[C:]\BOOT\BOOT.WIM,{ramdiskoptions}
bcdedit -set %guid% path \WINDOWS\SYSTEM32\BOOT\WINLOAD.EXE
bcdedit -set %guid% osdevice ramdisk=[C:]\BOOT\BOOT.WIM,{ramdiskoptions}
bcdedit -set %guid% systemroot \WINDOWS
bcdedit -set %guid% winpe yes
bcdedit -set %guid% detecthal yes
bcdedit -displayorder %guid% -addlast
for /f "tokens=3" %%a in ('bcdedit -create /d "Second WIM" -application osloader') do set guid=%%a
bcdedit -set %guid% device ramdisk=[C:]\BOOT\BOOT2.WIM,{ramdiskoptions}
bcdedit -set %guid% path \WINDOWS\SYSTEM32\BOOT\WINLOAD.EXE
bcdedit -set %guid% osdevice ramdisk=[C:]\BOOT\BOOT2.WIM,{ramdiskoptions}
bcdedit -set %guid% systemroot \WINDOWS
bcdedit -set %guid% winpe yes
bcdedit -set %guid% detecthal yes
bcdedit -displayorder %guid% -addlast
bcdedit -create {ntldr} /d "Microsoft Windows XP Professional"
bcdedit -set {ntldr} device boot
bcdedit -set {ntldr} path \ntldr
bcdedit -displayorder {ntldr} -addfirst
bcdedit -default {ntldr}
bcdedit -timeout 5
bootsect /nt60 C:
IF EXIST C:\TEMP\BCD DEL C:\TEMP\BCD

Some key things I have that you don't:

bcdedit -set {bootmgr} device boot

bcdedit -set {ramdiskoptions} ramdisksdidevice partition=C:

And reference the C: partition instead of BOOT

Hope this helps.

Share this post


Link to post
Share on other sites

I will bet anything that you guys all have Service Pack 1 of Windows Vista installed, right?

Apparently I and another user are having a similar problem with the labelling of pre-installation environment applications. In our case, it is with the Symantec Recovery Disk component of Symantec Norton Ghost 12.0. Read this: http://forums.microsoft.com/TechNet/ShowPo...6&SiteID=17. Service Pack 1 for Windows Vista seems to be the culprit.

I believe that Windows Vista Service Pack 1 has introduced us to a new problem, which may not necessarily be a problem, but rather work in progress that has not yet been completed: the life story of Microsoft. I figure that Microsoft is trying to have three groups of boot options: Windows Vista platforms; Legacy Windows platforms; and pre-installation environment options (the problem that we are currently facing).

Hopefully we will see some kind of a resolution in the near future. In the meantime, I am going to go to a computer store and experiment with the Symantec Recovery Disk on one of their computers to determine whether I can reproduce the problem and therefore determine that Service Pack 1 is indeed the guilty party without any doubt.

Neal Bangia

Share this post


Link to post
Share on other sites
I will bet anything that you guys all have Service Pack 1 of Windows Vista installed, right?

I was trying to build on Windows XP Professional SP2.

Its just a slightly nagging problem for me since I can remember the first option is x86 and the second option is x64, but still, you'd think this would be something that would just work. :rolleyes:

Cheers

** of course, come to think of it, I was using the WAIK 1.1 along with the associated tools and v1.1 are the Vista SP1 / Server 2008 versions. Maybe if I tried to use bcdedit.exe from v1.0 of the WAIK (pre-Vista SP1) it would work. I'll give it a shot tomorrow and let you know.

Edited by Jotnar

Share this post


Link to post
Share on other sites

I replaced the BOOTMGR file on my multiboot cd with one from a pre SP1 vista install disc and it showed the correct entries! It seems to boot both my PE 2.1 x86 and x64 images ok. Thanks for the tip on where to look. I don't know what the equivalent file is on an installed Vista system but my guess is that that file is the problem child.

Cheers

Share this post


Link to post
Share on other sites

I finally got back to this post.

Yes. It does seam that the bootmgr.exe in WinPE 2.1 is the reason for the options showing up as "Ramdisk Options".

Using the exact same BCD file and the bootmgr.exe from WinPE 2.0 the labels show up properly. GO MICROSOFT!

Going to read over the BCD creator doc's again to see if they changed a command or something.

Share this post


Link to post
Share on other sites

Thank the Lord I found this thread - was beating my head against the wall trying to figure out this issue.

The working BOOTMGR I have is version 6.0.6000.16386.

The non-working BOOTMGR is version 6.0.6001.18000.

Edited by Stratuscaster

Share this post


Link to post
Share on other sites

Just an update to this issue:

The actual fix is that the instructions are incorrect for creating the ramdiskoptions in the BCD store.

Basically to get the boot menu options to show "correctly" use this command:

bcdedit.exe /store c:\BCD /create {ramdiskoptions}

Leave the /d "Ramdisk Options" OFF the command - forget it and don't use it.

I originally posted it here:

http://www.boot-land.net/forums/index.php?showtopic=11442

hope it helps somebody.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


  • Recently Browsing   0 members

    No registered users viewing this page.

×