Update 8/26/08: Forgot about the WinPE 2.0 uberbug with diskpart. See this article here. To fix this, place the following in uberbug.reg and then add that to the menu
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SYSTEM\CURRENTCONTROLSET\SERVICES\VDS\ALIGNMENT]
“LessThan4GB”=dword:00000000
“Between4_8GB”=dword:00000000
“Between8_32GB”=dword:00000000
“GreaterThan32GB”=dword:00000000
Here’s a quick and dirty overview of how to replace Norton Ghost with ImageX. ImageX captures information about the file system, but nothing of disk structures (master boot record, sectors, etc). Therefore, in using ImageX, we need to include writing out the boot sector with bootsect.exe. Since ImageX is command line driven, the first order of business is finding a GUI wrapper. I found such a wrapper called GImageX. GImageX interacts directly with wimgapi.dll, therefore, some support files from Microsoft WAIK will be needed. Specifically, that includes: imagex.exe, intlcfg.exe, wimgapi.dll, wimfltr.inf, and wimfiltr.sys.
I threw all of the files, including the WIMs I captured, on a network share with these support files (don’t forget bootsect.exe!). I then wrote a simple batch file:
@echo off
:TOP
regedit /s uberbug.reg
cls
echo Microsoft ImageX Menu by Adam Leinss
echo ————————————–
echo.
echo 1. Prep Disk (WARNING: THIS DESTROYS ALL DATA ON DISK!)
echo 2. Prep Boot Sector for Windows XP OS
echo 3. Prep Boot Sector for Windows Vista OS
echo 4. Run GImageX
echo.
echo 5. Exit
echo.
Set /P sel=Make your choice:
echo.
For %%a In (1, 2, 3, 4, 5) Do if “%sel%”==”%%a” Goto SELECT_%%a
echo Invalid selection. Valid values are 1 thru 5. Press Enter To continue
pause>NUL
Goto TOP
:SELECT_1
diskpart -s diskprep.s
Goto TOP
:SELECT_2
bootsect /nt52 sys
Goto TOP
:SELECT_3
bootsect /nt60 sys
Goto TOP
:SELECT_4
gimagex.exe
Goto TOP
:SELECT_5
Goto :EOF
The diskprep script I use:
select disk 0
clean
create partition primary
format quick
active
assign letter=C
This gets the disk nice and clean for us to use. This is never an issue with Ghost, as it writes out the file system sector-by-sector.
After cleaning the disk, you can pick either #2 or #3 to prep the boot sector depending on what OS you are going to deploy.
Finally, we run GImageX, click the Apply tab and pick the Source/Destination. Now you have an imaged PC, just like with Ghost!
I used the WinPE 2.0 install media from SCCM 2007 to boot the PC and connect to the network share, but you can use any favor of WinPE you want (BartPE, WAIK PE, etc). I found decent WinPE 2.0 (Vista based) setup instructions here.
- Soli Deo Gloria