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

#176 acmruss

acmruss
  • Members
  • 2 posts
  •  
    Australia

Posted 17 March 2013 - 05:21 AM

Hi Ericgl, thanks for all the effort you put in to share you knwledge on the building of WINPE4. Unfortuantely I got to step 13 without issues but at that point is where I got completely lost. I downloaded the drivers which happen to be much older that the ones I had on my Windows 7 notebook so Haven't applied then yet. In step

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

 

imagex.exe /unmount /commit C:\MOUNT

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.

 

but as Explorer is Windows nothing works once I closed the explorer.exe process.

 

This seems a very long winded and cumbersome way to build a boot disk so I wonder if there is an easier way as I just need one so I can boot my Windows 7 64bit O/S so and can do a complete image restore of drive C:?



#177 acmruss

acmruss
  • Members
  • 2 posts
  •  
    Australia

Posted 17 March 2013 - 05:31 AM

Oops forgot one bit. The reason I was told I had to have a winpe 4 boot disk is that I have tried using the boot disk from a few backup programs ie Drive Snapshot 1.4 , Norton Ghost and neither would let me see the both two internal disks and the the external USB drive and the NAS storage device (network attached) which is where my backups are stored. I tried the Windows 7 install disk to boot but it took me to the HP Recovery Manager which won't let you restore from my backups to the correct drive.



#178 ericgl

ericgl

    Frequent Member

  • Expert
  • 340 posts
  •  
    Israel

Posted 17 March 2013 - 07:01 AM

acmruss,

 

Perhaps I should clarify:

Before un-mounting, you need to close all File Explorers you may have open.

If you close all explorer.exe processes, you will also close the Windows shell.

When I say "File Explorers", I mean: Windows Explorer, Explorer++, Q-dir ...or any other file explorer you may have.

 

They interrupt the un-mounting procedure ("Mount" folder will not get cleaned-up), so make sure to close all of them.

But you can leave the Windows shell running (explorer.exe with window title "Program Manager").

 

I'll update the guide to make sure others don't get confused.

 

 

Now, regarding the drivers:

You can use any driver version you want, but be sure it's compatible with Windows 8 and the architecture you're building (x86 or x64).



#179 MotoEric

MotoEric
  • Members
  • 1 posts
  •  
    United States

Posted 17 March 2013 - 03:55 PM

First post, and wanted to thank Ericgl and everyone else's help with this tutorial.  The information and tools I learned going through it have been amazing!  I have been using an older version of WindowsPE at my job to kick off WIM and Ghost images, and wanted to try out the latest version of WindowsPE to see if there are any advantages to using the Windows 8 version.  That's what originally brought me here.

 

I wanted to make a post to bring up an issue that I saw a few others ran into through out this thread, and hoping it could help others if they run into this.  After going through the tutorial I kept having issues getting my new-ish HP desktop to boot off my USB stick.  I chose to do the 32-bit version of WindowsPE through out these attempts to boot off it.  I used the QEMU Emulator and it booted off the USB stick fine, so I assumed my BIOS was the issue.  I then started reading more into UEFI.  I created a 64-Bit version of the WIndowsPE USB stick and it booted fine!  The reason I chose the 32-Bit version was because a lot of the PC's I would be using it on at my job are older.

 

Long story short, and this may already be common knowledge but I found a post on Technet from a user who stated:

"Booting X86 WINPE 4.0 requires that the UEFI be at least 2.3.1."

 

I updated my BIOS to the latest version and boom....can boot off of a 4.0 WindowsPE 32 or 64 bit stick now.  :clap:

 

Again...thank you everyone for all the information provided in this thread!

 

Cheers,

Eric



#180 ericgl

ericgl

    Frequent Member

  • Expert
  • 340 posts
  •  
    Israel

Posted 18 March 2013 - 07:42 AM

MotoEric,

 

Thanks for your feedback.

I generally recommend creating a 64bit version nowadays.

Most apps have a native 64bit version already, and if not - their developers will probably release one very soon.

 

I haven't had issues booting my WinPE4.0 x64 on any laptop yet (both old BIOS and new "Fast Boot" UEFI).



#181 ericgl

ericgl

    Frequent Member

  • Expert
  • 340 posts
  •  
    Israel

Posted 19 March 2013 - 03:52 PM

Good news, guys!!

I've just found a way to turn my WinPE4.0 flash drive to a multi-boot WinPE flash drive.
It envloves editing the BCD store, and adding several boot.wim files to the Sources folder on your WinPE4.0 flash drive.
You need to give each WIM file a unique name (without spaces).

Here are the instructions:

NOTES:
E:\ is the letter of the bootable USB flash drive.
bcdedit.exe must be version 6.2.9200 or newer (available by default in Win8).

1. Connect your WinPE flash drive to your Win7/Win8 machine and open CMD with admin rights.

 

2. To display the existing boot entries in the BCD store, type:

bcdedit /store E:\boot\bcd /ENUM

Among things shown, you'll see the default GUID, which is usually: {7619dcc8-fafe-11d9-b411-000476eba25f}

3. To create a copy of the default entry, type:
 

bcdedit /store E:\boot\bcd /copy {default} /d "NAME OF ENTRY"

This will add a new entry and will show you the auto-generated GUID it's been given. For example: {19d2ff6e-908f-11e2-acb5-902b343deb0f}

4. To point the default entry to another WIM file, type:
 

bcdedit /store E:\boot\bcd /set {default} DEVICE ramdisk=[boot]\sources\WinPE40_x64.wim,{GUID of default}    
bcdedit /store E:\boot\bcd /set {default} OSDEVICE ramdisk=[boot]\sources\WinPE40_x64.wim,{GUID of default}

*Replace "GUID of default" with the actual GUID.

 

5. To point the 2nd entry to a WIM file, type:
 

bcdedit /store E:\boot\bcd /set {newguid} DEVICE ramdisk=[boot]\sources\2nd.wim,{GUID of default}    
bcdedit /store E:\boot\bcd /set {newguid} OSDEVICE ramdisk=[boot]\sources\2nd.wim,{GUID of default}

*Replace "GUID of default" with the actual GUID.

You can add more entries by repeating steps 2 and 4.

6. To change the description of an entry:
 

bcdedit.exe /store E:\Boot\bcd /set {default} description "WinPE4.0 x64" 
bcdedit.exe /store E:\Boot\bcd /set {2nd entry GUID} description "WinPE4.0 x86"
bcdedit.exe /store E:\Boot\bcd /set {3rd entry GUID} description "WinRE from Win8 Pro VL x64"

and so on...

*Replace the "XXX entry GUID" with the actual GUID of the entry.

 

12461563.png

*click on image for larger.

 

The above info is all good and well for booting from flash drives in non-UEFI mode.

 

To make the flash drive boot in UEFI mode, we also need to make changes to the bcd file in E:\EFI\Microsoft\boot.

1. First create a copy of the bcd file in E:\EFI\Microsoft\boot just in case something goes wrong (simply copy & paste it, and a new file will be created).

2. Copy your modified "regular" non-UEFI bcd file from E:\boot to E:\EFI\Microsoft\boot (overwrite the existing one).

3. Open CMD with admin rights, and type:

bcdedit /store E:\EFI\Microsoft\boot\bcd /set {default} path "\windows\system32\boot\winload.efi"
bcdedit /store E:\EFI\Microsoft\boot\bcd /set {2nd GUID} path "\windows\system32\boot\winload.efi"
bcdedit /store E:\EFI\Microsoft\boot\bcd /set {3rd GUID} path "\windows\system32\boot\winload.efi"

    and so on, if you have more entries (and more WIM files, of course).



#182 Wonko the Sane

Wonko the Sane

    The Finder

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

Posted 19 March 2013 - 04:16 PM

Eric, 

excuse me, but is it not your method the same "traditional" one, already used for Vista :ph34r: and 7 based PE's? :unsure:

Example

http://forum.daemon-...able-dvd-23728/

 

:cheers:

Wonko



#183 ericgl

ericgl

    Frequent Member

  • Expert
  • 340 posts
  •  
    Israel

Posted 19 March 2013 - 04:21 PM

Wonko,

 

 

Yes, looks pretty much the same, but I did not get this info from this source.

In any case, it's new to me...I've just found out about it today.

 

Anyway, it's nice to have the code here as well for completeness.



#184 Wonko the Sane

Wonko the Sane

    The Finder

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

Posted 19 March 2013 - 04:26 PM

Anyway, it's nice to have the code here as well for completeness.

The video tutorial is a bonus for reboot.pro readers.

Sure :) :thumbup:, I was only wondering if there were any "news" or "changes" (introduced by the PE being a 4.x, based on Windows 8 :ph34r:) in that approach.

 

:cheers:

Wonko



#185 ericgl

ericgl

    Frequent Member

  • Expert
  • 340 posts
  •  
    Israel

Posted 20 March 2013 - 04:37 PM

Wonko (and others),

 

Check out the info I've added to the bottom of my previous post regarding booting in UEFI mode.



#186 UnrealNeil

UnrealNeil
  • Members
  • 2 posts

Posted 22 March 2013 - 03:35 PM

To make a WinPE disk in Windows 8, without all the downloads...
 
Requirements - You must be running Windows 8
 
You do not need to download anything from anywhere No WAIK kit, nothing, nada.  Windows 8 has DISM and a boot.wim and associated files; built in and ImageX is so last year...
Windows 8 x64 can make a x64 Win PE 4.0 and the 32 bit version makes a 32 bit Win PE 4.0
  1. Insert a blank USB or one you don't mind having wiped
  2. Run RecoveryDrive.exe "Create a Recovery Drive" of the start menu
You're done!
Nothing Downloaded!
 
Customise the WinPE 4.0 experience
Unhide the boot.wim (lets say your USB is J:), Run this command
  • arttrib /S J:\boot.wim -r -s -h
copy the boot.wim to the hard drive somewhere (HDD editing is quicker than USB based editing)
Lets say you copy the whole USB disk to C:\MyWinPE\
Run these two commands
  • MD C:\MyWinPE\Mount
  • DISM /Mount-Image  /ImageFile:"C:\MyWinPE\media\sources\boot.wim"  /index:1  /MountDir:"C:\MyWinPE\Mount"
Then copy any utility programs to C:\MyWinPE\Mount\Program Files\whatever
Edit "C:\MyWinPE\Mount\Windows\System32\winpeshl.ini" to run your favourite shell
e.g. I have BS Explorer in C:\MyWinPE\Mount\Program Files\bsexplorer
and My winpeshl.ini looks like this
[LaunchApps]
%WinDir%\system32\netsh.exe, "interface ipv4 set global MLDversion=Version2"
"%SystemDrive%\Program Files\bsexplorer\explorer.exe"
 
When you are done tinkering (and these forums have lots of cools ways to tinker) save your changes with 
  • DISM /Unmount-Wim /Commit /MountDir:"C:\MyWinPE\Mount"
Or Discard them with
  • DISM /Unmount-Wim /Discard /MountDir:"C:\MyWinPE\Mount"
 


#187 ericgl

ericgl

    Frequent Member

  • Expert
  • 340 posts
  •  
    Israel

Posted 23 March 2013 - 08:23 AM

UnrealNeil,

 

Thanks for your suggestion.

Running RecoveryDrive.exe is definitely faster then what's described in my guide. Wimb has also suggested using it.

 

However, not all people have Windows 8 installed. I believe most are still using Windows 7.

Secondly, by using WAIK, users can create both 32bit and 64bit versions, regardless of the architecture of their running OS.

My guide also goes through adding drivers and optional packages.

 

A good suggestion, none the less. I'm sure some users will find it useful.

Cheers  :cheers: 



#188 ericgl

ericgl

    Frequent Member

  • Expert
  • 340 posts
  •  
    Israel

Posted 31 March 2013 - 07:03 AM

Updated the guide today:

I've changed steps 10 and 17 - now using DISM command instead of (the outdated) IMAGEX.

This helps reduce the tools needed in the guide.

Cheers  :good: 



#189 cellage

cellage

    Newbie

  • Members
  • 14 posts
  •  
    Malaysia

Posted 16 May 2013 - 06:56 AM

I had a question about adding drivers but I didnt want to interubt

Can you help me with my question

Adding drivers to winPE 4.0 offline the drivers are not recognized

Thanks

 



#190 UnrealNeil

UnrealNeil
  • Members
  • 2 posts

Posted 16 May 2013 - 11:29 AM

Here's a screenshot of my Current homemade helper... It's set for Windows 8 (but could be modified to run on that old dog, Windows 7).

NLBWMC4.png



#191 ericgl

ericgl

    Frequent Member

  • Expert
  • 340 posts
  •  
    Israel

Posted 16 May 2013 - 11:34 AM

UnrealNeil,

 

Looks good.

Would be nice to have a Windows 7 version as well (which will create a WinPE4.0, not WinPE3.0).

 

Then please share with the forum here and add download links.



#192 Wonko the Sane

Wonko the Sane

    The Finder

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

Posted 17 May 2013 - 01:43 PM

Just to keep things as together as possible, some findings on WinPE 4.0 behaviour are "in the works" here:

http://www.msfn.org/...ive-on-c-drive/

 

:cheers:

Wonko



#193 baseliner

baseliner
  • Members
  • 2 posts
  •  
    United Kingdom

Posted 17 November 2013 - 10:00 PM

Not only a first rate Tutorial but what a powerful Boot solution. What a life saver - now adding Mass storage drivers for new raid cards is a doddle rather than a major hurdle to conventional imaging methods.



#194 ericgl

ericgl

    Frequent Member

  • Expert
  • 340 posts
  •  
    Israel

Posted 18 November 2013 - 07:03 AM

baseliner,

Thanks!

 

Glad you found it useful.

Now how about moving up to WinPE 5.0 x64 ?



#195 baseliner

baseliner
  • Members
  • 2 posts
  •  
    United Kingdom

Posted 18 November 2013 - 05:39 PM

Thanks, even better.



#196 Mr.JoeM

Mr.JoeM
  • Members
  • 4 posts
  •  
    United States

Posted 26 March 2014 - 12:30 AM

I am getting an error when running the following command :
 
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\WinPE-Scripting.cab"
 
I get an access denied, although the dism log is much longer.
 
Any ideas?



Are you running McAfee VSE? If so, try disabling Access protection while you are using DISM.exe
https://kc.mcafee.co...tent&id=KB76867

~joe

#197 Blackbeauty

Blackbeauty

    Newbie

  • Members
  • 27 posts
  •  
    India

Posted 30 July 2015 - 11:37 AM

@Ericgl : did you find out  WinPE-WoW64.cab package?. I'm in need, If you have it (or other solutions)  please help. 



#198 ericgl

ericgl

    Frequent Member

  • Expert
  • 340 posts
  •  
    Israel

Posted 30 July 2015 - 01:43 PM

Blackbeauty,

 

No, I didn't bother looking for it any more. There are 2 reasons for it:

1. I created a USB drive with both WinPE x86 and WinPE x64.

2. I also put on that USB drive the excellent Win8.1SE, which already has support for 32bit apps in 64bit WinPE.

    Win8.1SE also has a nice UI, like a real Windows platform.

 

I set up a boot menu which allows me to boot to whichever one I want.

Hope that helps. Cheers.


  • Blackbeauty likes this





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

1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users