MSFN Forum: WDS, WinPE and HALs on XP and Vista - MSFN Forum

Jump to content



  • 2 Pages +
  • 1
  • 2
  • You cannot start a new topic
  • You cannot reply to this topic

WDS, WinPE and HALs on XP and Vista Rate Topic: -----

#1 User is offline   Tripredacus 

  • K-Mart-ian Legend
  • Group: Super Moderator
  • Posts: 6,988
  • Joined: 28-April 06
  • OS:Windows 7 x86
  • Country: Country Flag

Posted 08 April 2008 - 07:29 AM

A debate seems to have come up at my company regarding how we can't use images any longer (with Ghost) because of the different HALs in a system configuration. It seems we have gotten official word from our tech rep at Microsoft about this issue. However, this is in contrast with what is in KB309283:

http://support.microsoft.com/kb/309283

Which says that if ACPI is enabled, XP will automatically detect the correct HAL.

But if it ends up being true that we cannot use images any longer to deploy our machines using Ghost, then I do not see where there is a difference between that and using the WDS and WinPE. With exception of Vista, you have to capture an existing XP image as a WIM, which basically makes it the same process as Ghost.

Someone tell if I am wrong or there is another way.


#2 User is offline   WreX 

  • Junior
  • Pip
  • Group: Members
  • Posts: 84
  • Joined: 26-October 07

Posted 08 April 2008 - 09:03 AM

Our base image is the standard single CPU HAL, but I use a separate WIM file (or any format of your choosing) for the HAL.DLL and NTOSKRNL.EXE for multi-CPU devices and install those files after applying the base image but before rebooting to Sysprep.

#3 User is offline   TheReasonIFail 

  • Member
  • PipPip
  • Group: Members
  • Posts: 170
  • Joined: 08-April 07

Posted 08 April 2008 - 10:17 AM

I don't know about anyone else but I use the following script. It runs after the WIM has been copied to C:\ and updates sysprep.inf with the information for the appropiate HAL. So far it hasn't failed me yet.

'On Error Resume Next

Set objWshShell = CreateObject("WScript.Shell")
Set objFSO = CreateObject("Scripting.FileSystemObject")


' Activate the partition

Call ActivateDisk()

' Customize the local sysprep.inf file based on the HAL type

Call UpdateSysprepinf ()

' Done, quit.

WScript.Quit


Sub ActivateDisk()

   ' Wait a few seconds, assign drive letter and activate

	wscript.sleep 5000

	cmd = "cmd /c diskpart.exe /s Activate.txt"
	rc = objWshShell.run(cmd, 6, 1)

End Sub

Sub UpdateSysprepinf ()

   ' Find out the HAL type

	sHalType = objWshShell.RegRead("HKLM\SYSTEM\CurrentControlSet\Enum\Root\ACPI_HAL\0000\HardwareID")
		

   ' Write HAL type to sysprep.inf

	If sHalType(0) = "acpiapic_up" Then

		WriteIni "c:\sysprep\sysprep.inf", "Unattended", "UpdateUPHAL", "ACPIAPIC_UP,%WINDIR%\Inf\Hal.inf"

	ElseIf sHalType(0) = "acpiapic_mp" Then

 			WriteIni "c:\sysprep\sysprep.inf", "Unattended", "UpdateHAL", "ACPIAPIC_MP,%WINDIR%\Inf\Hal.inf"

	End if

End Sub

Function ReadIni(file, section, item)

	ReadIni = ""
	file = Trim(file)
	item = Trim(item)
	Set ini = objFSO.OpenTextFile( file, 1, True)

	Do While ini.AtEndOfStream = False
		line = ini.ReadLine
		line = Trim(line)
		If LCase(line) = "[" & LCase(section) & "]" Then
			line = ini.ReadLine
			line = Trim(line)
			Do While Left( line, 1) <> "["
				'If InStr( 1, line, item & "=", 1) = 1 Then
				equalpos = InStr(1, line, "=", 1 )
				If equalpos > 0 Then
					leftstring = Left(line, equalpos - 1 )
					leftstring = Trim(leftstring)
					If LCase(leftstring) = LCase(item) Then
						ReadIni = Mid( line, equalpos + 1 )
						ReadIni = Trim(ReadIni)
						Exit Do
					End If
				End If

				If ini.AtEndOfStream Then Exit Do
				line = ini.ReadLine
				line = Trim(line)
			Loop
			Exit Do
		End If
	Loop
	ini.Close

End Function

Sub WriteIni( file, section, item, myvalue )

	in_section = False
	section_exists = False
	item_exists = ( ReadIni( file, section, item ) <> "" )
	wrote = False
	file = Trim(file)
	itemtrimmed = Trim(item)
	myvalue = Trim(myvalue)

	temp_ini = objFSO.GetParentFolderName(file) & "\" & objFSO.GetTempName

	Set read_ini = objFSO.OpenTextFile( file, 1, True, TristateFalse )
	Set write_ini = objFSO.CreateTextFile( temp_ini, False)

	While read_ini.AtEndOfStream = False
		line = read_ini.ReadLine
		linetrimmed = Trim(line)
		If wrote = False Then
			If LCase(line) = "[" & LCase(section) & "]" Then
				section_exists = True
				in_section = True
			ElseIf InStr( line, "[" ) = 1 Then
				in_section = False
			End If
		End If

		If in_section Then
			If item_exists = False Then
				write_ini.WriteLine line
				write_ini.WriteLine item & "=" & myvalue
				wrote = True
				in_section = False
			Else
				equalpos = InStr(1, line, "=", 1 )
				If equalpos > 0 Then
					leftstring = Left(line, equalpos - 1 )
					leftstring = Trim(leftstring)
					If LCase(leftstring) = LCase(item) Then
						write_ini.WriteLine itemtrimmed & "=" & myvalue
						wrote = True
						in_section = False
					End If
				End If
				If Not wrote Then
					write_ini.WriteLine line
				End If
			End If
		Else
			write_ini.WriteLine line
		End If
	Wend

	If section_exists = False Then ' section doesn't exist
		write_ini.WriteLine
		write_ini.WriteLine "[" & section & "]"
		write_ini.WriteLine itemtrimmed & "=" & myvalue
	End If

	read_ini.Close
	write_ini.Close
		If objFSO.FileExists(file) then
			objFSO.DeleteFile file, True
		End if
		objFSO.CopyFile temp_ini, file, true
	objFSO.DeleteFile temp_ini, True
	
End Sub

This post has been edited by TheReasonIFail: 08 April 2008 - 10:20 AM


#4 User is offline   Tripredacus 

  • K-Mart-ian Legend
  • Group: Super Moderator
  • Posts: 6,988
  • Joined: 28-April 06
  • OS:Windows 7 x86
  • Country: Country Flag

Posted 08 April 2008 - 12:36 PM

I will definately take a look at those two possibilities once I can get approval to start working on it again.

Does memory timing have any effect on the image at all? And if so, is there any documentation or editorial anywhere online I can find to view its effectiveness/non-effectiveness?

#5 User is offline   zorphnog 

  • Advanced Member
  • PipPipPip
  • Group: Members
  • Posts: 427
  • Joined: 25-July 06

Posted 08 April 2008 - 01:01 PM

More info:
http://www.msfn.org/board/index.php?s=&...st&p=669411

#6 User is offline   fizban2 

  • MSFN Addict
  • Group: Super Moderator
  • Posts: 1,897
  • Joined: 14-April 05
  • OS:Windows 7 x64
  • Country: Country Flag

Posted 08 April 2008 - 01:05 PM

the problem isn;t that XP won't detect the wrong HAL, the issue is that after you ghost a machine it has already selected the HAL it will use during install and won;t change unless you manually do it (even with sysprep) say you build and test on a single core machine and puch it to a dual core machine, only a single will be used. vista doesn't have this issue as it is HAL independent.

#7 User is offline   TheReasonIFail 

  • Member
  • PipPip
  • Group: Members
  • Posts: 170
  • Joined: 08-April 07

Posted 08 April 2008 - 01:13 PM

View Postfizban2, on Apr 8 2008, 01:05 PM, said:

the problem isn;t that XP won't detect the wrong HAL, the issue is that after you ghost a machine it has already selected the HAL it will use during install and won;t change unless you manually do it (even with sysprep) say you build and test on a single core machine and puch it to a dual core machine, only a single will be used. vista doesn't have this issue as it is HAL independent.


But if your base image is syspreped using the ACPI HAL, you should be able to update it to any other HAL without a problem.

This post has been edited by TheReasonIFail: 08 April 2008 - 01:13 PM


#8 User is offline   IcemanND 

  • MSFN Junkie
  • Group: Super Moderator
  • Posts: 3,239
  • Joined: 24-September 03
  • OS:Windows 7 x64
  • Country: Country Flag

Posted 08 April 2008 - 10:51 PM

View PostTheReasonIFail, on Apr 8 2008, 03:13 PM, said:

But if your base image is syspreped using the ACPI HAL, you should be able to update it to any other HAL without a problem.


Actually that is not technically correct. You can update the HAL to another compatible HAL. You can force the change between non-compatible HAL's as the script above does but it is not supported by Microsoft.

#9 User is offline   TheReasonIFail 

  • Member
  • PipPip
  • Group: Members
  • Posts: 170
  • Joined: 08-April 07

Posted 09 April 2008 - 06:40 AM

View PostIcemanND, on Apr 8 2008, 10:51 PM, said:

Actually that is not technically correct. You can update the HAL to another compatible HAL. You can force the change between non-compatible HAL's as the script above does but it is not supported by Microsoft.


Well, it works great for us here when the base PC is an ACPI PC.

#10 User is offline   fizban2 

  • MSFN Addict
  • Group: Super Moderator
  • Posts: 1,897
  • Joined: 14-April 05
  • OS:Windows 7 x64
  • Country: Country Flag

Posted 09 April 2008 - 07:06 AM

View PostTheReasonIFail, on Apr 9 2008, 07:40 AM, said:

View PostIcemanND, on Apr 8 2008, 10:51 PM, said:

Actually that is not technically correct. You can update the HAL to another compatible HAL. You can force the change between non-compatible HAL's as the script above does but it is not supported by Microsoft.


Well, it works great for us here when the base PC is an ACPI PC.



i think we all agree the script will work as anyone who is updating their HAL in their XP image is doing the same thing, Iceman was just pointing out the specifics. back to the original post, Go download the Microsoft deployment Toolkit and the WAIK, you will be able to create both XP, 2003, Vista and 2008 based images from that tool, it will also intergrate into SCCM if you are looking to move to that from SMS

#11 User is offline   Tripredacus 

  • K-Mart-ian Legend
  • Group: Super Moderator
  • Posts: 6,988
  • Joined: 28-April 06
  • OS:Windows 7 x86
  • Country: Country Flag

Posted 10 April 2008 - 09:57 AM

View Postfizban2, on Apr 9 2008, 09:06 AM, said:

View PostTheReasonIFail, on Apr 9 2008, 07:40 AM, said:

View PostIcemanND, on Apr 8 2008, 10:51 PM, said:

Actually that is not technically correct. You can update the HAL to another compatible HAL. You can force the change between non-compatible HAL's as the script above does but it is not supported by Microsoft.


Well, it works great for us here when the base PC is an ACPI PC.



i think we all agree the script will work as anyone who is updating their HAL in their XP image is doing the same thing, Iceman was just pointing out the specifics. back to the original post, Go download the Microsoft deployment Toolkit and the WAIK, you will be able to create both XP, 2003, Vista and 2008 based images from that tool, it will also intergrate into SCCM if you are looking to move to that from SMS


Thanks I've already used the WAIK but our MS rep told us we can't use that anymore. So I am switching to OPK instead because of our licensing. It works the same. I've got a handle on Vista and 2008, but we get the choice of moving from Ghost to WDS for XP and I'm trying to make sure it will work out properly once we switch. The only issue I have with XP on HALs is the following:

We create XP images on a per-board basis, not a big mess of boards. So the only thing we will see in a different cfg with one image is perhaps a Celeron vs a Core 2 or on the other side a X64 vs a LE1620. Either way, the CPU is the only thing that will change. All of the boards we use are set up as ACPI. The deal is that XP Pro SP2 detects the HAL at the start of Windows loading so it won't crash if you change the processor out. Of course the original image needs to be made on a UP, because it is designed to scale to an MP if it detects a CPU change.

This is what is noted in the KB article I posted above under bullet 4. I also tested this using identicle configs except for CPU type. Install everything on the PC with the Celeron (including drivers and apps). Make note of the HWID in Devmgmt and the full HAL name given. Turn the machine off, take out the HDD, put it in the machine with the Core 2, boot up and compare against the HAL again. It changes to the MP HAL with no errors to be found.

So this is why I am wondering why it is even needed to change the HAL after imaging, or even have multiple images for different HALs in this case. Yes I understand the need for this if 1) you aren't using similar hardware 2) you aren't using XP Pro SP2 or newer. But since XP can autodetect the HAL, you should be able to use the same image for either MP or UP case. Of course you couldn't use it if you disabled ACPI or tried to put it on an IA64 or what have you.

Anyways its lunch time for me. Let's talk about this some more eh?

#12 User is offline   IcemanND 

  • MSFN Junkie
  • Group: Super Moderator
  • Posts: 3,239
  • Joined: 24-September 03
  • OS:Windows 7 x64
  • Country: Country Flag

Posted 10 April 2008 - 10:37 AM

most people who want to cover multiple HALs seem to want to cover all 7 XP HALs with one image. If you build you image on a UP ACPI HAL and deploy to UP or MP ACPI HAL systems you should be fine. If you build on a MP system you will need to use the sysprep option to downgrade the HAL to UP as downgrading is not automatic.

I'm curious as to why your rep told you that you could not use the WAIK.

#13 User is offline   Tripredacus 

  • K-Mart-ian Legend
  • Group: Super Moderator
  • Posts: 6,988
  • Joined: 28-April 06
  • OS:Windows 7 x86
  • Country: Country Flag

Posted 10 April 2008 - 11:55 AM

View PostIcemanND, on Apr 10 2008, 12:37 PM, said:

I'm curious as to why your rep told you that you could not use the WAIK.


We do/will not use WDS to deploy to corporate pcs, ie workstations and servers within our company. We got this understanding:

WAIK is to deploy within your own company
OPK is to deploy onto machines that are to be sold/redistributed

In addition to using WDS with the OPK, we are also able to make product recovery media with it.

#14 User is offline   thefultonhow 

  • Group: Members
  • Posts: 8
  • Joined: 22-July 05

Posted 26 April 2008 - 02:53 PM

View PostTheReasonIFail, on Apr 8 2008, 09:17 AM, said:

I don't know about anyone else but I use the following script. It runs after the WIM has been copied to C:\ and updates sysprep.inf with the information for the appropiate HAL. So far it hasn't failed me yet.


So does that script automatically choose the multiprocessor ACPI HAL or the normal uniprocessor ACPI HAL based on what type of computer it's being installed on? Where in the setup process can I insert the script? Although I have used RIS in the past, I am new to WDS, and I'd like to not have to have two different images on the WDS server if possible.

#15 User is offline   TheReasonIFail 

  • Member
  • PipPip
  • Group: Members
  • Posts: 170
  • Joined: 08-April 07

Posted 29 April 2008 - 10:30 AM

View Postthefultonhow, on Apr 26 2008, 02:53 PM, said:

So does that script automatically choose the multiprocessor ACPI HAL or the normal uniprocessor ACPI HAL based on what type of computer it's being installed on? Where in the setup process can I insert the script? Although I have used RIS in the past, I am new to WDS, and I'd like to not have to have two different images on the WDS server if possible.


Well, the script doesn't choose the HAL, it updates sysprep.inf with whatever HAL is being used on the PC.

I have the script set to run after I've loaded the image on the drive using imagex.

I have one image for all the PC's I use and it works great for me.

#16 User is offline   thefultonhow 

  • Group: Members
  • Posts: 8
  • Joined: 22-July 05

Posted 29 April 2008 - 01:34 PM

View PostTheReasonIFail, on Apr 29 2008, 10:30 AM, said:

View Postthefultonhow, on Apr 26 2008, 02:53 PM, said:

So does that script automatically choose the multiprocessor ACPI HAL or the normal uniprocessor ACPI HAL based on what type of computer it's being installed on? Where in the setup process can I insert the script? Although I have used RIS in the past, I am new to WDS, and I'd like to not have to have two different images on the WDS server if possible.


Well, the script doesn't choose the HAL, it updates sysprep.inf with whatever HAL is being used on the PC.

I have the script set to run after I've loaded the image on the drive using imagex.

I have one image for all the PC's I use and it works great for me.


How do you trigger the script to run?

#17 User is offline   TeKXpert 

  • Group: Members
  • Posts: 1
  • Joined: 26-April 05

Posted 29 April 2008 - 05:21 PM

The script seems to be referring to Activate.txt? What's on it?

#18 User is offline   TheReasonIFail 

  • Member
  • PipPip
  • Group: Members
  • Posts: 170
  • Joined: 08-April 07

Posted 12 May 2008 - 11:36 AM

View PostTeKXpert, on Apr 29 2008, 06:21 PM, said:

The script seems to be referring to Activate.txt? What's on it?


Activate.txt just tells diskpart to activate the partition and add the C:\ letter to the drive.

#19 User is offline   Kingskawn 

  • Kingskawn
  • PipPip
  • Group: Members
  • Posts: 134
  • Joined: 17-April 06

  Posted 12 October 2008 - 11:12 AM

I hope someone can answer me on this, when we deploy an image that is based on a single processor that we get a BSOD. To encounter this we must change SATA in bios to compatibility instead of ACPI. After that the machine boot normally and continue install.

Is there any way to solve this by not touching to the bios and not get this **( :realmad: )** BSOD?

#20 User is offline   jaclaz 

  • The Finder
  • Group: Developers
  • Posts: 8,792
  • Joined: 23-July 04
  • OS:none specified
  • Country: Country Flag

Posted 12 October 2008 - 12:34 PM

What is the BSOD STOP ERROR?
Not by any chance 0x0000007b? :unsure:


jaclaz

Share this topic:


  • 2 Pages +
  • 1
  • 2
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users



All trademarks mentioned on this page are the property of their respective owners
Copyright © 2001 - 2011 msfn.org
Privacy Policy