Topic: Hardware Universal Ghost Image

It looks like tools like nLite, WPI, and DPBase are geared toward CD based installs.

Due to the way we manage computers I am stuck with image based deploments.

Are there tools, or ways to use these tools to create Ghost images that are hardware independant?

Thanks!

Re: Hardware Universal Ghost Image

It may be possible to produce your own driver.cab file to replace the driver.cab in c:\windows\driver cache\i386\

It's just my theory, but if you clone your image to a different PC with different hardware, windows should automatically scan the driver.cab file for drivers for your 'new' hardware.
I haven't tried it, and it's just a theory of mine.
To make the CAB file, use CabTool (google).  Make sure you clear out the c:\windows\prefetch\ directory as well prior to imaging.

Hmmm, I might just try that trick myself.

Read BEFORE you post.  HWID tool   DriverPacks Tutorial   DONATE!
http://driverpacks.net/userbar/admin-1.png
Not all heroes wear capes, some wear Kevlar!

Re: Hardware Universal Ghost Image

As far as I know, if you clone your image to a different PC with a different motherboard, XP usually will not boot (BSOD). If the M/B is the same, and the other hardware is different, it might work. I've seen clones boot up on different M/B's, but they usually have problems. Haven't done it alot, so you may get better results. Who can say? Anyway, good luck.

Dave

If it ain't broke, you ain't 'FIXED' it enough.

Re: Hardware Universal Ghost Image

elbrute wrote:

As far as I know, if you clone your image to a different PC with a different motherboard, XP usually will not boot (BSOD).

Sometimes yes, sometimes no.
When you boot into safe-mode, no drivers are loaded right?  All I'm saying is it's worth a shot.  What's the worst that can happen?  BSOD...OK, back to square one.
smile

Read BEFORE you post.  HWID tool   DriverPacks Tutorial   DONATE!
http://driverpacks.net/userbar/admin-1.png
Not all heroes wear capes, some wear Kevlar!

Re: Hardware Universal Ghost Image

if the platforms both use the the same controller for the HDD it will work
if not you wont even get to safemode youll get the "7B" bsod error
(incorrect HDD driver)

Last edited by OverFlow (2007-05-02 16:14:19)

DP BartPE Tutorial   DP_BASE Tutorial   HWID's Tool     Read BEFORE you post    UserBars!
http://driverpacks.net/userbar/admin-1.png
The DriverPacks, the DP_Base program, and Support Forum are FREE!.

Re: Hardware Universal Ghost Image

You'll also need to deal with HAL issues - booting an ACPI HAL on a Standard PC HAL system will cause it to just black screen before it does anything. Vista's images are HAL independent, I am not sure how it will deal with mass storage issues which is also key.

I've had no luck with swapping motherboards under XP - I've always had to do a repair (which works pretty well).

Re: Hardware Universal Ghost Image

I'm using "MySysprep" to change the HAL's and sysprep is taking care of building the mass storage driver section.  But yea I'm having strange issues like some Dell laptops hanging as if they are having MSD or HAL issues, or newer Dell OptiPlex systems getting stuck in reboot looks and trying to load UK drivers over English ones.

I guess I can't figure out why if this works during install using DriverPacks or nLite (every model I have used it on is flawless), why there isn't a way to make this work with an image.

I trialled Binary Research's UIU (Universal Image Utility) a couple of years ago, and it seemed to be bloated driver database and an extensive sysprep process.  Altiris is also accomplishing universal image ability.  So I can't imagine that the opensorce / freeware community has not accomplished the same thing.

Re: Hardware Universal Ghost Image

I think te answer is obvious.

with a new install everything is created specificaly to the platform you installed on.

when you use an image the creation process is already done, and won't be done again.

perhaps RIS is your answer?

when I use ghost images I create a ghost image for each platform.

Last edited by OverFlow (2007-05-03 07:52:30)

DP BartPE Tutorial   DP_BASE Tutorial   HWID's Tool     Read BEFORE you post    UserBars!
http://driverpacks.net/userbar/admin-1.png
The DriverPacks, the DP_Base program, and Support Forum are FREE!.

Re: Hardware Universal Ghost Image

OverFlow wrote:

when I use ghost images I create a ghost image for each platform.

Yes, that is the same method we use at work.  But the 'universal' image question is an intriguing one. 
I have more reading to do apparently.

Read BEFORE you post.  HWID tool   DriverPacks Tutorial   DONATE!
http://driverpacks.net/userbar/admin-1.png
Not all heroes wear capes, some wear Kevlar!

Re: Hardware Universal Ghost Image

I have not yet attempted it yet, but...

http://forum.driverpacks.net/viewtopic.php?id=768

http://forum.driverpacks.net/viewtopic.php?id=1291

I'm really curious if this will fix my HAL issues, because I think "My_Sysprep" only compounded them.

Re: Hardware Universal Ghost Image

I've got a fairly universal RIPREP image I use through SMS OSD. As long as you've got an ACPI (old or new version) HAL, then I can handle it.

Re: Hardware Universal Ghost Image

What was your process for building it?

Re: Hardware Universal Ghost Image

I have created images using this process on a Dell Optiplex GX745, and a GX620.   These images load and go through the initial configuration (computer name, domain join) but after reboot, they lockup booting on a Dell Latitude C610 and D600.

Has anyone gotten images created on new desktops to work on these laptops?

Re: Hardware Universal Ghost Image

I own a Latitude C600 (very similar) but I do not have access to it at the moment.  It's on loan to a friend until they rebuild their main system (bad mobo).  I should get it back in a couple of weeks though if you can wait that long. hmm

Read BEFORE you post.  HWID tool   DriverPacks Tutorial   DONATE!
http://driverpacks.net/userbar/admin-1.png
Not all heroes wear capes, some wear Kevlar!

Re: Hardware Universal Ghost Image

I very well may not have this problem solved by then! haha.

Ok well I did actually get it to work from a GX745 to a C610 this afternoon... but that presents a problem of it's own.


I have been building on the latest model and, and modifying the PC to work on all older models.  When we began buying dual core machines this introduced machines that would not longer work on the ACPI HAL.

My process has been to build on the GX745 with a Core 2 Duo, when complete change the HAL driver to "Advanced Computer and Power Interface (ACPI)" prior to syspreping.

In my Sysprep.inf I included the line " UpdateUPHAL = "ACPIAPIC_UP,%WINDIR%\Inf\Hal.inf" ", in order to change the HAL back to a Multiprocessor HAL when it was detected by SYSPREP.  This was working on all of my Desktop PC's, but not on my laptops.

Deleting the " UpdateUPHAL = "ACPIAPIC_UP,%WINDIR%\Inf\Hal.inf" ", line in Sysprep corrected the issue on my single core laptops, but has now broke the image for my multi-core machines.

So I need to find a better way to reliably correct the HALs.

I am about to try another method from here, called "My Sysprep".
http://jimtsay.googlepages.com/mysysprep

It has two methods for changing the HAL.  The first I am going to try uses CPUID to detect the processor type, and change the HAL accordingly.  I tried this process a couple of days ago, but I had mistakenly left the " UpdateUPHAL = "ACPIAPIC_UP,%WINDIR%\Inf\Hal.inf" ", line in SYSPREP when I ran it, and it failed.

The other method is scripting specific HAL's for each PC model, which will take more work, but if it works correctly it will be worth it.

Anyone have any other suggestions?

Re: Hardware Universal Ghost Image

what i do to image machine without any problems is install windows in VMWare. when windows ask you to hit f6 for textmode drivers hit f5 to choose your HAL. Choose :Advanced Computer and Power Interface. after windows is installed and you visited windows update i go to device manager and update my ide controller. Choose pick your own drivers and  install standard ide controller. then you can sysprep your machine and make sure you build mass storage drivers. then image using your fav image tool (i like imagex or ghost) and your done. you can use your update hal script and it should work fine. Since VMWare doesn't use any 3rd party driver you shouldn't have any driver problem. i've been doing this for a while now and never had any problems. Hope this helps you out.

Last edited by geo411m (2007-05-06 03:59:02)

Re: Hardware Universal Ghost Image

EvilBetty wrote:

What was your process for building it?

Build a reference image using the older ACPI HAL (Advanced Configuration and Power Interface (ACPI) PC HAL) even though the host system uses the newer ACPI HAL. During the set-up I use the UpdateUPHAL command in sysprep to update it to the latest UP HAL (which will automatically swap to MP HAL if Windows detects multiple CPUs) - but I have a WMI detect for the motherboard so if it is a certain model then I do not add the UpdateUPHAL command so it remains on the older ACPI HAL.

That make sense? wink

Re: Hardware Universal Ghost Image

Yes, what process are you using for the WMI query / script?

Re: Hardware Universal Ghost Image

I do it during the post-install phase in the SMS OSD - so in a WinPE environment basically. GHOST can run in WinPE, so this should be possible there also.

Re: Hardware Universal Ghost Image

I know of Windows PE... I have it... But I have never used it.  I have my techs using BartPE.

We do not use SMS.  And I'm not sure what OSD is.

I'll really like to do something similar.  Do you have a sample script you can share?

Re: Hardware Universal Ghost Image

Why not eh? smile The script is based on something I found online anyway.

Also, I modified it to do a search for a mac address in a file. This was done due to some machines being so old that they didn't report their motherboard model using WMI at all. For any new machines, it is redundant.

SMS OSD is just a method of deploying a sysprep'd image - pretty similar to ghost really.

Option Explicit

' Declare the variables
Dim objWMI, objResults, objInstance, strModel, objFS
Dim strUP, strMP
Dim env             ' OSD environment object
Dim syspreppath
Dim intCompare

' Initialize objects

Set objWMI = GetObject("winmgmts:")
set objFS = CreateObject("Scripting.FileSystemObject")
set env     = CreateObject("OSD.Environment")

' Detect hardware using WMI

Set objResults = objWMI.InstancesOf("Win32_ComputerSystemProduct")

For each objInstance in objResults
If not IsNull(objInstance.Name) then
strModel = lcase(Trim(objInstance.Name))
End if
Next

intCompare=strcomp(strModel, "")

if intCompare=0 then
  strModel="Unknown"
end if 

' Find out sysprep values and update sysprep.inf

strUP = "ACPIAPIC_UP,%windir%\inf\hal.inf"
strMP = "ACPIAPIC_MP,%windir%\inf\hal.inf"

syspreppath = env("OSDTARGETDRIVE") & "sysprep\sysprep.inf"
'syspreppath = "c:\sysprep\sysprep.inf"

Select Case strModel

Case "optiplex gx1 450s+"
wscript.echo "No Update needed"

Case "Unknown"
if mac_check <> 1 then
  wscript.echo "Update needed"
  WriteIni syspreppath,"Unattended","UpdateUPHAL",strUP
else
  wscript.echo "No Update needed"
end if  

Case Else
WriteIni syspreppath,"Unattended","UpdateUPHAL",strUP

End Select

Function mac_check()

  Dim unk_acpi, f, text, FSO, objWMI
  Dim objNetworkAdapters, ObjAdapter, re, colMatches, strSFN

  set FSO = CreateObject("Scripting.FileSystemObject")
  Set objWMI = GetObject("winmgmts://")

  strSFN = WScript.ScriptFullName
  strSFN = Left(strSFN,InStrRev(strSFN,"\"))
  
  unk_acpi = "unk_acpi.txt"

  set f = FSO.OpenTextFile(strSFN & unk_acpi, 1, false)
  text = f.ReadAll()
  f.Close

  Set objNetworkAdapters = objWMI.ExecQuery("select * from Win32_NetworkAdapterConfiguration where IPEnabled = 1")

  mac_check=0

  For Each objAdapter In objNetworkAdapters
'    wscript.echo "Network adapter: " & objAdapter.Caption & " has MAC address " & objAdapter.MacAddress
    set re = new RegExp
    re.Pattern = objAdapter.MacAddress
    re.Global = true
    re.Multiline = true
    re.IgnoreCase = true
    set colMatches=re.Execute(text)
    if colMatches.Count <> 0 then
      wscript.echo "Non-zero quit."
      mac_check=1
    end if  
  Next
End Function


Function ReadIni(file, section, item)

Dim line, equalpos, leftstring, ini

ReadIni = ""
file = Trim(file)
item = Trim(item)
Set ini = objFS.OpenTextFile( file, 1, False)

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
set env     = CreateObject("OSD.Environment")
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 )

Dim in_section, section_exists, item_exists, wrote
Dim itemtrimmed, read_ini, write_ini, temp_ini
Dim linetrimmed, line, equalpos, leftstring

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 = objFS.GetParentFolderName(file) & "\" & objFS.GetTempName

Set read_ini = objFS.OpenTextFile( file, 1, True, False )
Set write_ini = objFS.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 itemtrimmed = "" then
' Do nothing: we want to wipe the section
ElseIf item_exists = False Then
write_ini.WriteLine line
If myvalue <> "" then
write_ini.WriteLine item & "=" & myvalue
End if
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
If myvalue <> "" then
write_ini.WriteLine itemtrimmed & "=" & myvalue
End if
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 and itemtrimmed <> "" Then
' section doesn't exist
write_ini.WriteLine
write_ini.WriteLine "[" & section & "]"
If myvalue <> "" then
write_ini.WriteLine itemtrimmed & "=" & myvalue
End if
End If

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

End Sub

Re: Hardware Universal Ghost Image

I haven't read the entire thread, but I saw:
- Ghost
- sysprep
- HAL

When trying to create a universal Ghost image with the DriverPacks, you should indeed use sysprep. But it's true that the DriverPacks do not take care of setting the correct HAL, that's something your imaging software or some script or something else will have to take care of.

Founder of DriverPacks.net — wimleers.com

23

Re: Hardware Universal Ghost Image

i still never realy understould,  why al the complicated scipts... 
because if i just run a lowlevel sysprep (and remove all the driver-stuff... )

there shouldn't be any thing wrong with setting pnp driverpath to   %windir%\driverpacks  -  the only things i DO have to worry about is that ALL userdata  stored in a profile  like   documents and settings\THIS USER\aplication data\   should be moved to the  %alluserprofiles%,   to prevent users from having to  'register' and stuff like that..

setting the hall is supposed to be done but the native windows installer -
after any sysprep action...

Last edited by -I- (2007-05-15 08:30:48)

disclaimer:
Any posts written by me or on my behalf comes strictly with no implicit warenty unless clearly stated otherwise.
Following any advise i might give, is done soly at one's own risk.
Never give away person-identifiable information about yourself unless you absolutely know for sure you can trust the person you give it to...

Re: Hardware Universal Ghost Image

If the HAL is wrong, the system won't boot so you simply can't do anything. It needs to be changed in advanced. It can be done manually if required, I've seen scripts to do it, but I have not gone down that path as I don't need to.

If you set oempnpdriverspath=c:\windows\driverpacks - it won't work, you need to point it to every directory that has a .inf file. sysprep doesn't search all the subdirectories. sad

Re: Hardware Universal Ghost Image

EvilBetty , I have a universal image built in vmware that works on all Dell PC/laptops I have tried, single or dual core with correct HAL (detected with and corrected in PE)
However it does not work on Dell C610's, after the mini setup reboot it hangs almost immediately, in Safe mode on AGPCPQ.SYS - video related, I believe this is the last file before the ACPI stuff starts implying the HAL is wrong. Any ideas? What HAL did your C610 end up being set to when it worked?
chud