mats Posted December 1, 2008 Share Posted December 1, 2008 I didn't know you could do it from boot.ini either. It might be a very good way actually since some computers won't boot on the more generic haltypes.We sav this problem and used acpi_pc hal wich boots anything we got so far but being able to set the hal up front may be even better Link to comment Share on other sites More sharing options...
secotton Posted December 11, 2008 Share Posted December 11, 2008 I didn't know you could do it from boot.ini either. It might be a very good way actually since some computers won't boot on the more generic haltypes.We sav this problem and used acpi_pc hal wich boots anything we got so far but being able to set the hal up front may be even betterWe did the exact same thing as you described - the acpi_pc HAL would boot everything...while until we got the latest Lenovo T400's in. The processor in that model doesn't support the ACPI_PC HAL - apparently Intel decided to remove some instruction sets that were outdated in favor of newer ones (don't quote me on that). I've now decided to 'fork' the image since alot of the older computers are too old now and not being used as much. The dual core's really do pack a good punch compared to the P4's. Link to comment Share on other sites More sharing options...
mats Posted December 12, 2008 Share Posted December 12, 2008 Thanks for the info. Now i know that the current soloution won't last much longer. Time to start thinking about something new then, win 7 maybee? Link to comment Share on other sites More sharing options...
ubernerd Posted January 3, 2009 Share Posted January 3, 2009 I have used this solution for a while and it works pretty well for all systems.Build an image for acpi single processor, and let sysprep handle the switch to multicore hal if required (I use wmi to get the number of cores on the chip).Oh and btw this switch is actually supported by MS, the switch from the old advanced acpi to acpi single- or multiprocessor is not supported.This will work for most current systems, but if you have any older systems that requires the old Advanced ACPI thing, you can hack the correct HAL files onto the c: drive after deploying the image and before starting minisetup, I do this as part of the process where I add the correct drivers for the model identified from the SMBIOS data.I also kick out any references to Intelppm in the registry.Using this principle I avoid having multiple images for a single OS, it does however require a fair amount of scripting for it to work as described. Link to comment Share on other sites More sharing options...
sw2000 Posted January 17, 2009 Share Posted January 17, 2009 I would like to add Johan Arwidmark's latest Z-HalDetect script into my WinPe 2.01 process without having to use MDT2008 or BDD 2007. Currently I deliver our XP image from a USB drive. I'm guessing that after the image is applied and before restarting the PC I need to call a script that will check the HAL type and modify the sysprep file. What modifications are necessary to run this script after imagex has applied the image to the C partition? I would really appreciate any help.<job id="ZeroTouchInstallation"><script language="VBScript" src="ZTIUtility.vbs"/><script language="VBScript">'//////////////////////////////////////////////////'//'// Script File:'//'// Z-HalDetect_standalone_version.wsf'//'// This script updates sysprep.inf with correct HAL Type'// The Reference (master) image should have an Advanced ACPI HAL type.'//'// This version does not require the MDT 2008 environement being present,'// E.g. can be used with Intel LANDesk or Altiris (Note: ZTIUtility.vbs from'// MDT 2008 must be added to the same folder)'//'// This script assumes the following files are being present in C:\Drivers\UniProcHAL'// hal.dll (Renamed from halaacpi.dll to hal.dll)'// ntkrnlpa.exe'// ntoskrnl.exe'//'// Author: Johan Arwidmark'// URL: [url="http://www.deployvista.com"]http://www.deployvista.com[/url]'//'// Disclaimer'// This script is provided "AS IS" without express'// or implied warranty of any kind.'//'//////////////////////////////////////////////////' Customize the local sysprep.inf file based on the HAL typeCall UpdateSysprepinf ()' Done, quit.WScript.QuitSub UpdateSysprepinf ()' Set Sysprep PathIf oFSO.FileExists("C:\sysprep\Sysprep.inf") thensSysprepInf = "C:\sysprep\Sysprep.inf"oLogging.CreateEntry "Found sysprep in " & sSysprepInf, LogTypeInfoElseoLogging.CreateEntry "Could not locate Sysprep", LogTypeWarningEnd if' Find out the HAL typesHalType = oShell.RegRead("HKLM\SYSTEM\CurrentControlSet\Enum\Root\ACPI_HAL\0000\HardwareID")If sHalType(0) = "acpiapic" Thenif oShell.Environment.item("NUMBER_OF_PROCESSORS") = 1 thenWriteIni sSysprepInf, "Unattended", "UpdateUPHAL", "ACPIAPIC_UP,C:\Windows\Inf\Hal.inf"oLogging.CreateEntry "HAL Type is ACPIAPIC_UP, updating sysprep.inf", LogTypeInfoCall CopyHalFiles()elsewriteini sSysprepInf, "Unattended", "UpdateHAL", "ACPIAPIC_MP,C:\Windows\Inf\Hal.inf"oLogging.CreateEntry "HAL Type is ACPIAPIC_MP, updating sysprep.inf", LogTypeInfoCall CopyHalFiles()end ifElseIf sHalType(0) = "acpiapic_up" ThenWriteIni sSysprepInf, "Unattended", "UpdateUPHAL", "ACPIAPIC_UP,C:\Windows\Inf\Hal.inf"oLogging.CreateEntry "HAL Type is ACPIAPIC_UP, updating sysprep.inf", LogTypeInfoCall CopyHalFiles()ElseIf sHalType(0) = "acpiapic_mp" Thenwriteini sSysprepInf, "Unattended", "UpdateHAL", "ACPIAPIC_MP,C:\Windows\Inf\Hal.inf"oLogging.CreateEntry "HAL Type is ACPIAPIC_MP, updating sysprep.inf", LogTypeInfoCall CopyHalFiles()ElseoLogging.CreateEntry "HAL Type is ACPIPIC, Do nothing", LogTypeInfoEnd ifEnd SubSub CopyHalFiles()sSourceFolder = "C:\Drivers\UniProcHAL"sDestinationFolder = "C:\Windows\System32"oLogging.CreateEntry "Checking for" & sSourceFolder, LogTypeInfoIf oFSO.FolderExists(sSourceFolder) thenoLogging.CreateEntry "Folder " & sSourceFolder & " Found", LogTypeInfooLogging.CreateEntry "Copying HAL files for UniProc and MultiProc Comatibility", LogTypeInfoFor Each sFile In oFSO.GetFolder(sSourceFolder).FilesoFSO.GetFile(sFile).Copy sDestinationFolder & "\" & oFSO.GetFileName(sFile),TrueoLogging.CreateEntry "Copying " & oFSO.GetFileName(sFile) & " to " & sDestinationFolder, LogTypeInfoNextElseoLogging.CreateEntry "Error - Folder " & sSourceFolder & " Not Found", LogTypeErroroLogging.CreateEntry "Error - Copying HAL files for UniProc and MultiProc Comatibility Failed ", LogTypeErrorCopyHalFiles = FailureExit SubEnd IfEnd SubFunction ReadIni(file, section, item)ReadIni = ""file = Trim(file)item = Trim(item)Set ini = oFSO.OpenTextFile( file, 1, True)Do While ini.AtEndOfStream = Falseline = ini.ReadLineline = Trim(line)If LCase(line) = "[" & LCase(section) & "]" Thenline = ini.ReadLineline = Trim(line)Do While Left( line, 1) <> "["'If InStr( 1, line, item & "=", 1) = 1 Thenequalpos = InStr(1, line, "=", 1 )If equalpos > 0 Thenleftstring = Left(line, equalpos - 1 )leftstring = Trim(leftstring)If LCase(leftstring) = LCase(item) ThenReadIni = Mid( line, equalpos + 1 )ReadIni = Trim(ReadIni)Exit DoEnd IfEnd IfIf ini.AtEndOfStream Then Exit Doline = ini.ReadLineline = Trim(line)LoopExit DoEnd IfLoopini.CloseEnd FunctionSub WriteIni( file, section, item, myvalue )in_section = Falsesection_exists = Falseitem_exists = ( ReadIni( file, section, item ) <> "" )wrote = Falsefile = Trim(file)itemtrimmed = Trim(item)myvalue = Trim(myvalue)temp_ini = oFSO.GetParentFolderName(file) & "\" & oFSO.GetTempNameSet read_ini = oFSO.OpenTextFile( file, 1, True, TristateFalse )Set write_ini = oFSO.CreateTextFile( temp_ini, False)While read_ini.AtEndOfStream = Falseline = read_ini.ReadLinelinetrimmed = Trim(line)If wrote = False ThenIf LCase(line) = "[" & LCase(section) & "]" Thensection_exists = Truein_section = TrueElseIf InStr( line, "[" ) = 1 Thenin_section = FalseEnd IfEnd IfIf in_section ThenIf item_exists = False Thenwrite_ini.WriteLine linewrite_ini.WriteLine item & "=" & myvaluewrote = Truein_section = FalseElseequalpos = InStr(1, line, "=", 1 )If equalpos > 0 Thenleftstring = Left(line, equalpos - 1 )leftstring = Trim(leftstring)If LCase(leftstring) = LCase(item) Thenwrite_ini.WriteLine itemtrimmed & "=" & myvaluewrote = Truein_section = FalseEnd IfEnd IfIf Not wrote Thenwrite_ini.WriteLine lineEnd IfEnd IfElsewrite_ini.WriteLine lineEnd IfWendIf section_exists = False Then ' section doesn't existwrite_ini.WriteLinewrite_ini.WriteLine "[" & section & "]"write_ini.WriteLine itemtrimmed & "=" & myvalueEnd Ifread_ini.Closewrite_ini.CloseIf oFSO.FileExists(file) thenoFSO.DeleteFile file, TrueEnd ifoFSO.CopyFile temp_ini, file, trueoFSO.DeleteFile temp_ini, TrueEnd Sub</script></job> Link to comment Share on other sites More sharing options...
mats Posted January 19, 2009 Share Posted January 19, 2009 I didn't know you could do it from boot.ini either. It might be a very good way actually since some computers won't boot on the more generic haltypes.We sav this problem and used acpi_pc hal wich boots anything we got so far but being able to set the hal up front may be even betterWe did the exact same thing as you described - the acpi_pc HAL would boot everything...while until we got the latest Lenovo T400's in. The processor in that model doesn't support the ACPI_PC HAL - apparently Intel decided to remove some instruction sets that were outdated in favor of newer ones (don't quote me on that). I've now decided to 'fork' the image since alot of the older computers are too old now and not being used as much. The dual core's really do pack a good punch compared to the P4's.Sometimes the world can be pretty funny. Guess what. I got a T400 on my hand's now . Did a quick patch for it.hal=objWSHShell.RegRead("HKLM\SYSTEM\CurrentControlSet\Enum\Root\ACPI_HAL\0000\HardwareID")If hal(0)="acpiapic_mp" Then set objfile=fso.getfile("C:\boot.ini") objfile.attributes=0 line= objini.Readstring("operating systems","multi(0)disk(0)rdisk(0)partition(1)\WINNT","C:\boot.ini") & " \kernel=ntkrnlmp.exe \hal=halmacpi.dll" objini.writestring "operating systems","multi(0)disk(0)rdisk(0)partition(1)\WINNT",line,"C:\boot.ini" objfile.attributes=39end ifThe Objini object is just a simple ini read/write class in an activeX dll we write to stop bloat every script with it. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now