Jan 112014
 

There are times where you may not have a dvd drive or media available, or else, you may also want to perform some tasks before triggering the windows setup.

Agenda

  • Prepare winpe with QuickPE
  • Prepare the ipxe script
  • Prepare the PXE server with TinyPxe Server
  • Boot to winpe and Install windows
  • Reboot and complete the installation on the local drive

Prepare winpe with QuickPE

You can either use MS WAIK (winpe3), or MS ADK (winpe4) or an existing windows setup DVD or ISO file.
Launch _run_me.cmd and make your choice.

quickpe_menu

Prepare the ipxe script

The following will attach an iscsi drive and will boot your winpe


#!ipxe
dhcp net0
set boot-url http://${dhcp-server}
initrd ${boot-url}/images/winpe4.iso
kernel ${boot-url}/memdisk iso raw
boot

Prepare the PXE server with TinyPxe Server

Use ipxe-undionly.kpxe as « boot file name » and the above script (name it install.ipxe) as « filename if user-class=iPXE »

tinypxeserver

Boot to Winpe

Now lets network boot (pxe as first device in the bios).
Computer will pxe boot, load ipxe, then load your script.
The script will boot into winpe.

Now we are ready to perform the installation : map a drive thanks to PeNetwork (in the tinyshell launchbar) and map a network share containing your windows installation files.
You could eventually script this part (in batch file) :

net use \\servername\sharename /user:username password
\\servername\sharename\setup.exe

Note1 : CloneDisk can also mount a virtual dvd drive from an iso file (only in winpe4).

Note2 : Rather than launching the setup.exe from the windows DVD, you can also apply a wim file to the target drive using imagex (or clonedisk).
If so, then remember that you need to prepare the drive (partition active, boot sector …).
Example code using imagex (we’ll assume the partition has been made active already) :

Imagex /apply \\servername\sharename\install.wim 1 c:
bcdboot c:\windows /s c:
bootsect /nt60 c: /mbr

Launch the windows setup and let it run.

Reboot to local drive

Windows should the complete the installation, and reboot one last to your windows desktop.

See below a video demonstrating the above steps.

 Posted by at 14 h 51 min

  6 Responses to “How to install Windows (7 or 8) thru WINPE, via PXE”

  1. Firstly, thank you for publishing your hard work! I would start a new thread, but have no twitter or facebook to register an account.
    I want to boot a diskless laptop with PXE to start, no nic ROM flashing & only a DVD drive for alternate booting, no USB boot. My ultimate goal is to press the start button on the laptop & it will WOL the target PC if necessary & give me a boot menu or, if the target PC is already running, offer me one or more .vhd’s to boot.
    The target is a PC with an OS (Vista SP2 & up, non-server) and extra blank primary partition for installing Vista & up via WinPE3 (iSCSI driver & Control Panel package integrated). A technician PC (non-server) is available on the network.
    At the network head is an ASUS RT-N16 router with stock firmware that can serve up an USB key via TFTP. It is set up with a domain from ASUS.
    From what I can gather, I need to chainload gPXE with an embedded script. Is it possible to do this all from the USB key? Must I have a running instance of Tiny PXE Server (for example) every time, or is it only necessary for the initial install to the target? I guess in the « target PC already running » scenario, it would be OK to have a serving software run at startup if necessary.
    The idea is, I don’t want to run any software in the boot process after the installation to target, just (?)PXE & boot-scripts, etc. in the TFTP USB key (& likely this is where Win PE iso sits too)
    Is this doable, or am I barking up the wrong tree?
    Wil

  2. Hi BIG THANKS for help!!!!

    everything boots and i go through install till end sweet
    my only issue is I use Asus router with NAS
    so in dnsmasq.conf i have entered

    dhcp-boot=undionly.kpxe,tag:!ipxe,192.168.1.50

    but i cant figure out how to implement script in to it
    to avoid ctrl+b and and running it manualy

    could you help please?

    • you can either integrate the script in your bootstrap image (the ipxe generator web site will do it for you).
      or on second dhcp request (from ipxe), use Tiny PXE Server to serve your script.

  3. Hi, I’m testing tiny pxe server 1.0.0.19 on VirtualBox 5.0.10 but there is a problem

    (Obviously I have tested this on a real pc and it’s works)

    With VirtualBox the download stops at 5%, sometimes at 1% or 3% 4% and there is no activity in the network icon in the virtual machine window

    Boot file: ipxe-undionly.kpxe
    Filename if user […]: install.ipxe

    install.ipxe

    #!ipxe
    dhcp net0
    set boot-url http://${dhcp-server}
    initrd ${boot-url}/images/winre.iso
    kernel ${boot-url}/memdisk iso raw
    boot

    log

    19:47:55 HTTPd:Connect: 192.168.1.108, TID=6440
    19:47:55 HTTPd:Client: 192.168.1.108 [GET] /images/winre.iso
    19:47:55 HTTPd:Server : Returning /images/winre.iso
    19:48:21 HTTPd:Exception: , Connection Closed Gracefully.
    19:48:21 HTTPd:DisConnect: TID=6440

    The winre.iso was created with QuickPE with a Windows 8.1 RTM X86 ISO

    I tested with wmware and it works, I’m wondering wich VirtualBox version or configuration did you use, because it’s virtualbox fault but I think there is a solution for this

    Thanks!!

 Leave a Reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

(required)

(required)