Mar
09
2010




How to Install Windows 7 over a Network using Linux – PXE, DNSMasq, and Samba

As the age of the netbook arises; the ability to provision Operating Systems over the network becomes highly useful.  More and more these days, it’s less common to see CD/DVD ROM drives in laptops.  In my particular situation my laptop DVD-ROM drive failed.  This prompted me to embark on journey of sleepless nights, sifting through bad information and countless hours of ‘trial & error’ troubleshooting to make Windows 7 install from PXE boot server.

When I first started this project I had no idea what I was getting into or how difficult and poorly documented the PXE remote installation process is.  I imagined that I would use some kind RAM disk to load an ISO image of a Windows CD.  However, the process to boot an ISO image varies greatly between Operating Systems and Windows versions. So if you plan to install Windows XP or Linux using this tutorial…  you will fail.  This Tutorial is step by step for installing Windows 7(only) from a Fedora 10 provisioning server.  This tutorial assumes you have basic Linux, Windows, and Networking knowledge.

Goals of this post:

- Configure Linux Provisioning Server
- Prepare installation media and installation files
- Boot from PXE to Windows PE 2.0
- Install Windows 7 over Network

Configure Linux Provisioning Server: DNSMasq

In a nutshell PXE is a standard for giving special instructions to computers booting from a network.  PXE requires special DHCP options to accomplish this.  Typical home(low end) routers do not include this capability in their products.  So we will need our own DHCP server with our custom options set for PXE.

Use YUM(or the package manger of your distro) to install the popular DNSMasq/SAMBA software packages.  While there are many different open source platfroms for this I chose DNSMasq because it’s easy to configure and provides us with single source for DNS, DHCP and TFTP services.  All of which are nessasary to complete our PXE Windows 7 install.

After installation, edit the options in the /etc/dnsmasq.conf file.  I removed the original file and created one with just the options we need.  Below, we are defining a DHCP range and instructing PXE devices to boot the  ‘pxelinux.0′ kernel.  Which in turn is used to load the memdisk kernel.  Memdisk mounts a remote ISO image located on the TFTP.  In this case we are mounting an image of Windows PE 2.0(Pre-Installation Environment).  I created a directory called tftpboot in the ‘/var/ftp’ directory.  We’ll use this directory for the PXE files and the Windows PE ISO.

/etc/dnsmasq.conf

no-resolv
local=/localnet/
dhcp-range=192.168.0.50,192.168.0.150,255.255.255.0,12h
dhcp-option=3,10.1.10.1
dhcp-boot=pxelinux.0
enable-tftp
tftp-root=/var/ftp/tftpboot

Prepare PXE Installation files

Next we need to download and install ‘SYSLINUX’ package and extract the key files.  Here is a description of the SYSLINUX project from Syslinux – http://syslinux.zytor.com/wiki/index.php

The Syslinux Project covers lightweight bootloaders for MS-DOS FAT filesystems (SYSLINUX), network booting (PXELINUX), bootable “El Torito” CD-ROMs (ISOLINUX), and Linux ext2/ext3 filesystems (EXTLINUX). The project also includes MEMDISK, a tool to boot legacy operating systems (such as DOS) from nontraditional media; it is usually used in conjunction with PXELINUX and ISOLINUX.

As of Syslinux 3.84 the memdisk supports mounting ISO images.  We’ll use pxelinux.0 and memdisk from the Syslinux package of software to mount an ISO image of Windows PE.

example,

[matt@localhost Desktop]$ wget http://www.kernel.org/pub/linux/utils/boot/syslinux/syslinux-3.85.zip ./
–2010-02-27 23:30:00–  http://www.kernel.org/pub/linux/utils/boot/syslinux/syslinux-3.85.zip
Resolving www.kernel.org… 204.152.191.37, 149.20.20.133
Connecting to www.kernel.org|204.152.191.37|:80… connected.
HTTP request sent, awaiting response… 200 OK
Length: 5567689 (5.3M) [application/zip]
Saving to: `syslinux-3.85.zip’
100%[==================================================================================================>] 5,567,689   1007K/s   in 5.4s
2010-02-27 23:30:05 (1001 KB/s) – `syslinux-3.85.zip’ saved [5567689/5567689]
–2010-02-27 23:30:05–  http://./
Resolving …. failed: Name or service not known.
wget: unable to resolve host address `.’
FINISHED –2010-02-27 23:30:05–
Downloaded: 1 files, 5.3M in 5.4s (1001 KB/s)
[matt@localhost Desktop]$

Unzip the files and copy the ‘pxelinux.0′ file from the ‘core’ folder to /var/ftp/tftpboot’.  Copy memdisk from the ‘memdisk’ folder to ‘/var/ftp/tftpboot/’.

Lono the cat

Lono the cat

Create a Windows PE 2.0 ISO image

Now we need a Windows PE ISO image.  Download and install the, ‘The Windows Advanced Installation Kit’ to Windows Vista or Windows 7 PC.  It includes the necessary tools to partition disks and mount the Samba share with the Windows 7 installation folder.  Install the package and follow these instructions to create your Windows PE ISO image at, http://technet.microsoft.com/.

Why does one have to download a special software package to make a boot disk?  I don’t know.  Windows PE 2.0 usually operates as a bootable CD.  We’re booting .  It’s absurd that you have to install a separate program to generate a boot CD.  To make it worse, Windows PE 2.0 boots to a command prompt without the option of booting to a desktop.

No one that paid for Windows should have to partition a disk from a command prompt in a terminal sitting on a inaccessible windows desktop.  That’s Silly.  Even Redhat and Knoppix boots to a desktop.

Why doesn’t Microsoft have an easy to download boot CD with a semi-functional desktop?  No Idea.  That’s why it’s so common to see DOS, Ultimate Boot CD and KNOPPIX disks used by Windows system administrators.  It’s like Microsoft wants you use Linux – for at least something…

Are you joking?  What is this crap?

Are you joking? What is this crap?

If wading through Microsoft’s horrid technet site doesn’t work for you.  I copied an excerpt from the help file of the Windows PE 2.0 ISO image.  I only included the two necessary steps.  However, the Windows PE 2.0 image can be created with custom scripts and additional apps.

Step 1:

Set up a Windows PE build environmentIn this step you will create a required directory structure that supports building a Windows PE image.

On your technician computer, click Start, point to All Programs, point to Windows OPK or Windows AIK, and then click Windows PE Tools Command Prompt.

The menu shortcut opens a Command Prompt window and automatically sets environment variables to point to all the necessary tools. By default, all tools are installed at C:\Program Files\<version>\Tools, where <version> can be Windows OPK or Windows AIK.

At the command prompt, run the Copype.cmd script. The script requires two arguments: hardware architecture and destination location. For example,

copype.cmd <arch> <destination>

Where <arch> can be x86, amd64, or ia64 and <destination> is a path to local directory. For example,
copype.cmd x86 c:\winpe_x86

The script creates the following directory structure and copies all the necessary files for that architecture. For example,

\winpe_x86

\winpe_x86\ISO

\winpe_x86\mount


Step 4:

Create a bootable CD-ROM

This step describes how to put Windows PE RAM disk onto a CD-ROM. This option requires that you create an .iso file by using the Oscdimg tool.

On your technician computer, create an .iso file with Oscdimg. At a command prompt, type:

oscdimg -n -bc:\winpe_x86\etfsboot.com c:\winpe_x86\ISO c:\winpe_x86\winpe_x86.iso

For ia64 architecture, replace Etfsboot.com with Efisys.bin.

Copy the Windows PE 2.0 ISO image to your, ‘/var/ftp/tftpboot/’ directory.  Create a directory called, ‘pxelinux.cfg’.  Now your TFTP boot directory should contain the following.

[root@localhost tftpboot]# ls
memdisk  pxelinux.0  pxelinux.cfg  winpe_x86.iso  xp.iso

Configure PXE Linux

I took this excerpt from the SYSLinux WiKipage.  It gives a brief run down of PXELinux and it’s main configuration file, ‘pxelinux.cfg’.  Read the section below, afterward we can move on to some custom example files I created.

PXELINUX operates in many ways like SYSLINUX. If you are not familiar with SYSLINUX, read the SYSLINUX FAQ first, since this documentation only explains the differences.

On the TFTP server, create the directory “/tftpboot”, and copy pxelinux.0 (from the SYSLINUX distribution) and any kernel or initrd images that you want to boot.

Finally, create the directory “/tftpboot/pxelinux.cfg”. The configuration file (equivalent of syslinux.cfg — see the SYSLINUX FAQ for the options here) will live in this directory. Because more than one system may be booted from the same server, the configuration file name depends on the IP address of the booting machine. PXELINUX will search for its config file on the boot server in the following way:

1) First, it will search for the config file using the hardware type (using its ARP type code) and address, all in lower case hexadecimal with dash separators; for example, for an Ethernet (ARP type 1) with address 88:99:AA:BB:CC:DD it would search for the filename 01-88-99-aa-bb-cc-dd.

2) Next, it will search for the config file using its own IP address in upper case hexadecimal, e.g. 192.0.2.91 -> C000025B (you can use the included progam gethostip to compute the hexadecimal IP address for any host). If that file is not found, it will remove one hex digit and try again. Ultimately, it will try looking for a file named default (in lower case). As an example, if the boot file name is /mybootdir/pxelinux.0, the Ethernet MAC address is `88:99:AA:BB:CC:DD` and the IP address 192.0.2.91, it will try following files (in that order)

Inside the TFTP boot directory is a folder we named pxelinux.cfg.  Change to this directory and create a file called, ‘default’.   Below is an example of what ‘default’ should contain.

/var/ftp/tftpboot/pxelinux.cfg/default

DEFAULT pe
PROMPT 60

LABEL pe
LINUX /memdisk
APPEND iso
INITRD /winpe_x86.iso

The default file tells pxelinux what boot files the PXE client should receive.  In this case we are instructing any PXE client to load memdisk(turns the clients RAM into a virtual disk) and mount the Windows PE 2.0 image(winpe_x86.iso).  Remember, you can only mount ISO images to newer versions of memdisk, so download a recent SysLinux package!

Samba setup

For my Samba setup I used the stock Fedora, ‘system-config-samba’.  Create a Samba user located in the preferences menu.  I created a folder on my Fedora desktop and copied my Windows 7 files directly from the DVD.  Add the folder containing the Windows 7 installation files to Samba.  Remember to restart Samba.

Boot to Windows PE 2.0 to prepare Windows 7 Installation

Now we are ready to boot our PXE device.  I prepared a laptop and a virtual macine as examples.  Notice on my laptop there is an option at boot.  Your Ethernet controller should have some option in the BIOS to enable this feature.  If you do not, your ethernet card may not be capable of a PXE boot.

Start PXE boot.  You should see a screen that shows memdisk and PXELinux.0 loading.

and loading…  It takes a while don’t despair.

Finally you will get a message to ‘press any key to boot…’.  Now Windows PE 2.0 will boot up and provide the envriment to Partition the hard disk.  Remember, this tutorial is to help you get your lab going.  As mentioned earlier, you can create special Windows unattended installation files to stream line these deployments in a production enviroment.

Windows PE 2.0 – DiskPart tool

Use the diskpart command.  Then type help from the ‘Diskpart’ console.  Read through the options.  See below.  Also visit Microsoft technet for further reading.  If you are only upgrading from Windows XP this step is not nessasary as your Disk are already partitioned and formatted.

QEMU - KVM winpe 2.0 boot

QEMU - KVM winpe 2.0 boot

Select the Disk, create a partition and format.  There are plenty of online tutorials to help with this(as every person’s setup may very).

QEMU - KVM window pe 2.0 create a partition

QEMU - KVM window pe 2.0 create a partition

Remember to use the ASSIGN command at the end to make the new disk the ‘C:\’.

example:

DISKPART> ASSIGN letter=C
DiskPart successfully assigned the drive letter or mount point.

DISKPART>

Mount Samba share and begin Windows 7 installation

Mount the Samba share containing the Windows 7 installation files. I specify to mount the Samba share as the ‘J:’ drive.

X:\windows\system32>net use j: \\10.1.10.254\windows7 mypassword /user:matt
The command completed successfully.

X:\windows\system32>j:\setup.exe

That’s it!  Your Windows 7 installation will proceed as normal. With a little more work you can take elements of this tutorial and create a cheap linux box that upgrades all your Windows clients in a few hours over the weekend.  No need to mess with your production Windows Server.  The Linux TFTP provisioning server can simply be turned off when the job is complete and normal DHCP service restored to your router or Windows Domain.  Good luck and please share your experiences!

If you like this article tell Google!!









Written by mattb in: Linux,Windows | Tags: , , , , , , , , , , , , , ,

54 Comments »

  • Brocifer

    Hi,

    Decent instructions, unfortunately I’m still not getting this to work correctly in CentOS 5.3. Basically I get to a boot: prompt, but that’s it. For some reason it’s never trying to load the winpe_amd64.iso I dropped into my tftpboot directory.

    At the boot prompt if I enter in the name of the iso, I get:

    Invalid or corrupt kernel image

    Any suggestions?

    Comment | May 18, 2010
  • Brocifer

    Nevermind, turned out I had a corrupted ISO. I ended up combining your instructions w/ a TRK (Trinity Rescue Kit) installation. VERY nice suite of tools to incorporate into your PXE server if you haven’t already checked them out.

    Comment | May 19, 2010
  • mattb

    Hi Brocifer,

    Thank you for reading savelono.com. I’ll take a look at the TRK.

    -Matt

    Comment | May 19, 2010
  • NIce.. Im wondering however if the PE env. could have the paths for installs automounted or predefined so we dont have to enter the string each time.

    Comment | July 9, 2010
  • mattb

    Hi Steve,

    There are several methods of creating a Windows PE image with Batch scripts to connect to SMB and Auto installion scripts for Windows 7. The Windows PE image creation device comes with docs describing the setup.

    To be honest I just did this article as a gift to all those Windows Administrators that need to do a million roll-outs in the next 2 years. If your on a budget, use Linux to extend your Windows network.

    But they got to read the Microsoft Technet Tutorials themselves! I hardly use Windows, except for games. However if you hire me as a consultant, I’d be willing to read the docs and write the scripts.

    -Matt

    Comment | July 12, 2010
  • Chris

    Hi,

    We have a Red Hat server setup as a PXE boot server and have successfully loaded RedHat, Suse, and ESX but run into issues when attempting windows. I have attempted to follow the steps laid forth above and we are almost there but now seem to be stuck.

    We get to the screen shot after “and loading… It takes a while don’t despair.” But, immediately after we get a number of errors which I am including now. Any help or assistance would be greatly appreciated.

    e820: 00000000cf699000 0000000000016000 2
    e820: 00000000cf6af000 000000000001f000 3
    e820: 00000000cf6ce000 0000000000932000 2
    e820: 00000000e0000000 0000000010000000 2
    e820: 00000000fe000000 0000000002000000 2
    e820: 0000000010000000 0000000330000000 1
    Ramdisk at 0xc187f000, length 0x0ddf9800
    command line: initrd=W2K8SP1/winpe_x64.iso ramdisk_size=6804 BOOT_IMAGE=W2K8SP1/memdisk
    MEMDISK: Image seems to have fractional end cylinder
    Disk is hd0, 227302 K, C/H/S = 221/64/32 (guess/guess), EDD on, rw
    Using safe INT 15h access to high memory
    Code 1744, meminfo 204, cmdline 75, stack 512
    Total size needed = 2535 bytes, allocating 3K
    Old dos memory at 0x9e400 (map says 0xa0000), loading at 0x9d800
    1588: 0xffff 15E801: 0x3c00 0xc087
    INT 13 08: Success, count = 2, BPT = 0000:0000
    Drive probing gives drive shift limit: 0×83
    old: init13 = c8001dc6 int15 = f000f859 int1e = f000effc7
    new: init13 = 9d80000a int15 = 9d8003ba int1e = f000efc7
    Loading boot sector… booting…
    PXE API call failed, error 001 000

    Boot failed: press a key to retry, or wait for reset…
    ……

    Thanks,
    Chris

    Comment | July 13, 2010
  • mattb

    Hi Chris,

    If I were to guess, this looks like a memdisk problem. It’s important that you get a recent version of ISOLINUX package. Only the recent versions have the ability to mount a DVD/CD ISO image.

    However this is interesting too,

    PXE API call failed, error 001 000
    Boot failed: press a key to retry, or wait for reset…

    Is this failing on one specific model of machine? Do you have other PXE enabled NIC’s and Systems to test with? That message might mean in incompatible version of PXE. I have a SuperMicro board that has a version of ethernet firmware that makes it fail PXE boots. I’m going to purchase a USB to ethernet(w/ PXE) adapter and put it on my key chain. Unless one doesn’t exist…

    -Matt

    PS

    I work as a consultant too. Tell the bosses!!! $$$ <—

    Comment | July 13, 2010
  • mattb

    Chris,

    One other thing, have you burned your Windows PE image to a disk and attempted a good ol’ fashioned DVD boot? To verify the image… Sorry my mind is running with possible causes…

    Comment | July 13, 2010
  • Chris

    We used the latest version of memdisk, 4.01, which we retrieved from http://www.kernel.org/pub/linux/utils/boot/syslinux/. Also, we attempted to PXE from a different server model and had the same issue. So far we have seen the same failure on a PowerEdge R710 and 2850.

    Finally, we attempted to burn the Windows PE image and boot off the DVD and had no problems there. This leads me to think it is an issue with memdisk but am uncertain of where to go from here.

    Comment | July 14, 2010
  • mattb

    Can I get limited SSH access to look? Or for $300 I’ll mail you a hard drive with a working setup. I can bill through my established company, so it will be legit.

    Comment | July 14, 2010
  • Chris

    Hi Matt,

    Unfortunately it doesnt seem like either of those options are viable for me. I wish it wasnt the case but it is what it is. At this point I’m mostly just wondering about the last part of the error.

    Loading boot sector… booting…
    PXE API call failed, error 001 000

    -Chris

    Comment | July 15, 2010
  • mattb

    It’s a tough one… Did you follow my tutorial exactly? DNSmasq + pxelinux + Fedora? I had a physics teacher that used to always say, “when all else fails, follow directions.”

    This is a tough one. I’d really need more access to help in a timely manner. Please post your findings if you solve the issue. My company is based in Seattle, Washington. If the bosses change their mind, I will fix it cheaply and quickly. Even come on site.

    Comment | July 15, 2010
  • Chris

    It turned out to be a dumb issue, we needed to have “iso” after append.

    label 7
    kernel W2K8SP1/memdisk
    append iso initrd=W2K8SP1/winpe_x64.iso
    ipappend 1

    Now we are at the part we are trying to mount the samba share and am seeing some more issues. I have successfully mounted the share from my office windows machine.

    System error 53 has occurred.

    The network path was not found.

    Thanks,
    Chris

    Comment | July 16, 2010
  • Chris

    The error I posted above came from the box we are trying to load an OS to through PXE.

    Comment | July 16, 2010
  • mattb

    Chris,

    What’s ipappend 1? Have you verified that your SMB share works from a standard windows box? Have you booted the Win Pe DVD and tried the “NET USE” command on that SMB share?

    -Matt

    Comment | July 16, 2010
  • Chris

    It turned out to be an issue with the box we were trying to load to. It seems the secondary NIC card was recognized first and the internal mgmt NICs were ignored.

    Comment | July 20, 2010
  • Stephen

    I’ve been trying to get something like this running at home for ages and just came across this page by pure luck, I set up a PXE server in work no problem but didnt have to touch the DHCP side of things which is what Im having problems with, will try your steps and let you know how I get on – thanks!

    Comment | September 22, 2010
  • mattb

    Good Luck Stephan! Let me know if I can help further. I also work as a consultant, so if your company needs it, I’ll fly anywhere. Except North Korea, the Sudan, and any war zones. : )

    Comment | September 22, 2010
  • Samir

    I really enjoyed this discussion except the last comment, by mattb, Sudan is not that much bad.
    Sudanese guy :-)

    Comment | October 28, 2010
  • Attila Ruzsinszky

    Hi,

    Why don’t you use Win PE 3.0? Isn’t it right for Win 7 installation?
    I want to make a test with PXE installation for W7 but I don’t want to download a ~1GB iso for AIK. I don’t know whether it is possible or not installing without that DVD iso.

    TIA,

    Comment | November 28, 2010
  • mattb

    Attila,

    Thank you for reading. I’m sure Windows PE 3.0 will work fine. So will Windows PE 4.0, 5.0 and likely 6.0 when they are released… if ever.

    The information I read came from Microsoft technet, regarding AIK. Their website is pretty bad, so it’s not a big surprise they would steer me to the most inconvenient way possible. If you have good results with WinPE 3.0 please post your results back here! Thanks.

    -Matt

    Comment | November 29, 2010
  • Attila Ruzsinszky

    Matt,

    I try to setup WinPE 3.0 but now I don’t know exactly how.
    I downloaded the AIK in Hungarian language. I absolutelly agree with you why I had to download >1,2GB for some files. Or I don’t understand the whole W7 part of the PXE+AIK. I think I have to setup in a VirtualBox the very first time.

    Today I setup a SysRescueCD on my PXE server. It seems working, so the Linux part is ready.

    Can you help me if I stuck in Windows part?

    TIA,

    Comment | November 29, 2010
  • mattb

    Attila,

    I’ll do my best, but I’m not going to install WinPE 3.0. I don’t have time. I’d stick to the lab as I’ve laid out until you have good understanding, then move on to other Pre-installation environments.

    -Matt

    Comment | November 29, 2010
  • Attila Ruzsinszky

    Matt,

    OK.

    Now I started to learn MDT + AIK. It is terrible.
    My test W7 had crashed before started. I choosed 2k8 R2 and MDT+AIK were installed on it.
    I1m on my way … but it is tooooo far.

    TIA,

    Comment | November 29, 2010
  • Wonderbread

    I tried adding the pxe menu command you show but it didnt work in our environment. I guess we have a different or older version tftp server running.

    Comment | December 8, 2010
  • mattb

    Hi Wonder,

    Fedora is a free download, so the cost of duplicating my setup should be minimal, especially if you do it on a virtual machine. Once you have a proof of concept try to copy the methods to other versions and distributions.

    Comment | December 16, 2010
  • Hi Matt,

    Thanks for this article, I used your info and dug a little deeper. Finally I got this to work without using the ‘Technician computer’, the WAIK, bcdedit, peimg, oscdimg etc… Everything can be done from Linux.

    Shameless plug:
    Check out my tutorial at: http://www.ultimatedeployment.org/win7pxelinux1.html

    Comment | January 13, 2011
  • mattb

    Dude,

    Throw me some Link love from your site!!!!! Love the article, it’s the part I didn’t want to research and write about, but would be a great addition to this tutorial.

    Windows Automated Installation Kit nfo –>


    http://www.ultimatedeployment.org/win7pxelinux1.html

    Comment | January 13, 2011
  • Pindish

    Matt,

    Great info. Thanks for sharing. I know it took a lot of sleepless nights… been there, am glad that you got it working. This is exactly what I need.

    I already have a working network installation environment for CentOS and Ubuntu, etc. on my Ubuntu 10.04 box. I use syslinux 3.86, tftpd-hpa 5.0 and dhcp3-server.

    I also have working Win7 DVD ISO image I burn it on a DVD to install Win7. I create my Win7 image using WinPE 3.0. Diskpart and image deploy with ImageX are all automated in that DVD ISO image. With DVD insallation, users just answer a couple of questions to confirm what they are installing by hiting the [Enter] key.
    I don’t need samba. ImageX deploys my Win7 image onto the HDD partition. After the deployment is done, users reboot the system from WinPE3.0, and the Windows OOB sarts. This is how my DVD insallation works.

    Now I want to do the same thing over the net. I add a boot option to my ‘default’ menu per your example. PXE found the image and start loading. It took over 10 minutes to load, I see a bunch of “…..” on the screen. At the end, I see it says “…….Ready” then the LCD becomes blank. The backlit is still on. But I can’t see anything. I don’t see any local HDD activities either. I plug-in an external display, can’t see anything there.

    Any thoughts? What log file should I be looking at for hints on possible root cause?

    Appreciated very much!

    Comment | February 2, 2011
  • sebus

    @Stephen, this might help you a bit:

    https://forums.openfiler.com/viewtopic.php?id=6042

    sebus

    Comment | February 6, 2011
  • mattb

    Your most welcome! I’m glad someone is getting some use from my love for Linux system Administration!

    If you are seeing “………,etc…” that represents the image loading. However, not any kind of image will boot. memdisk supports cd ISO images supposedly. But Windows XP and others like ultimate bootdisk failed to boot with my method…

    Since my goal was to educate those doing massive roll outs of Windows 7, I didn’t explore those other image setup problems further.

    Also, since memdisk creates a disk in memory(to load the image) you must have a enough RAM to contain the entire image. At least I think that’s how it works. I haven’t looked at this stuff in a few monthes because I’m so busy with work. Take care and please post what you find!

    Comment | February 7, 2011
  • Pindish

    Problem solved: 1. I need to add ‘raw’ to APPEND 2. Though my ISO image works on DVD, it is too big for MEMDISK. I have to use samba to store my OS image.

    Many thanks!

    Comment | February 9, 2011
  • badagent

    Thanks for your guide, helped me a lot to get my old laptop working again ;)
    Although I needed the “APPEND iso raw” option too, which took about half a day to figure out -.-

    Comment | March 9, 2011
  • Matt,
    First of all WELL DONE! You have achieved your goal of successfully booting into WinPE from a Linux PXE Server, My setup is slightly different, I’m running a CentOS PXE Server running DHCPD & TFTPD however I’m still just “Improvising” on your already awsome setup. I had to drop it into a pre-existing linux PXE/Imaging setup.

    Anyway, without further addue instead of running the ISO (I was hitting a massive hang (over 8 hours then i quit). at the booting… at the end of the memdisk/iso load. So i went into Windows AIK on win2008 (Again slightly different to you). Created a .wim setup and used pxeboot.n12 instead of the syslinux pxelinux.0. This worked a treat and got me into WinPE perfectly.

    BUT i am a little stuck, I’ve tried everything from wpeutil InitializeNetwork to ipconfig & netcfg commands but i cannot get it displaying my network drives on my HP DL120 Servers. There is simply “Nothing” there to show. I don’t suppose you could shed any light onto this?

    Comment | May 1, 2011
  • Hi,

    I have successfully booted (with having to do a couple extra steps) but my networking does not seem to be loaded automatically. Are there any extra steps you have left out that would include packaging of network drivers or loading of device drivers?

    Thank you.

    Comment | June 2, 2011
  • I have fixed the networking issue. How did you use the Samba share to be able to mount the drive from Windows 7 without the server service? When I attempt the net use command I am prompted with “the server service is not started” but can not start it because it is not provided in winpe.

    Thank you.

    Comment | June 3, 2011
  • Sorry, don’t mean to spam your page but you inspired me!

    http://ckozler.net/?p=228

    I have linked to you as a resource!

    Comment | June 3, 2011
  • [...] I have used the following resources: Initial PXE Resources for CentOS (This document is horrible): http://wiki.centos.org/HowTos/PXE/PXE_Setup Got me started: http://www.savelono.com/linux/how-to-install-windows-7-over-a-network-using-linux-pxe-dnsmasq-and-sa… [...]

    Pingback | June 3, 2011
  • wanab33ninja

    You are AWESOME. I have been trying to pxe boot windows PE for ages, for a diskless installation and boot using iSCSI. This is the only website that clearly states exactly what needs to be done, and why. Thanks for all your help!

    Comment | June 25, 2011
  • Very nice!!!! I managed to follow all the steps an booted on WPE, unfortunately I cannot mount Samba share, as the system booted does not have my network device driver. How can I load the device driver on windows PE iso that boots the system?

    Thank you in advance

    Comment | June 30, 2011
  • coyote

    GREAT.
    The way you post your knowledge is understandable even for persons with a severe whip-lash. I will be setting this up on my NAS box (thecus n4200eco).
    I’am stille looking for a combined configuration menu to either setup Linux (have that already working) and MS from same tftp dir.
    I’ll try to dig the manuals and might report back if not drowned.

    Comment | January 15, 2012
  • mattb

    Coyote,

    I don’t understand your question:

    “I’am stille looking for a combined configuration menu to either setup Linux (have that already working) and MS from same tftp dir.”

    Syslinux provides a interface similar to GRUB to select which OS installation.

    Comment | January 15, 2012
  • Coyote

    Matt, yes I know. I wasn’t that clear in my first post.
    What I have been fiddling with was integrating W7 i386,ia64,amd64 PE netboot into a working Ubuntu tftp configuration on a NAS (Thecus 4200eco wich I succesfully have been using in the past months with linux installing and still works). My first idea was to adjusting the Ubuntu menu’s. Result was black screen after loading the iso on eeePC 900 (1Gb ram) and a “a defice is inaccessible” on a eeePC 1015PE(2Gb ram). My first guess is always that I messed it up myself. But after 3 days eleminating all posible causes, reading about eeePC’s and exact copying your setup I’m still stuck. I will be testing an ia64 PC next week to see if the futile attempts are in fact due an eeePC Quirck.
    Cheers.

    Comment | January 23, 2012
  • twohot

    This is a good tutorial. I have this setup running in my small network for installing Windows Vista and Fedora (rel.14-16). Recently, I got a machine that needs Windows XP. It can only boot from Hard-drive or LAN.

    I see you have XP on the Samba shares but I dont see steps specific to XP. I’m curious as to how one can adapt the above for purposes of installing XP. What goes into the Shared folder and what other precautions are necessary?

    Comment | January 27, 2012
  • mattb

    I may be wrong but Windows XP can only be installed by Microsoft RIS(Remote Installation Server). I think this was a design decision on MS part. Good luck, let me know if you get XP working this way.

    Comment | January 30, 2012
  • Hey :D
    Thx for the Tuto, it helps me in my final degree internship, just you need to know that the way that you use to create the WinPE image doesn’t work.. For me I can create the PE like it is mentionned in the technet MS website: http://technet.microsoft.com/en-us/library/dd744537(v=WS.10).aspx

    Comment | March 21, 2012
  • Oktan

    Coyote,

    Please can you explain how did you setup your PXE and .. in Thecus NAS 4200eco?
    I want to do it also but so far no luck!
    I appreciate if you share the detail.

    Comment | April 25, 2012
  • marco

    I just found this interesting article because I’m going to setup a PXE server in order to install both Linux & Windows.
    Anyway it is not clear why is necessary Windows PE. Why is not possible to boot the standard microsoft iso and use it as if I would using the phisical cd?

    Comment | August 30, 2012
  • mattb

    Excellent question. Windows PE (Pre-installation Environment) is faster and could be used in conjunction with a USB Stick and a Powershell script to automate this process. PXE is much much faster for installing fresh Windows on a large amount of machines! Otherwise why not just install station to station with a Windows Disk?

    Comment | October 12, 2012
  • Larry

    Have you attempted/succeeded completing an unattended install using an answer file? I have the pxe server up and working. However, I’m trying to make it unattended but without success.

    Comment | December 6, 2012
  • AdamA

    Hi Mattb,

    I work for an asset management company. we have just recently set up PXE boot for a new software we are using for data erasure. this software is run with winpe 3.0. we keep having issues loading the iso file of the software.
    it’ll run as if it is going boot up but it’ll either freeze at the “press any key to skip loading Active KillDisk” or the software will restart the device like its going to boot up but it just restarts the whole device. The software is called KillDisk. Do you think you can try this out? I have not met anyone who is successful booting this software over PXE, realistically. I have achieved the task through oracle VMware.

    Also, on some devices we get the error code that memdisk is truncated.

    Your help will be very helpful.

    Thanks,

    Comment | August 1, 2014
  • mattb

    replied via email from VoiceIP

    Comment | August 4, 2014
  • Hi Matt,

    I tried your solution but when i boot my WinPE i get an error msg after a few seconds before it can load properly, “Windows failed to start. A recent hardware och software change might be the cause. Status: 0xc0000225 Info: An unexpected error has occured.”

    Thank you for any help

    Comment | August 11, 2014
  • mattb

    Hi Anders,

    Thank you for reading. I suppose there are many possibilities, I would need a lot more info on your setup. But I would start with the logs on the PXE server. Check that the image is valid(right byte count) and that the drivers for the hardware of the PXE client are available or pre-installed in the windows image. Else, the boot could fail. Which would be a very different problem than a corrupt image.

    Comment | August 11, 2014

RSS feed for comments on this post. TrackBack URL

Leave a comment