Pxe w2k3

From LQWiki
Jump to navigation Jump to search

Purpose/Introduction

  • This document will describe how to perform an automated Windows Server 2003 installation over a network without CDs or floppy disks.
  • You will need a functional Linux server with DHCP & TFTP services, and files from the SYSLINUX package. That is beyond the scope of this document but you can find a helpful how-to here.
  • You will need memdisk from the SYSLINUX package; this allows booting from ISO images and mapping them into RAM.


Stuff You Will Need

  • The winvblock driver.
  • A VLK installation CD for Windows Server 2003. You can use Web, Std. x86, or Std. x86_64 with this guide. I haven't tested Enterprise or Data Center editions but it should be applicable to any W2K3 version.
  • The unpacked ISO image on your local hard disk.
  • Experience working with Windows installation CDs. I've used nLite, CDimage, and the XP SP2 Deployment Tools to build my image.
  • Optional, but I would recommend slipstreaming SP2, the latest hotfixes, and any additional device drivers you need into the image.
  • Also optional, but this site helped me prepare my .iso for a normal unattended install: MSFN Unattended.


Finalizing The Iso

  • The problem with booting a native Windows installation CD is that once the setup program starts the text-mode installer (where you partition the disk and files are copied to the local hard disk), the RAMdisk that is loaded via MEMDISK is no longer readable by Windows setup.
  • We will get around this by manually configuring an open-source driver (winvblock) that will enable Windows setup to access the RAMdisk as an emulated SCSI device.
  • First, download and unzip the winvblock driver. To insert the driver into the Windows installer image, we'll need to compress the driver. This is done from the command prompt in the driver directory:
makecab WVBlk32.sys WVBLK32.SY_
  • Next, copy the compressed driver file to the i386 folder in the extracted ISO image folder on your local hard disk (WVBLK32.SY_).
  • Now, we need to make a few small edits to the text mode configuration file. Open i386\TXTSETUP.SIF in a text editor and add the following entries in the corresponding sections:
[SourceDisksFiles] 
wvblk32.sys = 1,,,,,,4_,4,1,,,1,4

[SCSI.Load]
wvblk32 = wvblk32.sys,4

[SCSI]
wvblk32 = "WinVBlock RAMdisk driver"
  • Save the modified TXTSETUP.SIF.
  • Now the image is ready to be compressed back into an ISO format. Use this excellent how-to.
  • Optional: Make one additional ISO. The Windows setup CD has an annoying habit of not booting immediately. This is the familiar "Press any key to boot from CD..." prompt that shows up during the normal Windows setup CD boot. This is rather annoying during the first stage of the installation, so you can remove that prompt so the text mode installer boots immediately after loading from the PXE server by removing /i386/BOOTFIX.BIN and re-creating the ISO. I use two separate images for the automated install; the first without the wait prompt, and the second with the wait prompt. It's essential in the second stage where the graphical mode installer takes over (booting from the local hard disk) because this will re-map the RAMdisk before booting off the local disk, and thus Windows setup will complete without any missing media errors.


Wrapping Up: Configuring the PXE Server

  • Setting up the boot choices for the PXE server is pretty straightforward. Here are some sample entries:
label Windows 2003 Std x86 Text (stage 1)
  menu label ^Windows 2003 Std x86 Text (stage 1)
  kernel images/memdisk/memdisk
  append raw iso
  initrd images/w2k3std/w2k3std_unattend.iso

label Windows 2003 Std x86 Graphical (stage 2)
  menu label ^Windows 2003 Std x86 Graphical (stage 2)
  kernel images/memdisk/memdisk
  append raw iso
  initrd images/w2k3std/w2k3std_unattend_gui.iso
  • You will need to replace the paths to your copy of MEMDISK and the re-mastered ISOs. The install process is pretty simple: boot from stage1, and then boot from stage 2. If everything works correctly your only manual intervention will be partitioning the disk if Windows setup detects a previous operating system, and selecting the stage 2 boot menu when the text mode installer completes.

Conclusions

  • I hope this guide helps anyone that is struggling to do a similar process. I googled for days and played around with it until I had it working and I think it's a neat way to install Windows over the network.