Jump to content











Photo

Create a bootable WinPE 4.0 USB drive

winpe4.0 usb boot adk

  • Please log in to reply
197 replies to this topic

#1 ericgl

ericgl

    Frequent Member

  • Expert
  • 340 posts
  •  
    Israel

Posted 16 March 2012 - 12:10 AM

*
POPULAR

Before I begin with the guide, I'd like to mention that the information here has been gathered from these sources, and I give all the credit to them:
http://4sysops.com/a...e-tools-part-1/
http://stealthfield....e-4-0-boot-iso/

1. First you need a PC with Windows 7 (or higher) installed on it. You obviously need a flash drive, 4GB should be enough.

2. You'll also need to download the Windows ADK for Windows 8 from Microsoft, and install it (the actual download is 1.95GB).

3. We're going to make your flash drive bootable. Make sure it doesn't contain important files. Open CMD with admin rights, and type:
[ATTENTION: Replace ‘#’ with the DISK number of your flash drive as it appears after typing LIST DISK]
 

diskpart
list disk
select disk #
clean
create partition primary
select partition 1
active
format quick fs=fat32
assign
exit


Here's an example screenshot:
7805585.png

ATTENTION! If you're building a 64bit WinPE4.0, use amd64 instead of x86 in the following steps.

 

4. Go to: [ADK Install DIR]\Assessment and Deployment Kit\Windows Preinstallation Environment\x86\Media

5. Copy the entire "Media" folder to C:\Temp\PE4 (so now you should have C:\Temp\PE4\Media).

6. Copy [ADK Install DIR]\Assessment and Deployment Kit\Windows Preinstallation Environment\x86\en-us\winpe.wim into: C:\Temp\PE4\Media\Sources (create this new "Sources" folder).

7. Rename the file “winpe.wim” to “boot.wim“.

8. From the Start Menu -> All Programs -> ADK folder, open the Deployment Tools Command Prompt, and type:

 
 

cd C:\Temp\PE4


9. We now need to create a new folder which will act as a mount point for the WIM file, so type:
 
 

md C:\MOUNT


10. To mount the WIM file, type:
 

DISM /Mount-Wim /WimFile:Media\Sources\boot.wim /Index:1 /MountDir:C:\MOUNT


11. We are now going to modify the boot.wim file by adding some optional components.

The additional components can be found in the following folder:
[ADK INSTALL DIR]\Assessment and Deployment Kit\Windows Preinstallation Environment\x86\WinPE_OCs

Copy the "WinPE_OCs" folder to C:\Temp\PE4 (so now you should have C:\Temp\PE4\WinPE_OCs).

12. ATTENTION: After adding each component, you must also add its corresponding language file, otherwise the component you add won’t work!!
Adding a component takes a while, depending on its size. I recommend adding the following components by typing:

 

dism /image:C:\MOUNT /add-package /PackagePath:"C:\Temp\PE4\WinPE_OCs\WinPE-Scripting.cab"
dism /image:C:\MOUNT /add-package /PackagePath:"C:\Temp\PE4\WinPE_OCs\en-us\WinPE-Scripting_en-us.cab"

dism /image:C:\MOUNT /add-package /PackagePath:"C:\Temp\PE4\WinPE_OCs\WinPE-WMI.cab"
dism /image:C:\MOUNT /add-package /PackagePath:"C:\Temp\PE4\WinPE_OCs\en-us\WinPE-WMI_en-us.cab"

dism /image:C:\MOUNT /add-package /PackagePath:"C:\Temp\PE4\WinPE_OCs\WinPE-NetFx4.cab"
dism /image:C:\MOUNT /add-package /PackagePath:"C:\Temp\PE4\WinPE_OCs\en-us\WinPE-NetFx4_en-us.cab"

dism /image:C:\MOUNT /add-package /PackagePath:"C:\Temp\PE4\WinPE_OCs\WinPE-PowerShell3.cab"
dism /image:C:\MOUNT /add-package /PackagePath:"C:\Temp\PE4\WinPE_OCs\en-us\WinPE-PowerShell3_en-us.cab"

dism /image:C:\MOUNT /add-package /PackagePath:"C:\Temp\PE4\WinPE_OCs\WinPE-Dot3Svc.cab"
dism /image:C:\MOUNT /add-package /PackagePath:"C:\Temp\PE4\WinPE_OCs\en-us\WinPE-Dot3Svc_en-us.cab"

 

      *You can put this code in a .bat file and run it to add all these packages in one go.

13. Now let's see how to add some drivers to your WinPE4.0.

ATTENTION: If you're building a 32bit WinPE - use 32bit drivers. For 64bit WinPE, use 64bit drivers!!
 

First, you'll need to extract the driver so that its CAT, SYS and INF files are accessible.
To add a (single) driver, type for example:
 

dism /image:C:\MOUNT /add-driver /driver:"C:\PathToDriver\drivername.inf"


DriverPacks are a good source for getting a lot of updated drivers in a single download (divided by categories).

For example, I added the LAN driver pack and the WLAN driver pack to my WinPE4.0.

ATTENTION: After downloading and extracting the driver packs, make sure to delete all the XP, Vista, NDIS5x, and NDIS61 folders, as they are not needed (WinPE4.0 is basically 6.2).
Also, I don't recommend adding the Chipset driver pack, as it contains drivers that might crash your WinPE4.0 on certain machines, and prevent it from booting normally.
Always test, test and test some more until your'e absolutely sure you have a good set of drivers.

You can add multiple drivers by typing:
 

dism /image:C:\MOUNT /add-driver /driver:[PATH TO DRIVERS] /Recurse /ForceUnsigned

This will take a while depending on the quantity and size of the drivers.

14. At this point, prior to committing your changes and unmounting the WIM file, you can copy certain portable standalone applications (such as Process Explorer, Ghost32, etc) into C:MOUNT so that they will reside inside the WIM file. However, I discourage you from doing so, as there's a better way, so bare with me.

15. Go into C:\MOUNT\Windows\System32 and open the file StartNet.cmd with Notepad (right-click on it and select "Edit").

16. By default, it only contains a single line (wpeinit). Replace its contents with the following, then save the file:
 

wpeinit
@echo off
for %%p in (a b 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 %%p:PStart set w=%%p
call %w%:PStart\PStart.exe

      Basically, it's looking for a folder named PStart in the root of all of the drives. When it finds it, it will attempt to run Pstart.exe inside that folder.

     

      NOTE for people building a 64bit WinPE4.0:

      You should use some other launcher or file explorer. For example, here I want the WinPE4.0 to launch directly into Q-dir 64bit, located in the folder Qdir:

wpeinit
@echo off
for %%p in (a b 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 %%p:Qdir set w=%%p
call %w%:Qdir\Q-dir.exe

     

      EDIT (as suggested by cdob): The code below does pretty much the same as above. I'm adding here this code which is based on Microsoft's own documentation. I've tried it, and it works just as well, so use one or the other:

wpeinit
@echo off
@color 1F
:: sets bg color to blue, and text to white

wpeutil.exe WaitForRemovableStorage
wpeutil.exe UpdateBootInfo

set PEBootRamdiskSourceDrive=
for /f "tokens=1-3 delims== " %%a in ('reg.exe query "HKLM\SYSTEM\CurrentControlSet\Control" /v "PEBootRamdiskSourceDrive" 2^>nul') do (
if %%a.==PEBootRamdiskSourceDrive. @set PEBootRamdiskSourceDrive=%%~dc
)
if Defined PEBootRamdiskSourceDrive (
echo PEBootRamdiskSourceDrive is %PEBootRamdiskSourceDrive%
)

@call %PEBootRamdiskSourceDrive%\QDir\Q-Dir.exe

 

 

17. ATTENTION: We are now going to commit our changes and unmount the WIM file. Close ALL file explorers, or the unmount process will give you an error!!

if you leave a Windows Explorer instance open, the unmounting process won't be able to cleanup the C:\MOUNT folder, and you'll see an error in the CMD window.
 

Type the following command:
 

DISM /Unmount-Wim /MountDir:C:\MOUNT /Commit

This process takes a while (a minute or so), so let it finish without interruption. When this process is finished, the C:\MOUNT folder will be empty.

18. Now copy the contents of the folder C:\Temp\PE4\Media to your flash drive. [EDITED 2012-03-21, thanks Wimb]

19. ATTENTION: This step is for WinPE 4.0 x86 ONLY. PSTART will not work on WinPE 4.0 x64, unless you manually add WoW64.
The WinPE4.0 flash drive is now bootable. However, since WinPE doesn’t have a GUI interface like a regular Windows, you have to launch your tools from the command prompt, which is too inconvenient.
That is why we're going to add PStart to the flash drive. PStart is a simple and free standalone menu which allows to start user-defined applications. Download PStart from
here.
When you run the PStartSetup211.exe, choose "Portable Setup"->Select your flash drive -> Next -> Browse -> Make new folder ->type: PStart and click OK -> Install Now -> Finish.

Here's an example of my PStart menu:

7806066.png

20. Just to remove any doubt, this is how the root of the flash drive should be at this moment (ignore the WINPEX64 name on top):

     The boot.wim file should be in the Sources folder, and PStart.exe should be in the PStart folder.

 

      12147243.jpg

21. Double-click the pstart.exe to open the menu (from the flash drive).
Copy any utilities or applications that you like to the flash drive, and drag-n-drop their executable to the PStart menu.
I highly recommend adding some sort of file explorer, for example:
Q-Dir, Explorer++, XYplorer, etc.

22. Once you're done adding all your favorite apps, close PStart by clicking File->Exit Application (clicking on the X button doesn't close it!!).

23. Eject the flash drive, and boot from it by selecting it from the BIOS Boot Menu. Once it's done loading, PStart should appear and you can pretty much do anything from here on. The great thing about adding files through PSart is that whenever you want to add a new app or update an existing one, it's as simple as drag-n-drop. Simply connect your WinPE4.0 flash drive to your Windows machine, run PStart, and perform all the necessary changes.

 

Here's a screenshot I took from one WinPE4.0 I've created:

 

12141443.png


  • Brito, Max_Real Qnx and MotoEric like this

#2 ericgl

ericgl

    Frequent Member

  • Expert
  • 340 posts
  •  
    Israel

Posted 16 March 2012 - 12:50 AM

P.S.
I'm exploring the possibility of formatting the flash drive as exFAT instead of FAT32. Will report back when I have results.

 

EDIT (2016-01-24):

I have successfully managed to get WinPE to boot on exFAT-formatted USB drive.

I used the files that are available on Win10 ISO\Sources\Boot.WIM\1\Windows\boot\PXE



#3 sambul61

sambul61

    Gold Member

  • Advanced user
  • 1568 posts
  •  
    American Samoa

Posted 16 March 2012 - 01:04 AM

Thanks ericgl for the interesting tutorial!

Just wanted to add, one can selectively install ADK packages without downloading the whole ADK. For example, I installed 64-bit ADK Deployment Tools, it took 36 Mb download. :) Unfortunately, there was no option to download only 32 or 64-bit WinPE from ADK package.

Also, in what scenarios there might be advantages in booting WinPE from boot.wim placed on a USB Thumb compare to booting WinPE from ISO placed on the Thumb? What are the advantages?

#4 misty

misty

    Gold Member

  • Developer
  • 1066 posts
  •  
    United Kingdom

Posted 16 March 2012 - 08:01 AM

Also, in what scenarios there might be advantages in booting WinPE from boot.wim placed on a USB Thumb compare to booting WinPE from ISO placed on the Thumb? What are the advantages?


No third party tools or boot managers/loaders are required if booting from a .wim file directly. To boot from an ISO file grub4dos or another boot loader is required.

I've not used WinPE 4.0 (other than when installing Windows 8) but recall that MS instructions for previous versions always advised booting from .wim as bootmgr does not support ISO mapping/booting.

#5 ericgl

ericgl

    Frequent Member

  • Expert
  • 340 posts
  •  
    Israel

Posted 16 March 2012 - 08:02 AM

sambul61,
If you have a multi-boot USB flash drive with grldr, menu.lst and ISO files - then for you I'd recommend using an ISO file.
This guide is more for people who need just the WinPE4.0.
I also have the complete Win8 CP on a USB flash drive (with the complete GUI and all), but this WinPE4.0 has its uses.

#6 Brito

Brito

    Platinum Member

  • .script developer
  • 10616 posts
  • Location:boot.wim
  • Interests:I'm just a quiet simple person with a very quiet simple life living one day at a time..
  •  
    European Union

Posted 16 March 2012 - 10:54 AM

Hi Ericgl,

I have added a link to your tutorial here: http://reboot.pro/tu...e-40-usb-drive/

You are welcome to submit these links by yourself in the future. Thanks for sharing the nice tutorial, just one point: the yellow text is unreadable, perhaps changing to red helps.

Keep up the great work!
:)
  • ericgl likes this

#7 ericgl

ericgl

    Frequent Member

  • Expert
  • 340 posts
  •  
    Israel

Posted 16 March 2012 - 02:02 PM

Thanks Nuno.
I'm using the dark theme, so the yellow text is actually quite readable. If red is more appropriate for both themes, I'll change it right away.

#8 sambul61

sambul61

    Gold Member

  • Advanced user
  • 1568 posts
  •  
    American Samoa

Posted 16 March 2012 - 02:39 PM

Thanks ericgl,

This approach looks fresh and interesting, it doesn't require extensive WinPE modding. :thumbsup:

PStart basically allows to add portable apps, and there are several such apps offered on its site, and links to more apps. I guess you suggest using portable PStart version here?

#9 ericgl

ericgl

    Frequent Member

  • Expert
  • 340 posts
  •  
    Israel

Posted 16 March 2012 - 02:48 PM

This approach looks fresh and interesting, it doesn't require extensive WinPE modding. :thumbsup:
... I guess you suggest using portable PStart version here?


Naturally :thumbsup:

When you run the PStartSetup211.exe, choose "Portable Setup". I forgot to mention that part in my tutorial.
Thanks.

EDIT: I've added this instruction to the tutorial.

#10 ericgl

ericgl

    Frequent Member

  • Expert
  • 340 posts
  •  
    Israel

Posted 21 March 2012 - 10:12 AM

As promised, I tried to create the same bootable WinPE4.0, using exFAT instead of FAT32.
1. In Win8 CP, I opened a CMD with admin rights, and typed:
 

diskpartlist diskcleancreate partition primaryactiveformat fs=exFATassignexit

2. Next, I copied everything from my WinPE4.0 FAT32 drive to this new exFAT flash drive:

xcopy E: F: /E /H

I checked the new exFAT drive and made sure all files were copied.

3. I then ejected the drive properly, and tried to boot from it.

4. Immediately when it starts booting, it displays the text "exFAT" for a couple of seconds, then it gives me the dreaded error:

Windows failed to start. A recent hardware or software change might be the cause....File: BootBCDStatus: 0xc0000001Info: An error occurred while attempting to read the boot configuration data.

Anyone here have any idea what to do to fix this, or is WinPE4.0 simply not designed to boot on an exFAT partition?
 

 

EDIT (2016-01-24):

I have successfully managed to get WinPE to boot on exFAT-formatted USB drive.

I used the files that are available on Win10 ISO\Sources\Boot.WIM\1\Windows\boot\PXE



#11 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 16066 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 21 March 2012 - 10:46 AM

From what you report, the very first part of booting is OK, as you get to a bootBCD error.

The "blind" xcopy procedure may be part of it.

You should attempt "refreshing" the bootBCD after the xcopy, anyway.

BCDedit should be good enough, but you can use one of the GUI alternatives:
http://reboot.pro/7476/
This should do:
http://www.boyans.net/

If that doesn't change anything, then it is possible that either the FS recognition is not "timely enough" (or it doesn't yet consider exFAT) or the exFAT driver has not the appropriate "start group".

:cheers:
Wonko

#12 ericgl

ericgl

    Frequent Member

  • Expert
  • 340 posts
  •  
    Israel

Posted 21 March 2012 - 10:59 AM

Wonko,

How do I refresh bootBCD using BCDedit?
I also have Visual BCD v0.9.3.1.

Care to give a step-by-step with either one of the above?
If you kindly do, please assume the flash drive has the letter F:

#13 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 16066 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 21 March 2012 - 12:22 PM

Well, the method is the "generic" how to repair a BCD, from the mouth of the wolf:
http://support.micro...kb/927391/en-us

AFAICR, the only difference is that you have to explicitly select the BCD on the F: drive (which will become C: when booting).

See:
http://technet.micro...5(v=ws.10).aspx

Something like this (adding the bolded part to each command):
bcdedit /enum all /store F:bootBCD
should do.
GUI tools generaly has an option to operate on a given BCD (not the currently in use one).

Another approach is to re-create a BCD from scratch (steps adapted from http://neosmart.net/...er+from+the+DVD ):

attrib -h -s F:bootBCD

del F:bootBCD
bcdedit /createstore F:bootBCD
bcdedit.exe /store F:bootBCD /create {bootmgr} /d "Windows Boot Manager"
bcdedit.exe /store F:bootBCD /set {bootmgr} device partition=C: F:
bcdedit.exe /store F:bootBCD /timeout 10

bcdedit.exe /store F:bootBCD /create /d "Microsoft Windows" /application osloader

bcdedit.exe should return a message with a GUID for the newly-created entry, something like this:
The entry {c0dfc4fa-cb21-11dc-81bf-005056c00008} was successfully created.

You'll need to use the value that bcdedit.exe returned for you below, along with the drive letter for the drive that Windows is installed to:
bcdedit.exe /store F:bootBCD /set {c0dfc4fa-cb21-11dc-81bf-005056c00008} device partition=C: F:
bcdedit.exe /store F:bootBCD /set {c0dfc4fa-cb21-11dc-81bf-005056c00008} osdevice partition=C: F:
bcdedit.exe /store F:bootBCD /set {c0dfc4fa-cb21-11dc-81bf-005056c00008} path Windowssystem32winload.exe
bcdedit.exe /store F:bootBCD /set {c0dfc4fa-cb21-11dc-81bf-005056c00008} systemroot Windows
bcdedit.exe /store F:bootBCD /displayorder {c0dfc4fa-cb21-11dc-81bf-005056c00008}

This is assuming that these commands have not changed in Windows 8, but I think thay havent :dubbio:

:cheers:
Wonko

#14 wimb

wimb

    Platinum Member

  • Developer
  • 3756 posts
  • Interests:Boot and Install from USB
  •  
    Netherlands

Posted 21 March 2012 - 12:39 PM

Thanks for the nice tutorial.

:cheers:

#15 ericgl

ericgl

    Frequent Member

  • Expert
  • 340 posts
  •  
    Israel

Posted 21 March 2012 - 01:41 PM

Wonko,
In the following entries, are you sure it's C:

bcdedit.exe /store F:bootBCD /set {bootmgr} device partition=C:

bcdedit.exe /store F:bootBCD /set {c0dfc4fa-cb21-11dc-81bf-005056c00008} device partition=C:

bcdedit.exe /store F:bootBCD /set {c0dfc4fa-cb21-11dc-81bf-005056c00008} osdevice partition=C:

Shouldn't those entries be partition=F: ?

#16 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 16066 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 21 March 2012 - 01:57 PM

Wonko,
In the following entries, are you sure it's C:


bcdedit.exe /store F:bootBCD /set {bootmgr} device partition=C:

bcdedit.exe /store F:bootBCD /set {c0dfc4fa-cb21-11dc-81bf-005056c00008} device partition=C:

bcdedit.exe /store F:bootBCD /set {c0dfc4fa-cb21-11dc-81bf-005056c00008} osdevice partition=C:

Shouldn't those entries be partition=F: ?

No, I don't think so, when you boot it the device partition should become C: (I guess that when you booted the "original" that you xcopied it was C: when booted).

The difference between your current situation and the "normal" tutorials is that you are editing an "offline" BCD.
(but you can still check the contents of the "original" BCD)


Yes (corrected, see post by misty below)


:cheers:
Wonko

#17 wimb

wimb

    Platinum Member

  • Developer
  • 3756 posts
  • Interests:Boot and Install from USB
  •  
    Netherlands

Posted 21 March 2012 - 03:12 PM

Instead of the wrong Step 18 (PE4_x86iso folder does not exist) and step 19
you can simply copy the content of the C:TempPE4Media folder to your USB-drive.

Or you can as I did make pe4_x86.iso so that everything is in 1 bootable ISO file by using


oscdimg.exe -n -m -o -betfsboot.com C:TempPE4Media C:TempPE4pe4_x86.iso


In that case you can use BOOT_IMG.exe or BOOT_USB.exe to make the Grub4dos menu on HDD or USB to boot the pe4_x86.iso

More Info Tools: http://technet.micro...y/hh825029.aspx
and Make PE4: http://technet.micro...y/hh825110.aspx


Posted Image

:cheers:
  • ericgl likes this

#18 misty

misty

    Gold Member

  • Developer
  • 1066 posts
  •  
    United Kingdom

Posted 21 March 2012 - 04:00 PM

Windows failed to start. A recent hardware or software change might be the cause.

...
File: \Boot\BCD
Status: 0xc0000001
Info: An error occurred while attempting to read the boot configuration data.


Is this due to a corrupted BCD store, or is it due to BOOTMGR not being able to access the store due to not recognising the file system?

I'm not familiar with this error code and my experiences with WinPE are with versions 2.*/3.*. These previous versions of WinPE usually had menu entries for the [boot] device and the BCD store should therefore work wherever it is copied to.

Also, assuming that you are loading (and booting) boot.wim and not a Windows installation, your BCD store will also need a ramdisksdidevice type entry - e.g. for boot.sdi.

Previous versions of WinPE (.wim type boot) have required, as a minimum, the following -
  • bootmgr
  • boot.wim
  • boot.sdi
  • boot\BCD
I usually copy boot.wim and boot.sdi to the boot folder. The root of my drive therefore contains the following files -
  • bootmgr
  • boot\boot.wim
  • boot\boot.sdi
  • boot\BCD
My BCD store is created using the following script (edit paths to suit you own set up) -

@echo off

setlocal



SET BCDEDIT=bcdedit.exe

SET BCDSTORE=F:\Boot\BCD



SET SDI_File=boot.sdi

SET WIM_File=boot.wim



SET LABEL="Windows PE"



echo.

echo Creating new store "%BCDSTORE%"

echo.

echo.

%BCDEDIT% /createstore %BCDSTORE%

%BCDEDIT% /store %BCDSTORE% /create {bootmgr} /d "Boot Manager"

%BCDEDIT% /store %BCDSTORE% /set {bootmgr} device boot

%BCDEDIT% /store %BCDSTORE% /set {bootmgr} timeout 20

echo.

echo Adding .sdi

echo ===========

echo.

for /f "Tokens=3" %%i in ('%BCDEDIT% /store %BCDSTORE% /create /device') do set guid_options=%%i

%BCDEDIT% /store %BCDSTORE% /set %guid_options% ramdisksdidevice boot

%BCDEDIT% /store %BCDSTORE% /set %guid_options% ramdisksdipath \boot\%SDI_File%



echo.

echo Adding .wim

echo ===========

echo.

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

echo.

echo 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=[boot]\Boot\%WIM_File%,%guid_options%

%BCDEDIT% /store %BCDSTORE% /set %GUID% device ramdisk=[boot]\Boot\%WIM_File%,%guid_options%

%BCDEDIT% /store %BCDSTORE% /displayorder %guid% /addlast

echo.

echo.

echo.

endlocal

pause

Not sure if this helps, however having had a quick look at the Consumer Preview I think it will also work with WinPE 4.0. The important bit is the boot.sdi file in addition to boot.wim. boot.sdi seems to act as a preloader - boot.wim doesn't seem to boot without it.

Personally I'd try this (the manually created BCD approach) on a known working file system, then try again on exFAT.

Good luck

Regards,

Misty
  • ericgl likes this

#19 ericgl

ericgl

    Frequent Member

  • Expert
  • 340 posts
  •  
    Israel

Posted 21 March 2012 - 04:32 PM

Wimb,
thanks for your comment. I have updated step 18 of the guide.

#20 misty

misty

    Gold Member

  • Developer
  • 1066 posts
  •  
    United Kingdom

Posted 21 March 2012 - 08:18 PM


Wonko,
In the following entries, are you sure it's C:


bcdedit.exe /store F:\boot\BCD /set {bootmgr} device partition=C:

bcdedit.exe /store F:\boot\BCD /set {c0dfc4fa-cb21-11dc-81bf-005056c00008} device partition=C:

bcdedit.exe /store F:\boot\BCD /set {c0dfc4fa-cb21-11dc-81bf-005056c00008} osdevice partition=C:

Shouldn't those entries be partition=F: ?


No, I don't think so, when you boot it the device partition should become C: (I guess that when you booted the "original" that you xcopied it was C: when booted).


@ericgl
If you are interested in bcdedit, I would recommend that you check out diddy's BCDEdit Version 6.1.7600 Notes/Guide guide (link is from forum post here)

@Wonko
I'm not sure how best to try to explain this, but I'm fairly sure that the actual data in a BCD store does not include any information about mount points. When the command ...
bcdedit.exe /store F:\boot\BCD /set {c0dfc4fa-cb21-11dc-81bf-005056c00008} osdevice partition=C:
...is executed, the actual data added to the store is based on the disk signature and partition offset of the partition currently mounted as drive C:.

According to diddy's guide (see here) -

Using a drive letter will create an entry in the BCD store containing disk signature and partition offset information........... A drive letter can be substituted with a \Device\HarddiskVolume# entry if the drive has not been mounted - where # is a numeric value starting from 1. This is not recommended if multiple devices are attached to the system as it can be complicated to predict the volume number....


When the bcdedit command bcdedit.exe /enum (or /enum ALL or /enum ALL /v) is executed, it will display user friendly information - current mount points. Device entries in the BCD store are checked against currently mounted devices, using disk signatures and partition offsets, and will display the mount point currently in use. If the device is not mounted it will use the syntax \Device\HarddiskVolume#. If the device is not present, I'm not sure what it will display.

I hope this clarifies things (and doesn't just make things more confusing).

Regards,

Misty

#21 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 16066 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 21 March 2012 - 08:25 PM

@Wonko
I'm not sure how best to try to explain this, but I'm fairly sure that the actual data in a BCD store does not include any information about mount points. When the command ...

bcdedit.exe /store F:bootBCD /set {c0dfc4fa-cb21-11dc-81bf-005056c00008} osdevice partition=C:
...is executed, the actual data added to the store is based on the disk signature and partition offset of the partition currently mounted as drive C:.

Then, I take it back. :)
And you are even "more right" :thumbsup: on the previous issue, here we are talking of a PE (using a .wim) and not of a "flat" install.

@ericgl, change the C:'s to F:'s

:cheers:
Wonko

#22 cdob

cdob

    Gold Member

  • Expert
  • 1469 posts

Posted 21 March 2012 - 10:12 PM

BCD uses [BOOT] drive by default. Bootmgr search current boot drive.

device ramdisk=[boot]\sources\boot.wim,{7619dcc8-fafe-11d9-b411-000476eba25f}
osdevice ramdisk=[boot]\sources\boot.wim,{7619dcc8-fafe-11d9-b411-000476eba25f}

There is no drive defined. That's the generic solution.

Does it makes a difference at exFAT to use a drive letter (partition offset and MBR signature)?

#23 misty

misty

    Gold Member

  • Developer
  • 1066 posts
  •  
    United Kingdom

Posted 21 March 2012 - 10:22 PM

Does it makes a difference at exFAT to use a drive letter (partition offset and MBR signature)?


Provided the [boot] device is specified (and not a drive letter which would tie it to a device by partition offset and MBR signature), then no.

The information I provided was for Wonko's education ;) .

:cheers:

Regards,
Misty

#24 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 16066 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 22 March 2012 - 07:59 AM

The information I provided was for Wonko's education ;) .

Thanks :).
So, the "best" way for ericgl is to use the little batch, let's wait for him to report if the error is gone with the new BCD (or at least it changes to a new one).
UNtil now and AFAICR the exFAT was not bootable "at all", as I see it the fact that it get till the error it means that at least something has changed, though it is possible that -for any reason - the exFAT file system driver is not "hooked" (or it is not "hooked" timely enough).

:cheers:
Wonko

#25 ericgl

ericgl

    Frequent Member

  • Expert
  • 340 posts
  •  
    Israel

Posted 22 March 2012 - 12:55 PM

Misty,
I will try your batch file, and report back with results regarding exFAT.

In the mean time, I have one more thing to report for those who might try to create a 64bit WinPE4.0.
I've performed the same procedure in my tutorial, only this time I tried to create a 64bit WinPE4.0 (on a FAT32 formatted flash drive).
Wherever there's x86 in the folder paths, I replaced with AMD64.

The flash drive booted, but then a problem showed-up. Instead of starting PStart, it gave me the following message in the Command Prompt:
The subsystem needed to support the image type is not present.

In fact, trying to start any 32bit app through the WinPE CMD DID NOT work.
Microsoft did not include the WinPE-WoW64.cab package in the ADK, so 32bit apps will not run on WinPE4.0 x64 (which of course, includes PStart.exe).

Microsoft deliberately did not include the WinPE-Wow64.cab package in the ADK, which is a required component for running 32bit apps on a 64bit OS.
I tried to search the web for such a package, but there isn't one.
The only thing I found that might hint to a solution is a ServerCore-Wow64 package that is part of Windows 8 Server Beta.

So I downloaded the 3.34GB ISO of Win8 Server Beta, and searched (including inside the WIM files) for a WoW64 CAB file, but there isn't such a cab file.
I did find, however, that the following paths contain files of what's supposed to be in a WoW64 cab file:
Sourcesinstall.wim1WindowsservicingPackages - this path contains 80 files that mention WoW64 (.CAT and .MUM)
Sourcesinstall.wim1WindowsSystem32catroot{F750E6C3-38EE-11D1-85E5-00C04FC295EE} - this path contains 40 files that mention WoW64 (.CAT and .MUM)

If someone here knows how to create a CAB package from these files, we might be able to add it properly on a 64bit WinPE4.0 ,which would be able to run 32bit apps.
Note: Looking at the CAB files that are present in the ADK, they contain a least 3 types of files: .MUM, .CAT and .manifest.
I hope this leads to a working solution.
  • JPeterson and baseliner like this





Also tagged with one or more of these keywords: winpe4.0, usb, boot, adk

3 user(s) are reading this topic

0 members, 3 guests, 0 anonymous users