Showing posts with label selfimage. Show all posts
Showing posts with label selfimage. Show all posts

Monday, 13 August 2012

Server imaging with SelfImage & Windows PE

Here's how to restore an image made with the SelfImage utility using a Windows PE boot environment. Previously I have used BartPE but were finding that I kept needing to rebuild the image to support the various different NIC & array drivers used on newer servers.

A recent WinPE enviroment has these drivers already built in. So if the server can build directly from the Windows server 2008 CD then it can use the WinPE disk without modification. I've been using WinPE version 2 for what it's worth. Version 1 was based on an earlier Windows version so doesn't have the newer drivers in it.

This post assumes you have access to a WinPE environment boot cd (or iso) and also that it has been modified to include the SelfImage utility.
  • Boot into WinPE environment 
  • Configure interface (n is the interface number, x is IP, y is netmask, z is gateway)
    • netsh interface ip set address name="Local Area Connection n" static x.x.x.x y.y.y.y z.z.z.z 1
  • Map a drive to where the image is loaded (remember the username is specified as server\usersname)
    • net use e: \\server\share
  • Configure a primary partition on the disk using diskpart
    • select disk 0
    • clean
    • create partition primary size=<size in mb>
    • select partition 1
    • active
    • assign letter=c:
  • Run the selfimage tool and select the output to be \Device\Harddisk0\Partition1 C:
  • Before rebooting fix the boot manager otherwise the server will blue screen
    • bcdedit /set {default} device partition=c:
    • bcdedit /set {default} osdevice partition=c:
    • bcdedit /set {bootmgr} device partition=c:
Reboot server and the job is done.

Note that on reboot Windows may complain that it was not shutdown properly, this can be ignored and Windows booted normally. Also once logged in you may find Windows installs some more device drivers, let it finish and do one more reboot to finish the job off.