Ghost Solution Suite

 View Only
Expand all | Collapse all

ghost32.exe / ghost 11.5.1 cloning

  • 1.  ghost32.exe / ghost 11.5.1 cloning

    Posted Aug 17, 2012 11:47 AM

    ghost.exe -ntexact -clone,mode=copy,src=2,dst=1,sze1=f -sure -batch

     

    Been using the above switches without issues.

     

    Switched to : ghost32.exe and winpe & on our P3 systems its functioning as src=1,dst=2 when its set to src=2,dst=1?



  • 2.  RE: ghost32.exe / ghost 11.5.1 cloning

    Posted Aug 17, 2012 02:23 PM

    more info:

     

    set path=%path%;x:\ghost
    x:
    cd \ghost
    rem --- This will remove any traces of virtual partition from hard drive ---
    gdisk32.exe /revert  >> x:\ghost\startlog.txt
     
    rem --- This will create primary OS drive configuration ---
    ghost32.exe -ntexact -clone,mode=copy,src=2,dst=1,sze1=f -sure -batch
     
    the above is the start.bat at c:\ghost on a winpe boot disk.
     
    example: we have two systems (p4 & a p3 processor) both have two drives primary & secondary.
     
    The above start.bat works like it should on the p4 setup, the ghost drive is put into the primary drive slot & it gets copies the 2nd drive to itself...
     
    On the P3 it does the oppisite and not what I want it to do... it copies the primary down to the 2nd drive giving me two ghost drive...
     
    I've already ruled out a hardware issue on the P3... the same hw setup works with our older 16bit ghost. 
     


  • 3.  RE: ghost32.exe / ghost 11.5.1 cloning

    Posted Aug 19, 2012 12:06 PM

    Have you checked exactly what drive letters are assigned in each case?

    I have seen DOS boots from USB sticks (for example) boot as A: drive on some systems and as C: drive on other systems depending on the particular bios being used.

    With WinPE, the winpe boot system usually ends up on X: and thereafter drive letters are assigned in hardware order - IDE is supported without additional drivers, but SATA and SCSI need additional drivers added to WinPE in most cases.  

    I suspect your issue is to do with the order in which the drives are mounted by WinPE.



  • 4.  RE: ghost32.exe / ghost 11.5.1 cloning

    Posted Aug 20, 2012 11:48 AM

    EdT: Thanks for the reply.

     

     Secondary drive   Primary drive 
    [1] [2]
     destination   source 
     238475 mb   76319mb 
     d:\   c:\ 
       x:\ 

    Seems like the problem is that ghost is seeing the secondary drive as [1] when it should be seeing it as [2].

    Also these are IDE drives.

    Do you know what controls which drive gets the [n]?

     

     



  • 5.  RE: ghost32.exe / ghost 11.5.1 cloning

    Posted Aug 21, 2012 07:08 AM

    IDE drives are mounted first in the bios load order (usually), followed by SATA, and then by any "external" hard disk adapter cards with on board bioses, where the actual address of the extension bios determines the load order.

    If you have two IDE drives, then the next question is about the way that the drives are connected. Older systems tended to offer two IDE ports, each of which could handle two devices in a master/slave arrangement or jumpered for "CS" or cable select mode.

    If your drives are loading in the wrong order, then I would be looking at the hardware connections and also the drive jumpering.  It may be as simple as just swapping the IDE cables over, if the drives are both set as masters on different IDE ports.  If they are on the same IDE cable, then check the master/slave jumper settings.



  • 6.  RE: ghost32.exe / ghost 11.5.1 cloning

    Posted Aug 21, 2012 12:56 PM

    Thanks for the reply.

    Both drives are set with the "master" jumper setting.

    Looks to me like the bios see's the drives correctly

     

     Ghost 
     Secondary drive     Primary drive  
     [1]   [2] 
      destination     source  
      238475 mb     76319mb  
      d:\     c:\  
          x:\  
     Bios 
     Secondary IDE Master   Primary IDE Master 
     Post 
     fixed disk 1   fixed disk 0 

    Everything above is correct except in the Ghost section, the "n" should be [1] for primary & [2] for secondary.

    Also checked the ide cables the primary drive is going to the primary connection on the motherboard, secondary is also to secondary.



  • 7.  RE: ghost32.exe / ghost 11.5.1 cloning

    Posted Aug 21, 2012 02:46 PM

    Is there any option in the bios that sets the boot order for connected devices?

    What does the x: represent in the primary drive column?  Is this an actual partition on the hard disk?

    If so, try changing the drive letter assignment to something else as x: is used as the RAM drive from which WinPE runs after loading.



  • 8.  RE: ghost32.exe / ghost 11.5.1 cloning

    Posted Aug 21, 2012 03:21 PM

    thanks for the reply...

    there is a "hard drive" section in the bios.  The Primary drive [ST380215A-PM] \ 76319mb is the first one, the secondary drive is number 2.

    I probably should have not put the x:\ in that column, its the virtual drive that winpe loads... I was putting the x:\ there because it was being mounted from the c:\ drive.. there is only one partition on the c:\ or primary drive.

    It's looking like its related to winpe & this P3 hardware , I don't have this issue with our 16bit on this hw or I don't have this issue with winpe on our p4 systems using the same ghost boot disk. 

     

    on the p3 w/ winpe boot disk if I swap the switch src=2,dst=1 to src=1,dst=2. I'm trying to avoid that it will require a seperate part for us...

     

     



  • 9.  RE: ghost32.exe / ghost 11.5.1 cloning

    Posted Aug 22, 2012 02:24 AM

    When you use WinPE, you open up a lot of additional capability for your imaging. You can write an entire GUI in hta format, and you can use WMI code to detect the target platform and run the appropriate section of code. 

    Here is some code I used with WinPE to detect some Lenovo models. 

     

    ' Set Environment
     
    ver="CHASSIS 2 September 2009"
    subtype=""
    mdl="-(SUPPORTED)"
    desc="UNSUPPORTED"
    Const ForReading = 1, ForWriting = 2
    Dim fso, f, yesno
    Set fso = CreateObject("Scripting.FileSystemObject")
    strComputer = "."
    Set objWMIService = GetObject("winmgmts:" & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
     
    ' Identify Machine Type and then partition accordingly
     
    Set colEnclosures = objWMIService.ExecQuery("Select * from Win32_SystemEnclosure") 
     
       For Each objEnclosure in colEnclosures
          For Each intChassisType in objEnclosure.ChassisTypes
     
    Select Case intchassistype
     Case "1" : strchassistype = "(1)Other"
     Case "2" : strchassistype = "(2)Unknown"
     Case "3" : strchassistype = "(3)Desktop"
     Case "4" : strchassistype = "(4)Low Profile Desktop"
     Case "5" : strchassistype = "(5)Pizza Box"
     Case "6" : strchassistype = "(6)Mini Tower"
     Case "7" : strchassistype = "(7)Tower"
     Case "8" : strchassistype = "(8)Portable"
     Case "9" : strchassistype = "(9)Laptop"
     Case "10" : strchassistype = "(10)Notebook"
     Case "11" : strchassistype = "(11)Hand Held"
     Case "12" : strchassistype = "(12)Docking Station"
     Case "13" : strchassistype = "(13)All in One"
     Case "14" : strchassistype = "(14)Sub Notebook"
     Case "15" : strchassistype = "(15)Space-Saving"
     Case "16" : strchassistype = "(16)Lunch Box"
     Case "17" : strchassistype = "(17)Main System Chassis"
     Case "18" : strchassistype = "(18)Expansion Chassis"
     Case "19" : strchassistype = "(19)SubChassis"
     Case "20" : strchassistype = "(20)Bus Expansion Chassis"
     Case "21" : strchassistype = "(21)Peripheral Chassis"
     Case "22" : strchassistype = "(22)Storage Chassis"
     Case "23" : strchassistype = "(23)Rack Mount Chassis"
     Case "24" : strchassistype = "(24)Sealed-Case PC"
     Case else : strchassistype = "(Undefined)"
    End Select
     
    'Find the model
     
     Set colComputerSystems = objWMIService.ExecQuery("Select * from Win32_ComputerSystem")
     For Each objComputerSystem in colComputerSystems
       strManufacturer = objComputerSystem.Manufacturer
       strModelA = objComputerSystem.Model
     Next
     
     strModel = Left(strModelA,4)  'Extract first four digits of model number
     
    Select Case strModel
     
      Case "8171":desc="S51 Desktop"
      Case "8143":desc="M51 Desktop"
      Case "6223":desc="Zpro Desktop"
      Case "9228":desc="ZPro Desktop"
      Case "8811":desc="M55 Tower"
      Case "8808":desc="M55 SFF"
      Case "6072":desc="M57 SFF"
      Case "6075":desc="M57 Tower"
      Case "6234":desc="M58p SFF"
      Case "6209":desc="M58p Tower"
      Case "2672":desc="X32 Laptop no Fingerprint sensor"
      Case "2668":desc="T43 Laptop with Fingerprint sensor"
      Case "2008":desc="T60P Laptop with Fingerprint sensor"
      Case "1707":desc="X60 Laptop with Fingerprint sensor"
      Case "7674":desc="X61 Laptop with Fingerprint sensor"
      Case "6457":desc="T61P Laptop with Fingerprint sensor"
      Case "7459":desc="X200 Laptop with Fingerprint sensor"
      Case "2055":desc="T500 Laptop with Fingerprint sensor"
      Case "2056":desc="T500 Laptop with Fingerprint sensor"
      Case "1866":desc="X41T Tablet with Fingerprint sensor"
      Case "7763":desc="X61T Tablet with Fingerprint sensor"
      Case "CF-U":desc="CF-U1 Ruggedised Portable"
      Case "HP x":desc="HP xw8600 Workstation"
      Case "HP Z":desc="HP Z800 Workstation"
      Case "VMwa":desc="VMware Virtual Platform"
     
    End Select
     
     
       Next
          Next
     
    'Get the serial number
    Set colSMBIOS = objWMIService.ExecQuery ("Select SerialNumber from Win32_SystemEnclosure")
    For Each objSMBIOS in colSMBIOS
    strSerial=objSMBIOS.SerialNumber
    'Wscript.Echo "Serial Number: " & objSMBIOS.SerialNumber
    Next
     
    'Display the result
    'msgbox "Manufacturer = " & strManufacturer & chr(13) & chr(10) &"Model = " & strModelA & chr(13) & chr(10) &"Description = "&desc& chr(13) & chr(10) & "WMI Type = "&strChassisType & chr(13)& chr(10) & "Serial Number = " & strSerial,4160,ver
    msgbox "Manufacturer = " & strManufacturer & chr(13) & chr(10) &"Model = " & strModelA & chr(13) & chr(10) & "WMI Type = "&strChassisType & chr(13)& chr(10) & "Serial Number = " & strSerial,4160,ver
     
    yesno = msgbox ("Do you want to save this information to a file",4100,ver)
     
    if yesno = 6 then 
    Set f = fso.OpenTextFile(strManufacturer&"+"&strModelA&".txt", ForWriting, True)
    f.writeline "Manufacturer = " & strManufacturer
    f.writeline "Model = " & strModelA
    ' f.writeline "Description = "&desc
    f.writeline "WMI Type = "&strChassisType
    f.writeline "Asset Tag = " & strSerial
    f.close
    msgbox "Information written to "&strManufacturer&"+"&strModelA&".txt",4160,ver
    end if
     


  • 10.  RE: ghost32.exe / ghost 11.5.1 cloning

    Posted Aug 22, 2012 10:50 AM

    thanks for the reply....

    wow that looks pretty complex... I know a little powershell..  I'll see if some guys around here know hta



  • 11.  RE: ghost32.exe / ghost 11.5.1 cloning

    Posted Aug 23, 2012 06:32 AM

    Actually, the code I provided above is actually vbscript making a WMI call. The HTA code essentially wraps vbscript in a "shell" that provides a way of displaying a GUI using the IE component of WinPE.