Recently, I rebuilt my company’s standard Windows XP Ghost image and decided investigate the HAL issue once again. I wrote how to make universal images by forcing the APCI HAL. Perhaps, however, you are a “best practices” kind of fellow and rather not force an APCI HAL, yet want a universal image. With a little work, you can get there. One thing I recently noticed is that the HAL is not changeable in Windows XP from the device manager. In Windows 2000, you could change the HAL to anything you wanted, but I guess Microsoft thought that feature was too powerful for us. In Windows XP, the only way to change HALs is:
- Specify one in sysprep.inf
- Do a Windows repair on the PC in question
There’s two little tricks you can use to work around this. The first one I found is from the Jimmy Bondi in the VMware forums. In C:windowsinfhal.inf, change the section [GENDEV_SYS] to the following:
%E_ISA_UP.DeviceDesc% = E_ISA_UP_HAL, E_ISA_UP, MPS_UP, MPS_MP, ACPIPIC_UP, ACPIAPIC_UP, ACPIAPIC_MP ; Standard PC
%ACPIPIC_UP.DeviceDesc% = ACPIPIC_UP_HAL, ACPIPIC_UP, ACPIAPIC_UP, ACPIAPIC_MP ; ACPI PIC-based PC
%ACPIAPIC_UP.DeviceDesc% = ACPIAPIC_UP_HAL, ACPIAPIC_MP, ACPIAPIC_UP, ACPIPIC_UP; ACPI APIC-based PC (UP)
%ACPIAPIC_MP.DeviceDesc% = ACPIAPIC_MP_HAL, ACPIAPIC_MP, ACPIAPIC_UP, ACPIPIC_UP; ACPI APIC-based PC (MP)
%MPS_UP.DeviceDesc% = MPS_UP_HAL, MPS_UP, ACPIAPIC_UP ; MPS UP PC
%MPS_MP.DeviceDesc% = MPS_MP_HAL, MPS_MP, MPS_UP, ACPIAPIC_MP, ACPIAPIC_UP ; MPS MP PC
This ingenious situation basically tells Windows: “hey, you can use any driver for this specific HAL”. Now you can go into the device manager, right click on the HAL and do an update driver. The PC will require two reboots after doing this.
The other thing you can do is just leave your image configured with a APCI Uniprocessor HAL, which is newer then just the plain old APCI HAL. If the system refuses to boot, boot into BartPE and copy over hal.dll, ntoskrnl.exe and ntkrnlpa.exe from a system already running an APCI HAL into C:windowssystem32. Reboot and viola, the system boots! This later method requires the work of a semi-skilled technician, so pick the method accordingly to your organization’s needs.
I’ve also found that you can change the IDE drivers in the image to “Standard Dual Channel PCI IDE Controller” in the device manager before closing the image and your image will boot on pretty much any hardware. You can then add the correct IDE drivers later for better performance. Using this “hack”, your image will still change the IDE drivers to the “correct” ones during the mini-setup if you have them defined in [SysprepMassStorage]. This might come in handy if you want to image an older PC, yet do not want to update and recreate your image just for one PC.
– Soli Deo Gloria