Jump to content











Photo

How to add Win8PE_SE to existing UEFI Windows 8 harddisk


  • Please log in to reply
12 replies to this topic

#1 chestertomato

chestertomato

    Newbie

  • Members
  • 27 posts
  •  
    Hong Kong

Posted 21 September 2013 - 09:21 PM

I want to add Win8PE_SE_2013-05-24 to my UEFI/GPT Windows 8 harddisk. Use EasyBCD "Add New Entry" to make It multi-boot , but the Win8PE_SE boot fail.

 

I've tried the ADK sample winpe.wim. It boot OK and I can see the "X:\Windows\System32" , I make it like this :

 

cd "C:\Program Files (x86)\Windows Kits\8.0\Assessment and Deployment Kit\Deployment Tools\amd64\DISM"
imagex /apply "C:\Program Files (x86)\Windows Kits\8.0\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\en-us\winpe.wim" 1 E:\ /verify
bcdedit /copy {default} /d "WinPE"
bcdedit /set {insert new guid} device partition=E:
bcdedit /set {insert new guid} osdevice partition=E:
bcdedit /set {insert new guid} detecthal yes
bcdedit /set {insert new guid} winpe yes

 

But nomatter Win8PE_SE or winpe.wim , there's still problems :

 

1. Restart computer , sometimes it goes directly to Windows 8 without bootmenu

2. Restart computer , sometimes the bootmenu appear , by the countdown timer 30sec disappear. So I've to choose manually and press Enter key.

3. In the WinPE mode X:\Windows\System32 , I've add my VB6 program "Restore.exe" (with msvbvm60.dll) to backup and restore Windows by ghost , and also the AOMEI Partition Assistant. But they all execute with error like :

"Supported image type system not existed"

 

In the winpe.wim I've already add WinPE-HTA.cab , WinPE-Scripting.cab and WinPE-WMI.cab , and programs still can't be executed.

 

Please help



#2 ktp

ktp

    Silver Member

  • Advanced user
  • 773 posts

Posted 22 September 2013 - 03:42 AM

For booting with UEFI, you need Win8PE_SE and x64 build, otherwise (x86 build) it cannot work.

Check that EasyBCD has added correctly the BCD entry by using bcdedit /v, and verify that \windows\system32\winload.efi is used instead of \windows\system32\winload.exe
For 1), add to {bootmgr} (Windows Boot Manager) entry the element DisplayBootMenu, value Yes.
For 2), verify/set that {bootmgr} entry has element timeout, value 30.
For 3), verify that these programs work well under x86 and x64, under other PE environment (Windows 7 PE for example).



#3 boulcat

boulcat

    Member

  • Advanced user
  • 51 posts
  •  
    Belgium

Posted 22 September 2013 - 09:13 AM

I use the same terrific project and also the x64 build

I added nothing for WMI, it seems to work well here, same for VB script.  

 

 

I do not have UEFI PC, but to anticipate if I have to help out a friend who needs.
If you can confirm, correct following your testing

 

I saw that the HDD or UFD must be in FAT32 file system.
I saw also that there is 2 stores:
- boot\bcd               ==> Path = \windows\system32\boot\winload.exe
- efi\microsoft\boot\bcd ==> Path = \windows\system32\boot\winload.efi

 

I guess the first is for PC BIOS and the second for UEFI.
and the MBR call alone one or the other depending on the BIOS/UEFI computer.
Is it working like that ?



#4 ktp

ktp

    Silver Member

  • Advanced user
  • 773 posts

Posted 22 September 2013 - 10:23 AM

I think more exactly that it is the Windows Boot Manager (bootmgr/bootmgfw.efi) that upon boot  will use /boot/bcd (if boot with BIOS) and /EFI/Microsoft/boot/bcd (if boot with UEFI).

 

You can experiment with UEFI firmware using VMware workstation by adding a line

firmware = "efi"

into your virtual machine vmx file.



#5 chestertomato

chestertomato

    Newbie

  • Members
  • 27 posts
  •  
    Hong Kong

Posted 22 September 2013 - 11:33 AM

Yes, I use Win8PE_SE_2013-05-24 x64 version , then use EasyBCD right the way. But the Win8PE didn't boot.



#6 ktp

ktp

    Silver Member

  • Advanced user
  • 773 posts

Posted 22 September 2013 - 11:37 AM

As far as I know and use, EasyBCD never uses winload.efi as path so it cannot works for UEFI.

As I said: "Check that EasyBCD has added correctly the BCD entry by using bcdedit /v, and verify that \windows\system32\winload.efi is used instead of \windows\system32\winload.exe". (check the file /EFI/Microsoft/boot/BCD).



#7 cdob

cdob

    Gold Member

  • Expert
  • 1469 posts

Posted 22 September 2013 - 04:08 PM

@chestertomato

Compare section 5 as a example
Walkthrough: Boot Windows PE from a UEFI-based Hard Disk
http://technet.micro...y/hh265131.aspx

#8 chestertomato

chestertomato

    Newbie

  • Members
  • 27 posts
  •  
    Hong Kong

Posted 22 September 2013 - 05:21 PM

 

 

 

bcdedit /v

 

Windows Loader
------------------
identifier                                 {e6dab8de-1ef5-11e3-95be-c4690d3f775a}
device                                     partition=C:
path                                        \Windows\system32\winload.efi
description                              Windows 8
locale                                      zh-HK
inherit                                     {6efb52bf-1766-41db-a6b3-0ee5eff72bd7}
recoverysequence                 {e6dab8f9-1ef5-11e3-95be-c4690d3f775a}
integrityservices                     Enable
recoveryenabled                    Yes
isolatedcontext                       Yes
allowedinmemorysettings       0x15000075
osdevice                                 partition=C:
systemroot                              \Windows
resumeobject                          {e6dab8dd-1ef5-11e3-95be-c4690d3f775a}
nx                                            OptIn
numproc                                  2
bootmenupolicy                      Standard
usefirmwarepcisettings           No

Windows Loader
-------------------
identifier                                  {e6dab912-1ef5-11e3-95be-c4690d3f775a}
device                                     partition=E:
path                                         \Windows\system32\winload.efi
description                              WinPE
locale                                      zh-HK
inherit                                     {6efb52bf-1766-41db-a6b3-0ee5eff72bd7}
recoverysequence                  {e6dab8f9-1ef5-11e3-95be-c4690d3f775a}
integrityservices                      Enable
recoveryenabled                     Yes
isolatedcontext                        Yes
allowedinmemorysettings        0x15000075
osdevice                                  partition=E:
systemroot                               \Windows
resumeobject                           {e6dab8dd-1ef5-11e3-95be-c4690d3f775a}
nx                                             OptIn
numproc                                   2
bootmenupolicy                       Standard
detecthal                                 Yes
winpe                                      Yes
usefirmwarepcisettings           No

 

That's my bcdedit with Win8PE

 

In BIOS harddisk 64bit Win8PE can run 32bit program like AOMEI Partition Assistant , I don't understand why UEFI/GPT can't , when program run , there's always an error message :

           "The subsystem needed to support the image type is not present"

I've try to copy files "ocsetup.exe" , "wow64.dll , "wow64cpu.dll" and "wow64win.dll" to X:\Windows\System32 and type :

           "start /w ocsetup.exe servercore-wow64" (without quote)

Then execute the program again , but the error message still appear.

I reboot computer back to X:\Windows\System32 and run the program , but with same error message

 

Please help



#9 ktp

ktp

    Silver Member

  • Advanced user
  • 773 posts

Posted 22 September 2013 - 05:55 PM

It looks like a kind of SysWOW64-related problem (32/64 bit). I suspect that you have a problem building Win8PE 64-bit. I am using the Win8PE SE Winbuilder project, and no problem found running Aomei Partition Assistant, Partition Guru or miniTool Partition Wizard, all are kind of "portable" programs (simply taken from their installed directory in real windows).

 

Note: Copying extra dll files to \system32 on 64-bit environment is very bad and should be avoided, especially when the same DLLs already exist in SysWow64 directory.

 

Edit: refer also to this topic:

http://spam/index.php?topic=677.0



#10 boulcat

boulcat

    Member

  • Advanced user
  • 51 posts
  •  
    Belgium

Posted 22 September 2013 - 09:09 PM

You can experiment with UEFI firmware using VMware workstation by adding a line

firmware = "efi"

into your virtual machine vmx file.

 

Thank you for the tip, the ISO works well (equivalent to CD/DVD) in VMware BIOS and UEFI.

 

Is there a possibility to do the same EFI test in VMware or VirtualBox and starting from a USB stick ?



#11 ktp

ktp

    Silver Member

  • Advanced user
  • 773 posts

Posted 23 September 2013 - 02:21 AM

I think you can use in VMware: "Edit Virtual machine settings", Hard disk, button Add, choose option "Use physical disk (for advanced users)". Then select your USB hard disk.

 

Tips: Maybe is it better to unassign the USB hard disk drive letter first from your Host OS, before using it inside the VM, to avoid conflictual access. You can reassign the driver letter once the virtual machine is shutdown.



#12 boulcat

boulcat

    Member

  • Advanced user
  • 51 posts
  •  
    Belgium

Posted 23 September 2013 - 08:47 AM

I think you can use in VMware: "Edit Virtual machine settings", Hard disk, button Add, choose option "Use physical disk (for advanced users)". Then select your USB hard disk.

 

Thanks ktp, I started from your advice and I managed to make it work :thumbsup:

 

Here a little tutorial to explain what I have done for the following

Start USB stick (or USB-hdd) in VMWare and in BIOS/UEFI Mode

 

From Win8PE_SE x64 previously built,  I chose the option "Copy to USB-Device BCD BootMGR" in WriteMedia folder to build my usb key.

For info, in bcd store, I have : 

 

* bcdedit /store I:\ Boot\bcd   (I: is my Usb  drive) :

- Timeout=5
- {default} device=ramdisk=[boot]\sources\boot.wim
- {default} path=\windows\system32\boot\winload.exe

- Second identifier {d1cf...} path=\grldr.mbr

 
* bcdedit /store I:\efi\microsoft\boot\bcd :

- Timeout=30
- {default} device=ramdisk=[boot]\sources\boot.wim
- {default} path=\windows\system32\boot\winload.efi

 

setting to boot from the USB key in in VMWare (Workstation v9.0.1 for me):
Create New Virtual Machine
Typical (recommanded)
I will install the operating system later
Version Windows 8 x64
Name USB_Win8PE (the name I gave)
maximum disk space 1 Gb
Finish

 

Then I Edit Virtual machine setting:
Add Hard Disk then Next button
Select Use a physical disk (for advanced users)
Device Physicaldrive5 (here for me, my usb flash disk) and select Use entire disk
I leave the name as it is for Speify Disk File and button Finish
Optional for my initial test: I select the previous Hard Disk defined and Remove button (for sure not be used)

 

At startup I get the message "You are using a SCSI physical disk. SCSI physical disk dual-boot performance is poor......   (OK)
Great, it starts well in BIOS Mode from my USB :thumbsup:

With the display of Windows Boot Manager and options Win8PESE and Grub4dos

 

To test the USB key in UEFI now with WMware

I manually changed the vmx file (in notepad) and I added firmware = "efi" in second line after .encoding = "windows-1252"
I have the same message at startup "You are using a SCSI physical disk....
and great, my USB stick starts in UEFI as well :thumbsup:

 

msinfo32.exe to check the UEFI

wjdm.jpg
 

Additional info (Looking at the log) to format the USB key and Install MBR (nt60) manually with BOOTICE
BOOTICE.exe /device=I: /partitions /repartition /activate /usb-hdd /fstype=FAT32 /vollabel=Win8PESE
BOOTICE.exe /device=I: /mbr /install /type=nt60 /quiet


Edited by boulcat, 23 September 2013 - 09:45 AM.


#13 komitaltrade

komitaltrade

    Newbie

  • Members
  • 15 posts
  •  
    Ecuador

Posted 09 November 2013 - 02:33 PM

I want to add Win8PE_SE_2013-05-24 to my UEFI/GPT Windows 8 harddisk. Use EasyBCD "Add New Entry" to make It multi-boot , but the Win8PE_SE boot fail.

 

I've tried the ADK sample winpe.wim. It boot OK and I can see the "X:\Windows\System32" , I make it like this :

 

cd "C:\Program Files (x86)\Windows Kits\8.0\Assessment and Deployment Kit\Deployment Tools\amd64\DISM"
imagex /apply "C:\Program Files (x86)\Windows Kits\8.0\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\en-us\winpe.wim" 1 E:\ /verify
bcdedit /copy {default} /d "WinPE"
bcdedit /set {insert new guid} device partition=E:
bcdedit /set {insert new guid} osdevice partition=E:
bcdedit /set {insert new guid} detecthal yes
bcdedit /set {insert new guid} winpe yes

 

But nomatter Win8PE_SE or winpe.wim , there's still problems :

 

1. Restart computer , sometimes it goes directly to Windows 8 without bootmenu

2. Restart computer , sometimes the bootmenu appear , by the countdown timer 30sec disappear. So I've to choose manually and press Enter key.

3. In the WinPE mode X:\Windows\System32 , I've add my VB6 program "Restore.exe" (with msvbvm60.dll) to backup and restore Windows by ghost , and also the AOMEI Partition Assistant. But they all execute with error like :

"Supported image type system not existed"

 

In the winpe.wim I've already add WinPE-HTA.cab , WinPE-Scripting.cab and WinPE-WMI.cab , and programs still can't be executed.

 

Please help

 

Simple solution.

 

1) Boot from your USB stick with targeted PESE.

 

2) Create hidden partition (I guess that you have tools on your PESE, so say, CMD with DISKPART).

 

3) Copy everything from Y drive to new partition and reboot.

 

4) Depends on bootloader manager what you use, new menu entry will appear. If not, you have menu entry in BIOS boot menu (usually F12, but can be also other like ESC).

 

ADVANTAGE of solution

 

1) You willnot mess with your main EFI partition and menu.

 

2) Easy to manipulate from your OS with your "rescue" partition.

 

3) Easy to make any sort of changes without any impact on rest of your PC.

 

4) Unlimited entry options like this (so many independent "rescue" partitions and PESE.

 

5) Easy combintion either with BCD or GRUB2 (DONT MESS WITH GRUB4DOS!!!!).

 

6) .......

 

7) Enjoy .....






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users