Diskless boot of Microsoft Windows (Internet Cafe)

First of all, if you don’t mind managing multiple computers individually (where each computer comes with a local hard disk or solid state drive), simply use Deep Freeze.

If however you want your computers to boot diskless from a single image, you will need:

  1. Open source network boot firmware iPXE.
  2. USB memory sticks – one for each client.
  3. Sysprep / Dism.
  4. iSCSI target pointing to a hard disk containing Microsoft Windows.

Basics

The most basic setup starts with taking a hard disk out of an existing computer and making it available as an iSCSI target (using FreeNAS or similar)

iPXE

iPXE is an open source network boot (PXE) firmware. It provides a full PXE implementation enhanced with additional features such as booting from iSCSI targets.

Create iPXE bootable USB stick

  1. Connect a USB memory stick to your computer
  2. (Quick)format USB memory stick as FAT32
  3. Download a precompiled Windows binary Syslinux.exe
  4. Read iPXE documentation
  5. From a command prompt, run “syslinux.exe <drive letter>” to make the USB stick bootable.

For example:

syslinux.exe F:

Create a Syslinux configuration file ‘syslinux.cfg’ to boot into iPXE and save it on the USB stick:

default ipxe
label ipxe
kernel /ipxe.lkrn

Download the iPXE .iso image and extract the contents on the USB stick.

Boot from an iSCSI target:

  1. Boot any computer from the newly created iPXE USB memory stick
  2. Press <CTRL><B>
  3. Type “config net0”
  4. scroll down to root-path (see http://ipxe.org/cmd/config for details)
  5. Enter your iSCSI target (i.e. scsi:192.168.1.100::::iqn.zzz.istgt:win7)
  6. Press <CTRL><X>
  7. Type “autoboot”
  8. The computer will now boot Windows over the network from your iSCSI target

Problem

Windows freezes or halts at \windows\system32\disk.dll when booting in safe mode

Cause

The hidden Windows 7 Service running on top of the NIC TCP/IP stack named “WFP Lightweight Filter” (a.k.a. Network Filter Driver) was removed in order for this to work properly:

Solution Windows7

  1. You will need to make a change to the NAS image.
  2. Remove the SATA hard disk and insert it in a computer.
  3. Boot from the hard disk as per usual.
  4. Run regedit as Administrator
  5. Open
  6. ‘HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Class\{4D36E972-E325-11CE-B­FC1-08002BE10318}”
  7. Find the Physical NIC Entry in use from sub keys and open it; for example, “0007”
  8. Open “Linkage” sub key
  9. Edit the “FilterList” key/value pair. Remove the correct entry (or simply all entries).

Booting multiple computers from a single iSCSI target

You can now boot a single computer into Microsoft Windows over the network using iPXE and an iSCSI target.

But what if you want to boot multiple computers -some even with different hardware inside- from the same image?

For that we’ll need two things:

  1. Sysprep
  2. Snapshot technology.

Sysprep

We used Sysprep / Dism to capture an existing Microsoft Windows installation and save it to a single image file.

Sysprep can be used to prepare an operating system for disk cloning and restoration via a disk image.

Windows operating system installations include many unique elements per installation that need to be “generalized” before capturing and deploying a disk image to multiple computers. Some of these elements include:

  • Computer name
  • Security Identifier (SID)
  • Plug & play driver Cache

Sysprep seeks to solve these issues by allowing for the generation of new computer names, unique SIDs, and custom driver cache databases during the Sysprep process.

  1. Use Sysprep to modify an existing (fresh) Windows installation and turn it into a generalized ‘vanilla’ Windows environment that can be used for redeployment.
  2. Use Dism to capture the sysprep’ed Windows environment into an image file (*.wim)
  3. Deploy the image file to a hard disk partition.
  4. Make the hard disk partition available as an iSCSI target.

The benefit is that you now have a ‘vanilla’ Windows installation.  The first time Windows boots it will create a unique SID and start the Plug & Play hardware detection as part of the boot process.  This may be essential if some of the computers have different hardware components inside.

This could be our ‘Master volume’ all computers will boot from initially.

But that’s not enough – you can’t have multiple computers write to the same single hard disk – for this we will need snapshots.

Snapshots (or in this case more correctly, ‘copy-on-write’ functionality)

Normally, snapshots are thought of as a backup mechanism. You allocate a snapshot of a volume, and then you go on modifying the main volume. You can use the snapshot to “go back in time” to the old state of the volume. But some implementations let you modify the snapshot directly, with the changes only affecting the snapshot and not the main volume. In our case, this latter feature is the critical functionality, as we need all clients to be able to modify their private snapshots. The fact that we can also modify the master without affecting any of the clones is just a convenience, in case we ever want to install a new game or change configuration mid-party.  Basically, we are using snapshot technology to implement copy-on-write functionality.

FreeNAS

We used FreeNAS to set up a Network Attached Storage (NAS) filer that first of all allows us to make logical volumes available as iSCSI targets.

FreeNAS is essential as its ZFS file system offers ‘copy-on-write’ functionality; it allows for the creation of snapshots.  The snapshots themselves can then be made available as iSCSI targets.

  1. Deploy the Syspres image file (*.wim) to a ZFS volume in the FreeNAS filer.
  2. This will be our ‘Master Volume”
  3. Create a number of snapshots for our ‘Master Volume’
  4. Make each snapshot available as an iSCSI target.
  5. Configure iPXE on the USB memory stick for computer #1 to use iSCSI target #1.
  6. Configure iPXE on the USB memory stick for computer #2 to use iSCSI target #2.
  7. Configure iPXE on the USB memory stick for computer #3 to use iSCSI target #3.
  8. Etc.

Each computer will now boot from a ‘snapshot’ of the ‘Master Volume’; the ‘Master Volume containing a Sysprep’ed Windows image, resulting in each computer going through the plug & play hardware detection stage and receiving a unique Security Identifier (SID).

Note: It is suggested to only create snapshots when the (iSCSI) volume is not in use.

Diskless boot of Microsoft Windows (Internet Cafe) was last modified: May 26th, 2015 by tabcom