David's Public Pages

There's no place like ::1

User Tools

Site Tools


archive:blog:2007_9_28-3

SysPrep in Depth - Part 3 - SysPrep.inf and HAL's

September 28, 2007

- What Is The HAL Not Who?

If you do not know what the HAL is please see this Microsoft KB article or this WikiPedia article to get an overview of the HAL. I will not go into much detail as to what the HAL is and how it is used so please research this before messing with it, or if you have some test computers to clone to mess with it and see what happens and if you can find the right mix by guessing.

- UpdateUPHAL, UpdateHAL And Their Purposes

The UpdateUPHAL and UpdateHAL sections in the [Unatennded] section of sysprep.inf can be very confusing and extremely hard to research. Microsoft offers some basic explanations of this value on their TechNet site but still leaves most people questioning what it is they need to be doing with the keys and what the keys even do.

Basically these two values in sysprep.inf allow SysPrep to upgrade or downgrade your HAL cloning to hardware of a different HAL version. As I mentioned in my first part of this series it is always best to pick older hardware and clone to newer and not vice-verse, this is one reason why you do that. This is personal preference since you can go backwards but I have better luck moving to newer HAL's and not older. By specifying one of these keys you can move an image from a non ACPI computer to a Multiprocessor ACPI computer or a Multiprocessor ACPI down to a UniProcessor ACPI computer.

UpdateUPHal will install a UniProcessor HAL while UpdateHAL will install a Multiprocessor HAL. When cloning to a PC you need to install the same HAL using SysPrep as Windows XP uses when installing it from the CD. If you need to find what version of HAL a computer is using can see this Microsoft KD article for guidance on finding your currently running HAL.

There have may people that have so many issues using this key value they end up resorting to just overwriting the HAL after cloning with the proper HAL. This method does work but you can use whatever method you prefer. I will go over both the UpdateUPHAL value in sysprep.inf and also the manual way of replacing the HAL in this article.

- Using UpdateUPHAL and UpdateHAL Within SysPrep.inf

UpdateUPHAL values within sysprep.inf require you to specify a Unprocessed HAL to install. The list of available UniProcessor HAL's that can be used with UpdateUPHAL are:

UpdateUPHAL = "ACPIAPIC_UP,%WINDIR%InfHal.inf" UpdateUPHAL = "ACPIPIC_UP,%WINDIR%InfHal.inf" UpdateUPHAL = "MPS_UP,%WINDIR%InfHal.inf"

UpdateHAL values within sysprep.inf require you to specify a MultiProcesser HAL to install. The list of available MultiProcessor HAL's that can be used with UpdateHAL are:

UpdateHAL = "ACPIAPIC_MP,%WINDIR%InfHal.inf"  UpdateHAL = "MPS_MP,%WINDIR%InfHal.inf" UpdateHAL = "SYSPRO_MP,%WINDIR%InfHal.inf"

Make sure you are picking the proper HAL's for your computers as this can BSOD your cloned computers or give you extreme performance hits if the wrong one is picked.

- Installing The HAL By Hand

Note: I have seen this process done by someone else before but have never tried this myself so if you can elaborate on it let me know, otherwise please don't ask me for help.


Edit (3/18/08): I have tried this process and it did work for me, the only issue was that I needed to boot to safe mode once to get the OS to stop BSODing. Booting to safe mode was all it took, nothing else, so I would imagine that you could find what was causing this boot to safe mode and make this a feasible solution. If anyone is or has tried this please let me know how it went for you.


Another way to change HAL's is by just extracting the HAL you want directly onto the OS and rebooting. I have been looking for more info on this process and have found two resources for you but again I have not tried this so proceed cautiously.

As I have not done this process myself and have only seen it done I will leave the research up to you on how to complete this successfully, but please let me know if you have success doing this.

- UniProcessor to Multiprocessor Warning

When using a UniProcessor as your base image and using UpdateHAL sysprep will always pick the MultiProcessor HAL. This is a know issue and if you do use a MultiProcessor HAL on a UniProcessor system you can notice performance hits but this is not always the case. Here are a few resources to look into if using a MultiProcessor HAL on a UniProcessor: Microsoft KB 811366, 309283

To avoid this issue many people choose to use a MultiProcessor base machine and clone to a UniProcessor and use the appropriate UpdateUPHAL value. People have greater success going backwards then forwards but this is all a matter of preference for the most part.

- The Different HAL's

Although I only mention 6 of these in the above documentation there are in fact 7 listed in the hal.inf file. I have never seen E_ISA_UP used in a UpdateUPHAL value but I would imagine it is a valid value.

HAL Name PC Type Description
E_ISA_UP Standard Computers Standard PC
ACPIPIC_UP ACPI PIC-based PC Advanced Configuration and Power Interface (ACPI) PC
ACPIAPIC_UP ACPI APIC-based PC (UP) ACPI Uniprocessor PC
ACPIAPIC_MP ACPI APIC-based PC (MP) ACPI Multiprocessor PC
MPS_UP MPS UP PC MPS Uniprocessor PC
MPS_MP MPS MP PC MPS Multiprocessor PC
SYSPRO_MP Compaq SystemPro (MP) HAL Compaq SystemPro Multiprocessor or 100% Compatible

Discussion

Glenn Deans, 01/21/2008
To clarify this a little, UpdateUPHAL forces a detection of the processor type and installs the appropriate HAL/kernel. I use ACPI PC on my image master and add the UpdateUPHAL line to detect any newer Uni or Multiproc systems. What a lot of the docs don't tell you is that you need to add the original HAL files to %WinDir%Driver Cachei386.

UpdateHAL installs the Multiproc HAL whether it's a Uni or Multiproc system.
David Remy, 01/23/2008
Thanks for the tidbit!As I mentioned you can go backwards but it is so much easier to go forward in HAL's.

Thanks!
Joe, 02/22/2008
I'm a little confused here...So if you use a Multiprocessor system as your base image (Core 2 Duo, using ACPI Multiprocessor PC HAL), How do you make a universal image that will install multi procs HAL on a pc that needs (like a core 2 duo), and only a single proc HAL on everything else?

Is there a way to make it "detect" which one it needs during sysprep?
David Remy, 03/18/2008
Hey Joe,

Well to start there is no way to have sysprep properly "detect" which HAL is needed. This whole HAL issue is one of the issues people love Vista so much as Vista is HAL independent.

Anyways, to help you out with your confusions.

To accomplish this I would suggest building the image on a single processor computer and then using UpdateUPHAL to upgrade the HAL to multi-processor capabilities as Glenn also suggests. Since uni-processors are becoming harder to find this is becoming hard to accomplish but that is my first suggestion.

The second way of doing this would be to replace the HAL on-the-fly. I have only done this once but I know it would work, as for being a feasible solution that is up to you. You could script out the HAL replacement and then using Shift+F10 during sysprep launch the script and replace the HAL by hand. I had to enter safe mode during my testing but I'm sure that could be avoided if you found what was causing the system to want to go to safe mode. Once in safe mode I could reboot, no actions were necessary to fix the BSODing that was caused before entering sysprep.

Let me know if this made any since...
Helge Tore Høyland, 06/26/2008
First: Thanks for a very nice guide to sysprep!

I am a bit confused here. In your main article you say that UpdateUPHAL is used to install a single processor computer.
Later on both you and Glenn tell us that you can use UpdateUPHAL to upgrade the HAL to multi-processor computer.

Could you please explain this a bit more? Maybe show the aproperiate line in sysprep.inf to make it work to use a single image to both a ACPIAPIC_UP pc and a ACPIAPIC_MP pc?
David Remy, 07/18/2008
I am sure you are not the first to be confused by this.

The UpdateUPHAL lines will install a Uni-Processor HAL onto the OS, but Uni-Processor HAL's have a one-way upgrade path to a Multi-Processor HAL if a Multi-Processor CPU is present. I have posted methods to downgrade but they are unsupported. This means that if you happen to install a UP HAL in a MP computer it will upgrade on first boot to a MP HAL.

You can however push out the MP HAL to a MP computer to start with if you want, hence the use of UpdateHAL.

I have decided to only use UP HAL's as I can push out to more computers with one image as that image will support both UP and MP computers.

I hope this helps clear up the confusion, if not just let me know.

David Remy
Eric Welshons, 08/06/2008
Here's what I have: I have built my image on a D600. After dropping the image in XPE, I determine the model and then copy a different sysprep.inf file into the sysprep folder. For the MP machines we are upgrading to (755 and D630), I use this line:
UpdateHal=ACPIAPIC_MP,%WINDIR%InfHal.Inf

Now, however, we have found that only one processor is showing up in Task Manager. We discovered this when testing some new apps that are CPU intensive. Any ideas on this?
Eric Welshons, 08/06/2008
Also, when Glenn mentioned having the original HAL files in the %WinDir%Driver Cachei386 directory, would these be the .DL_ files from the WinXP CD (I386 folder) or should they be expanded or renamed?
Yordan Yordanov, 08/06/2008
Interesting articles, indeed. But I have one question: I am using Systems Management Server 2003 with the OS Deployment Feature Pack to install the operating systems with zero touch and actually the sysprep program is being run by the Image Capture Wizard just before the reference computer is shut down. A sysprep.inf is not created before that - sysprep runs only with the -reseal -mini -quiet options. So, do I need to use UpdateHal statements if I have created the image on a ACPI Multiprocessor PC HAL and want to deploy the image on a ACPI Uniprocessor PC HAL or during the minisetup the correct HAL will automatically configured? Thanks in advance.
Tjniko, 09/22/2008
I have been working with sysprep for awhile now and have found an easy way to change the HAL without having to add anything to the sysprep.inf file. All you need to do is download the program called HALu 2.0. This program allows you to select the HAL you want to use and then reboots the computer. Once the computer comes back up, just go into device manager and you should see the change there. I have used this progam before when my master image used to be on a computer with an ACPI-PC HAL. I pushed that image to an ACPI Multiprocessor machine, ran HALu, and everything worked fine. Device manager showed the correct HAL and both processes came up under the task manager.
David Remy, 09/24/2008
Thanks Tjniko for the extra tip, it's always nice to know all the apps out there to help with cloning.

If anyone is looking for the app Tjniko mention I was able to find a link at:
http://www.hardware.info/en-US/news/ym2cmZqYwp2a/Problems_updating_to_a_dualcore_CPU_Not_anymore/
Rob, 10/08/2008
I've been working on a Sysprep image for XP that covers a number of different hardware models. But I'm a little confused with the situation regarding HALs because there seem to be some contradictions in their use. The ref.chm provided with Sysprep and the Technet article state that the use of UpdateHAL "is not required in Windows XP or the Windows Server 2003 family". Is this true? Does this mean a uniprocessor XP build used with sysprep will automatically jump to the relevant multiprocassor HAL?

I have a build that appears to work on both uni and multiprocessor PCs without using the update HAL command, however even though the multiprocessor machines show they have the correct HAL installed. They don't show multiple processors in the task manager. Does this mean the system isn't actually loading the multiprocessor HAL correctly?

Also, the build blue screens when loaded on a PC with a multiple core processor, even though the same HAL is used for multicore and multiprocessor PCs.

Anyone able to shed some light on this. Are the ref.chm and Technet articles true or is a HAL entry in the sysprep.inf an absolute necessity?
vikas, 11/24/2008
Hello,

I am trying to build a single image for differnet HW (HP DC 7800 & Dell GX 240) , i m getting teh error of HAL.dll corrupt or missing. I have tries all these Update option but no go.

The major differencr between teh HW is of Hard Disk one is IDE and other is SATA.
any suggestions ???
Zorden, 12/06/2008
Hello,

We are to use Windows 2008's WDS role to deploy unattanded XP installs to many PCs and notebooks. And of course we ran into problems regarding HALs (and PATA/SATA drivers).

The base image was made on a uniprocessor ACPI PC and this can be deployed to similar uniprocessor PCs without any problem. In WDS the inf and xml files are linked to the image.

WDS offers a menu with list of available images to be selected to deploy. This list contains only the images which are suitable for the given hardware (basically HAL). The first problem occurs when a multiprocessor (multicore) ACPI notebook is booted with PXE and this list of images are empty. This is due to the different HAL, I assume.

How can we configure the sysprep.inf and the WDS to show the uniprocessor image to multiprocessor machines? As far as I read the uniprocessor HAL should or must work on a multiprocessor hardware without problem and XP can update the uniprocessor HAL to multiprocessor HAL.

The second question is not HAL related but also important. How can a PATA base image be installed onto a SATA system?

Many thanks in advance!
cody, 12/15/2008
To replace the HAL after the fact download devcon
http://support.microsoft.com/kb/311272

Place in the system32 folder (or not)
Single core APIC to Multicore APIC make a batch file with this: (2 lines)

devcon sethwid @ROOTACPI_HAL000 := +acpiapic_mp !acpiapic_up
devcon update c:windowsinfhal.inf acpiapic_mp

To go from Multicore APIC to Single (for whatever reason...)

devcon sethwid @ROOTACPI_HAL000 := +acpiapic_up !acpiapic_mp
devcon update c:windowsinfhal.inf acpiapic_up
François Racine, 12/16/2008
I have a new Toshiba Tecra S10 ACPI_APIC_MP.Actually I am creating my image from DELL GX115 ACPI_PIC_UP. My image is just freezing on the S10 but not on a TECRA A9 ACPI_APIC_MP.

MS is saying they will not support a PIC to APIC image...
I have a lot of UP and MP.

1. So what would be the best solution for me?
2. Do I need adding all lines?
UpdateUPHAL = “ACPIAPIC_UP,%WINDIR%InfHal.inf”
UpdateUPHAL = “ACPIPIC_UP,%WINDIR%InfHal.inf”
UpdateUPHAL = “MPS_UP,%WINDIR%InfHal.inf”
UpdateHAL = “ACPIAPIC_MP,%WINDIR%InfHal.inf”
UpdateHAL = “MPS_MP,%WINDIR%InfHal.inf”
UpdateHAL = “SYSPRO_MP,%WINDIR%InfHal.inf”
or just
UpdateUPHAL = “ACPIAPIC_UP,%WINDIR%InfHal.inf”

If I read correctly, the minisetup will change my HAL to APIC everytime? But what will happen if the destination computer is PIC and not APIC?

3. If I want my image to be universal working on UP and MP what will I need to add in my sysprep? Will I need different sysprep?
cody, 12/16/2008
We currently are a Novell shop (yuck, I know) - but with that, we have a master image, and then add-on images. Master image was built on a uni, and the add-on's are drivers and sysprep.inf's to reflect appropriately.

So after blowing down the master image, and before rebooting, we blast down the add-on image (i'm sure there is an MS way to do that) which replaces the sysprep.inf with the one relative to the hardware with the UpdateHal line changed, along with putting the appropriate drivers in the search path as defined in sysprep.inf.

If the image is freezing during sysprep - you may want to try changing the bios setting for DualCore (or DualProcessor) to disable, then you can re-enable after sysprep finishes. I have run into that recently. The image was built on an HP 5100, but freezes on an HP 6930p laptop unless I disable dualcore before sysprep runs. I also have to change SATA emulation mode to ide instead of AHCI. I am still trying to find a real fix for that.
François Racine, 12/17/2008
Finally, I found an ACPI APIC UP will proceed correctly on ACPI APIC MP. I was surprise seeing 2 processor without hal replacement!

But I have a lot of ACPI PIC UP... Will I be able to deploy ACPI to PIC by using UpdateUPHAL = “ACPIPIC_UP,%WINDIR%InfHal.inf” or if there is another solution?
Eve, 02/14/2009
François Racine,

Were you able to get your image to work on the Toshiba Tecra S10? Did you have to re-create your image from scratch? I've got an S10 that I keep getting a BSOD during sysprep.
Francois Racine, 04/17/2009
Eve,

Yes we finally found a way to get a single image. The problem was with the new chipset. To solve this issue, we had to change the HAL before the OS would wake, so just after the image process.
Femi, 01/08/2009
Guys,

In a corporate environment one cannot afford to leave room for doubt.

If you are creating an image that may be deployed to thousands of machines your best bet is to create two .wim images one for ACPI_UP and one for ACPI_MP machines. If the images are in the same image group SIS will keep the file size to a minimum.

UP machines will only see the UP image likewise MP machines.
Ron, 01/14/2009
Hi,

I'm also trying to do a universal image of dell desktops optiplex 760, 755 and 745. Not sure if my bsod issue is with HAL or if it's PATA to SATA when using sysprep. This issue is similar to Zordan's question from above post.
Dave Marker, 02/13/2009
Ron,

We use Dells at work and have been purchasing the Optiplex models as well. I've found that there's an issue with the SATA settings and our XP disk. From my experience, changing the SATA operation to legacy or ATA corrects the issue. I have a feeling that Dell includes some SATA drivers in their flavor of XP disk that isn't included on most XP disks. I haven't tried pulling drivers out of the Dell XP install disk though.
David Remy, 03/04/2009
Dave Marker mentions that changing the controller to ATA fixed some issues and I have seen this as well. It is due to that driver being included in the install cd that they provide as Dave thought and if you do some driver ripping you should be able to get it.

Great catch Dave!
Johan Bezem, 04/15/2009
[...] Drivers To Our Image PC SysPrep in Depth - Part 2 - Verifying SysPrep And Driver File Permissions SysPrep in Depth - Part 3 - SysPrep.inf and HAL’s SysPrep in Depth - Part 4 - Cleaning Up Unneeded Drivers SysPrep in Depth - Part 5 - Customizing [...]

http://www.bezem.de/2009/04/virtualisation-vmware-sysprep-not-as-easy-as-it-seems/
Jeff Wells, 06/20/2009
This thread is getting kinda old, but still helpful with those of us stuck deploying XP for the forseeable future.

Anyway, if you're having trouble finding an old ACPI PIC machine, but still need to support it in your build, you can actually drop a modern pc down to the ACPI PIC HAL before sysprepping, and then use UpdateUPHAL to raise it back up in the post-sysprep. This lets you have near universal compatability since virtually everything uses or can use one of the three HALs - PIC or the two APIC upgrades - without needing a PIC machine to start with.

To do this, grab the halacpi.dll (NOT halaacpi.dll) out of the SP2.cab on the SP2 CD, plus the original ntoskrnl.exe and ntkrnlpa.exe in the same location. Rename the dll to hal.dll and drop all three in the windowssystem32 folder, overwriting the old ones.

It takes at least one reboot, sometimes two, but the ACPI PIC sticks even on new machines, and virtually everything is compatible with APIC, it's just slow on new machines. You've now built your sysprep image with the old HAL on a new machine. :)

If you want to automate an update to MPS HALs you'll need a script from here to detect and swap the HAL. Johan's HAL detection script would be a good place to start for reference.
Brendan, 08/14/2009
You may need to change your Drive type in your bios to an ide compatible device. There is usually an option to make the drives backwards compatible.
David Remy, 05/31/2010
This list is still up to date and would only need to be revised if they were to come out with a new processor class and then offer support to XP. Currently there isn't any plans I know of that would cause such a change so this list should be good for some time.

Glad to hear others are still finding this to be a good source for XP HAL info.
Thalles Torchi, 10/27/2010
At the company where I work the problem of HAL. It is circumvented by using the backup & restore software ACRONIS V.10 with Universal Restore Plugin it updates the HAL under the HARDWARE without any user intervention. Then simply provide the drivers (masstorage) for sysprep.
archive/blog/2007_9_28-3.txt · Last modified: 09/28/2007 (external edit)