none
WinPE Boot: Stuck at WPEINIT after PXE boot loads wim

    Question

  • Hi There,

    I have a PXE boot server that is in testing at the moment.  I have a script that runs to create a wim file of someones computer and collects the required applications they needs and stores it on our server.

    During this process it also uploads a selection on our PXE boot server (debian based) for them to choose their newest install from. (This has been chosen as there are only 7 of us in the company - all IT based people).  When the Windows 7 (wim) image is selected it loads perfectly fine into iPXE which then loads WinPE.

    It's at this point I get a black cmd console with wpeinit in there and nothing loading.  Can some one please advise?

    Here is the snippet of code I use to mount and unmount the computer and gab the files i need

    // ARCH setting the input for ARCH will be (use can choose)
    // BASEDIR sets the location when it will be temp stored (C:\ or D:\ ect)
    // NAME is what they choose to call it (e.g. Bob)
    set /p ARCH=Choose the architecture (x86 or amd64): 
    set /p BASEDIR=Select where it will be temporarily stored: 
    set /p NAME=Name the folder:
    
    // preset paths to make typing easier
    set WAIKPATH=%ProgramFiles%\Windows AIK
    set PEPATH=%BASEDIR%\winpe_%ARCH%
    set TFTPPATH=%BASEDIR%\bootfiles
    set BCDSTORE=%TFTPPATH%\BCD
    
    // This is the work of mounting imagex
    cd "%WAIKPATH%\Tools\PETools"
    echo "Copying the PE Files"
    call copype %ARCH% %PEPATH%
    echo "Mounting the PE image with imagex"
    
    // Creating the BCD store per the walkthough on techtalk
    bcdedit /createstore %BCDSTORE%
    bcdedit /store %BCDSTORE% /create {ramdiskoptions} /d "Ramdisk Options"
    bcdedit /store %BCDSTORE% /set {ramdiskoptions} ramdisksdidevice Boot
    bcdedit /store %BCDSTORE% /set {ramdiskoptions} ramdisksdipath  \Boot\boot.sdi
    for /f "Tokens=3" %%x in ('bcdedit /store %BCDSTORE% /create /d "Windows 7 Installation" /application osloader') do set GUID=%%x
    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\boot.wim,{ramdiskoptions}
    bcdedit /store %BCDSTORE% /set %GUID% device ramdisk=[boot]\Boot\boot.wim,{ramdiskoptions}
    bcdedit /store %BCDSTORE% /create {bootmgr} /d "Windows 7 Boot Manager"
    bcdedit /store %BCDSTORE% /set {bootmgr} timeout 30
    bcdedit /store %BCDSTORE% /set {bootmgr} displayorder %GUID%
    bcdedit /store %BCDSTORE%
    
    // Here I copy the "required folders" for wimbooting on my PXE server
    md %TFTPPATH%\fonts
    copy %PEPATH%\ISO\boot\fonts\*.* %TFTPPATH%\fonts
    
    md %BASEDIR%\%NAME%
    md %BASEDIR%\%NAME%\boot
    md %BASEDIR%\%NAME%\sources
    
    copy %TFTPPATH%\bootmgr.exe %BASEDIR%\%NAME%
    copy %TFTPPATH%\BCD %BASEDIR%\%NAME%\boot\bcd
    copy %TFTPPATH%\boot.sdi %BASEDIR%\%NAME%\boot
    copy %TFTPPATH%\winpe.wim %BASEDIR%\%NAME%\sources\boot.wim
    // Unmount image
    imagex /unmount mount

    Also this is just a very small snippet of 4 batch files that run.

    This comes out of the main one, which calls 1 more and starts another. The one it calls is where users can add additional applications to it, where the one it starts deletes all files from the "temp" store location set under "%BASEDIR%. This batch in turn calls the final one which copies and moves all files to the server and inputs the relevant config entries into the windows7 config file.

    As I mentioned before all this works perfectly fine except the last step which does nothing.

    Any help appriciated

    Friday, November 21, 2014 4:00 AM

Answers

  • boot.wim from a Windows 7 disc is the one if you want it to automatically launch Setup.exe. The install.wim is where your OS image is.

    Regarding applications, the "best" way is to use MDT where you can create custom tasks to deploy applications. You can make your own thing if you want... I did make something before MDT was available for me to use, which is why I don't use MDT.

    My method is that after the image is deployed, I copy the installers for the applications I want onto the deployed HDD. Then I have a script that gets copied over as well. So then when the OS boots for the first time, the software is installed. This is the general idea.

    I have a PXELinux as well, but it runs on a WDS/Apache mix... so my usage is different than yours.

    • Marked as answer by RenegadeGhost Tuesday, December 09, 2014 12:36 AM
    Thursday, December 04, 2014 4:49 PM

All replies

  • Is any one able to provide insight into this?? I have requested help on reboot.pro/topic/20179-winpe-boot-not-initializing/ with a different angle (shortened version) of this issue.

    Please can some one at least give me some work space?

    Wednesday, November 26, 2014 2:19 AM
  • A Winpe created with Copype will only boot to the command prompt and do nothing else. First I am confused as to why you are building a WinPE on the fly every time... but also I see no customisation added.

    Mount your image and take a look-see at your startnet.cmd.

    Wednesday, November 26, 2014 4:48 PM
  • Hi Tripredacus,

    Ok so;

    A Winpe created with Copype will only boot to the command prompt and do nothing else.

    If this is the case, could you advise me which tool I should use to make an installable version?

    Now;

    First I am confused as to why you are building a WinPE on the fly every time... but also I see no customisation added.

    Mount your image and take a look-see at your startnet.cmd.

    I am not creating an image on the fly each time, I want to have a method to create an image, IF needed, on the fly where by the 3 sections of our company can add applications where relevant.

    I have 4 scripts that run throughout this process.

    1. Creates a general image wim/boot per above
    2. Does this person want to create a full customized image (with applications) or not- if so open the second script and prompt for 'customization' (this is done using "CALL" command)
    3. Start the 3rd script and close the first script (with START command).  Tidy up the files used from mounting copy and place on the server for boot options remove all previous files from original location
    4. Start the last script and close the third.  Insert the code used for pxe booting to the correct config files.

    Hopefully that clears it up a little bit.  The main focus for me is script 1 and 2 (3 and 4 work perfectly fine). In saying this, you mention startnet.cmd. I have looked at this file and the only thing in there is the wpeinit called by the cmd. Is this not meant to load the installation? If not what is? and How do I get it working?

    The batch files (1 and 2) pretty much just run your regular process outlined here: technet.microsoft.com/en-us/library/cc709665%28v=ws.10%29.aspx
    technet.microsoft.com/en-us/magazine/hh241307.aspx


    Clearly something in there doesn't allow me to boot, so what is it?


    Thursday, November 27, 2014 10:44 PM
  • WAIK/ADK allows users to create a custom PE to use for installation or recovery purposes. It will not do anything by default except load itself, as you can see. If you do not want to use a custom PE, and want the one that installs Windows, you can use the boot.wim from a Windows 7 Setup DVD.
    Monday, December 01, 2014 5:44 PM
  • Ok so, if we take a default "boot.wim" from the windows 7 disk, which I would say is an "install.wim" file correct?

    How do we make it that applications be added to it to update an image?

    Also would it be more efficient to turn this into an iso or leave it as a wim?

    Bear in mind I am using this through PXELinux on a Linux server.

    Wednesday, December 03, 2014 8:45 PM
  • boot.wim from a Windows 7 disc is the one if you want it to automatically launch Setup.exe. The install.wim is where your OS image is.

    Regarding applications, the "best" way is to use MDT where you can create custom tasks to deploy applications. You can make your own thing if you want... I did make something before MDT was available for me to use, which is why I don't use MDT.

    My method is that after the image is deployed, I copy the installers for the applications I want onto the deployed HDD. Then I have a script that gets copied over as well. So then when the OS boots for the first time, the software is installed. This is the general idea.

    I have a PXELinux as well, but it runs on a WDS/Apache mix... so my usage is different than yours.

    • Marked as answer by RenegadeGhost Tuesday, December 09, 2014 12:36 AM
    Thursday, December 04, 2014 4:49 PM
  • While were are there.  You have mentioned the use of WDS... I was looking at this, as it seems to be the most logical way to do deployment of windows images...

    Is it by any chance possible to do so by integrating WDS with Linux or is that just asking for trouble?


    other than using an application like SCCM I'd have to make the applications deploy?
    • Edited by RenegadeGhost Monday, December 08, 2014 3:21 AM integrating
    Monday, December 08, 2014 3:21 AM
  • SCCM has some enterprise friendly options in it that I am not familiar with. For main OS deployments with applications I would recommend MDT.

    On my testing server, it is configured to boot PXELinux, which can then failover to WDS or run things for Linux. It also has Apache/IIS installed as you can then use that in combination with PXELinux to do other things. I haven't put a whole lot of time into it, as I focus on doing Windows development. For my purposes, WDS is merely a PXE application and offers up custom boot images.

    Monday, December 08, 2014 5:08 PM
  • Ahk well thanks for your help on this :) you've been a major source of information for me.  I have found an alternative which is to use the boot.wim from a Windows 7 disc (or ISO) in conjunction to unattend.xml

    An application I came across that does this for me is called RT se7en Lite which seems to do exactly what I want to do in an application format instead of having to use batch files.  So whoop whoop.

    For knowledge reference it can be found here: majorgeeks.com/files/details/rt_se7en_lite.html

    Tuesday, December 09, 2014 12:36 AM