Deployment Solution

 View Only
Expand all | Collapse all

Windows 7 + DS 6.9 SP4 + imagex

  • 1.  Windows 7 + DS 6.9 SP4 + imagex

    Posted Jun 29, 2010 08:29 AM
    I have built a Windows 7 image and everything is all ready for me to image it up to the server.  I have syspreped it so I can deploy it to other computers.  My problem is when I use imageX it doesn't get the boot partition so when it trys to boot up no mbr is found.  I don't remember having this problem when I built our original Windows 7 image, although I was using Sp3 at that point.  I remember having some problems before, like the DS can't run jobs when Windows 7 is in audit mode, but I know I was able to create a wim image because we have a working Windows 7 image being used for deployment.  I am trying to update the image but can't remember how I go it to work and this time I am detailing the documentation on how to do this.  Does anyone know how to make imageX pull the whole drive or how to make the image bootable?

    Thanks for any help


  • 2.  RE: Windows 7 + DS 6.9 SP4 + imagex
    Best Answer

    Posted Jun 29, 2010 11:04 AM
    For what it's worth, here are my instructions.  We are using 6.9 sp3 but it shouldn't matter.  These instructions are somewhat of a conglomeration between my messing around and Microsoft tech support.  Basically I'm using Altiris deployment as simply a shell to deploy my master image.  Steps 1 - 3 below are done with a USB WinPE flash drive and scripts.  It works for our organization.  No claims for others but I thought I'd post it. 


    Altiris Jobs Information

    Instructions 1-3 use a WinPE USB flash drive with WinPE 3.0.
    Instruction number 4 assumes that WinPE 2.1 is setup and in use by the DS and that the WAIK directory is installed on eXpress share (\\server\eXpress\WAIK\Tools\x86) with the following versions of files:
    bcdboot.exe - 6.1.7600 or greater
    bcdedit.exe – 6.1.7600 or greater
    bootsect.exe – 6.1.7600 or greater
    imagex.exe – 6.1.7600 or greater
    Information on WAIK can be found here: http://technet.microsoft.com/en-us/library/dd349343(WS.10).aspx
    Information on ImageX can be found here: http://technet.microsoft.com/en-us/library/dd349348(WS.10).aspx

    1. Windows 7E Base Image – ImageX Capture (pre-sysprep)
    net use y: \\server\express
    y:
    cd WAIK\Tools\x86
    imagex /capture /compress fast X: \\server\express\Images\ImageX\W7E.wim "%COMPNAME%" /verify
    imagex /capture /compress fast X: \\server\express\Images\ImageX\boot.wim "System Reserve" /verify

    2. Windows 7E Base Image – ImageX Deploy (pre-sysprep)
    @echo off
    net use y: \\server\express
    diskpart /s y:\software\hotfixes\W7_diskpart_base.txt  (see below)
    format c: /fs:ntfs /v:Reserved /q <y:\software\hotfixes\W7_disk_prep_answer.txt  (see below)
    format d: /fs:ntfs /q <y:\software\hotfixes\ W7_disk_prep_answer.txt /v:  (see below)
    y:
    cd WAIK\Tools\x86\
    imagex /apply "y:\Images\ImageX\boot.wim" 1 c:
    imagex /apply "y:\Images\ImageX\W7E.wim" 1 d:
    x:
    bcdedit /set {default} device partition=d:
    bcdedit /set {default} osdevice partition=d:
    bcdedit /set {bootmgr} device partition=d:

    3. Windows 7E Deployment Image - ImageX Capture (sysprepped)
    net use y: \\server\express
    y:
    cd WAIK\Tools\x86
    imagex /capture /compress fast X: \\server\express\Images\ImageX\1_0.wim "Windows 7 Enterprise" /verify
    imagex /capture /compress fast X: \\server\express\Images\ImageX\sr_boot.wim "System Reserve" /verify

    4. Windows 7E Deployment Image – ImageX Deploy (sysprepped)
    @echo off
    net use y: \\server\express
    x:
    diskpart /s y:\software\hotfixes\W7_diskpart_master.txt  (see below)
    format s: /fs:ntfs /v:Reserved /q <y:\software\hotfixes\W7_disk_prep_answer.txt  (see below)
    format w: /fs:ntfs /q <y:\software\hotfixes\W7_disk_prep_answer.txt /v:  (see below)
    y:
    cd WAIK\Tools\PETools\x86\
    bootsect /nt60 SYS /mbr
    cd y:\
    cd WAIK\Tools\x86\
    imagex /apply "y:\Images\Windows 7\1_0.wim" 1 w:
    bcdboot.exe w:\windows
    w:
    cd windows\system32
    Bcdedit.exe -set {bootmgr} device partition=w:
    Bcdedit.exe -set {default} device partition=w:
    Bcdedit.exe -set {default} osdevice partition=w:
    Bcdedit.exe -set {default} description "Windows 7 Enterprise"
    y:
    cd y:\
    copy "y:\temp\%ID%.inf" "W:\Windows\panther\unattend\unattend.xml" /Y

    W7_diskpart_base.txt contents:
    select volume 0
    remove letter=d noerr
    select volume 1
    remove letter=d noerr
    select volume 2
    remove letter=d noerr
    select volume 3
    remove letter=d noerr
    select volume 4
    remove letter=d noerr
    select volume 5
    remove letter=d noerr
    Select disk 0
    Clean
    Create partition primary size=100
    Select partition 1
    Assign letter=c
    Active
    Create partition primary
    Select partition 2
    Assign letter=d
    Exit

    W7_diskpart_master.txt contents:
    Select disk 0
    Clean
    Create partition primary size=100
    Select partition 1
    Assign letter=S
    Active
    Create partition primary
    Select partition 2
    Assign letter=W
    Exit

    W7_disk_prep_answer.txt contents:
    Y

    ALTIRIS Token Script (needs to be run before applying deployment image)
    REM Replace tokens in unattend.xml
    REM ReplaceTokens .\sysprep_w7\unattend.xml .\temp\%ID%.inf


  • 3.  RE: Windows 7 + DS 6.9 SP4 + imagex

    Posted Jun 29, 2010 12:46 PM
    That looks exactly like what I am looking for.  I will give it a try as soon as I can.

    Thank you!


  • 4.  RE: Windows 7 + DS 6.9 SP4 + imagex

    Posted Jun 29, 2010 01:05 PM

    Is this really necessary?  Why has Symantec not figured this out yet?



  • 5.  RE: Windows 7 + DS 6.9 SP4 + imagex

    Posted Jun 29, 2010 01:25 PM

    I guess wouldn't know if this is necessary or not since I haven't been using Altiris's WIM deployment method.  I had to part ways with Symantec's imaging process when Vista came out because there was no documentation at the time for using WIM images and we were preparing for a deployment when the OS hit RTM.  Symantec (Altiris) doesn't release supporting upgrades until after RTM so we had a problem and creating these scripts solved the problem.  So....by implementing Microsoft's tools and scripts inside of the Deployment shell, I can work no matter what.  Yes, it does look complicated but it's no different than what's going on behind the scenes with a wim deployment using Altiris except that I can control the tool versions and parameters.  Besides that our organization is looking at SCCM so if I'm told to go down that road as a budgetary measure, I will already have some things in place for the migration. 


  • 6.  RE: Windows 7 + DS 6.9 SP4 + imagex

    Posted Jun 30, 2010 08:08 AM
    Thanks a ton kubasa!  I created a script for the deploying the syspreped image section and that made my image bootable.  I had to do a little modifications to your script, since we are using an x64 image and only using WinPE x32, so used the bcdedit located in WAIK\Tools instead of in the image, but it still worked.  As for pulling both partitions into an imagex, I don't understand that since you are only pushing/using the windows OS one. 

    BigClay,
    This is necessary because by default using a job in the DS to pull the image using ImageX only pulls the first partition, which is the System Reserve partition.  I have basically just pulled the image manually instead of using a job, but you could still use the job, but you would have to modify the Additional Paramiters.  I wouldn't trust it for pushing it down though, as I have been having problems.  I did have it working at one time, since my current image has both partitions (not sure how I did this before) but now I have to do what Kubasa does. 

    Again, thanks kubasa, solved a major headache!


  • 7.  RE: Windows 7 + DS 6.9 SP4 + imagex

    Posted Jun 30, 2010 08:57 AM

    Glad I could help.  I know what you mean about capturing the System Reserve partition.  I guess I just pull it as a "comfort factor".  It basically sits in my image folder and never gets used once I push it up.  I do push it back down when I re-load my base image (or pre-sysprep system)  that I work off of but you are correct that it doesn't get used for the master image (sysprepped image).  I may clean things up on these scripts in time but for now, I'm letting things run as we are in the middle of our migration.  We've got about 1,000 systems done and abou 1,900 to go!


  • 8.  RE: Windows 7 + DS 6.9 SP4 + imagex

    Posted Jun 30, 2010 11:15 AM

    I am doing it wrong.  I was using rdeploy to capture the image and lay it down.  I guess I have to use ximage and WinPE.  Now I just have to figure out how to do that as well.


  • 9.  RE: Windows 7 + DS 6.9 SP4 + imagex

    Posted Jul 01, 2010 01:31 PM
    Just an FYI one of the lines is incorrect which has been causing me some headaches:
    copy "y:\temp\%ID%.inf" "W:\Windows\panther\unattend\unattend.xml" /Y
    should be:
    copy "y:\temp\%ID%.inf" "W:\Windows\panther\unattend.xml" /Y
    That is the one it is actually reading for me at least.
    The reason it might be working now is because it stores the one that was used to create the image in that location and pulls from it again after syspreping.


  • 10.  RE: Windows 7 + DS 6.9 SP4 + imagex

    Posted Jul 01, 2010 05:01 PM
    Hello,

    It is possible to change WinPE on USB by PXE?

    And, can this be done using DS 7.1 instead of DS 6.9?

    Thanks.


  • 11.  RE: Windows 7 + DS 6.9 SP4 + imagex

    Posted Jul 02, 2010 09:59 AM
    I haven't tried to do this through automation in a while.  I spent a pile of time on the phone with Altiris support on this issue because when we were getting ready for Windows 7, I wanted to use the latest version of bootsect but I couldn't figure out how to replace the old version so I could use Altiris's automation.  Basically Altiris told me to upgrade to 6.9 sp3 which I did and things still didn't work so I just don't bother even trying to use automation when preparing my base image (pre-sysprep image). 

    In my opinion, Altiris could really add a lot to ImageX imaging if they wanted to but that hasn't happened and I don't think it will ever happen.  In reality, I only use the top 3 scripts with my USB drive for my initial prep and after that the 4th script is handled through an Altiris script job and basically once I have everything set, I don't have to mess with it.  We only make changes to our image 1 time per year unless there is a security issue or other serious performance issue (organization policy) so it's not a big deal to have to use the USB drive once a year when preparing the base image.

    As for DS 7.1, I couldn't tell you.  I will be reviewing 7.1 in the fall.


  • 12.  RE: Windows 7 + DS 6.9 SP4 + imagex

    Posted Jul 05, 2010 07:20 PM
    Kubasa,
    Thankyou so much for posting these instructions they are really good. I was trying to deploy Windows 7 using Altiris 6.9 SP4 Rdeploy and was having heaps of issues. I have managed to Windows 7 installed (via your instructions) but I am having issues with my copy of the unattend.xml file, would you be able to post a copy of your file?

    Stewart.


  • 13.  RE: Windows 7 + DS 6.9 SP4 + imagex

    Posted Jul 06, 2010 11:38 PM

    No problem.  As I mentioned and spazzzen found out, there are some minor items to clean up.  Everything works as listed for me but like spazzzen mentioned, the unattend.xml  file is indeed in two places and doesn't need to be.  I'm not going to change it for the time being because we are in the middle out our deployment and I don't like to toy with things when they are working.  Anyway, I'm glad it helped you out.  Here is my unattend file that I posted somewhere else.  There are actually two things in here that I need to clean up but I'll wait until our deployement is complete.  Also, if you can't find these items in WAIK, let me know and I will post a screenshot of my WAIK setup.  I'm off this week so I couldn't do it until next week.  Maybe once our deployment is done or if I have time later this summer, I will put everything together into one document.

    Unattend.xml
     
    The %COMPNAME% needs to be changed to * in unattend.xml file on the image but leave %COMPNAME% in sysprep folder in eXpress.
     
    <?xml version="1.0" encoding="utf-8"?>
    <unattend xmlns="urn:schemas-microsoft-com:unattend">
        <settings pass="windowsPE">
            <component name="Microsoft-Windows-PnpCustomizationsWinPE" processorArchitecture="x86" publicKeyToken="xxxxxxxxxxxxx" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
                <DriverPaths>
                    <PathAndCredentials wcm:action="add" wcm:keyValue="1">
                        <Credentials>
                            <Domain>domain</Domain>
                            <Password>user</Password>
                            <Username>XXXXXXXX</Username>
                        </Credentials>
                        <Path>\\server\eXpress\WAIK\Out-of-Box Drivers</Path>
                    </PathAndCredentials>
                </DriverPaths>
            </component>
            <component name="Microsoft-Windows-Setup" processorArchitecture="x86" publicKeyToken=" xxxxxxxxxxxxx " language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
                <UserData>
                    <ProductKey>
                        <Key> xxxxxxxxxxxxx </Key>
                        <WillShowUI>OnError</WillShowUI>
                    </ProductKey>
                    <AcceptEula>true</AcceptEula>
                    <FullName>user</FullName>
                    <Organization>ogranization</Organization>
                </UserData>
            </component>
        </settings>
        <settings pass="specialize">
            <component name="Microsoft-Windows-Deployment" processorArchitecture="x86" publicKeyToken=" xxxxxxxxxxxxx " language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
                <RunSynchronous>
                    <RunSynchronousCommand wcm:action="add">
                        <Description>Activate Local Administrator Account</Description>
                        <Order>1</Order>
                        <Path>net user administrator /active:yes</Path>
                    </RunSynchronousCommand>
                    <RunSynchronousCommand wcm:action="add">
                        <Credentials>
                            <Domain>domain</Domain>
                            <Password>XXXXXXX</Password>
                            <Username>user</Username>
                        </Credentials>
                        <Description>Dagent</Description>
                        <Order>2</Order>
                        <Path>msiexec /i &quot;c:\windows\temp\DAgent\dagent.msi&quot; /qn TCPaddr=10.x.x.x  TCPport=402</Path>
                    </RunSynchronousCommand>
                </RunSynchronous>
            </component>
            <component name="Microsoft-Windows-Shell-Setup" processorArchitecture="x86" publicKeyToken=" xxxxxxxxxxxxx " language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
                <Display>
                    <ColorDepth>32</ColorDepth>
                    <HorizontalResolution>1024</HorizontalResolution>
                    <RefreshRate>75</RefreshRate>
                    <VerticalResolution>768</VerticalResolution>
                </Display>
                <OEMInformation>
                    <Manufacturer>organization</Manufacturer>
                    <Model>Dell Optiplex and Dell Latitudes</Model>
                    <SupportHours>7:30 AM to 4:30 PM, Monday - Friday</SupportHours>
                    <SupportURL>http://helpme.com</SupportURL>
                </OEMInformation>
                <ComputerName>%COMPNAME%</ComputerName>
                <CopyProfile>false</CopyProfile>
                <ProductKey> xxxxxxxxxxxxx </ProductKey>
                <RegisteredOrganization>oranization</RegisteredOrganization>
                <RegisteredOwner>owner</RegisteredOwner>
                <TimeZone>Central Standard Time</TimeZone>
            </component>
            <component name="Microsoft-Windows-UnattendedJoin" processorArchitecture="x86" publicKeyToken=" xxxxxxxxxxxxx " language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
                <Identification>
                    <Credentials>
                        <Domain>domain</Domain>
                        <Password>XXXXXXX</Password>
                        <Username>user</Username>
                    </Credentials>
                    <JoinDomain>domain</JoinDomain>
                </Identification>
            </component>
        </settings>
        <settings pass="oobeSystem">
            <component name="Microsoft-Windows-International-Core" processorArchitecture="x86" publicKeyToken=" xxxxxxxxxxxxx " language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
                <InputLocale>en-US</InputLocale>
                <SystemLocale>en-US</SystemLocale>
                <UILanguage>en-US</UILanguage>
                <UserLocale>en-US</UserLocale>
            </component>
            <component name="Microsoft-Windows-Shell-Setup" processorArchitecture="x86" publicKeyToken=" xxxxxxxxxxxxx " language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
                <UserAccounts>
                    <AdministratorPassword>
                        <Value> xxxxxxxxxxxxx </Value>
                        <PlainText>false</PlainText>
                    </AdministratorPassword>
                    <LocalAccounts>
                        <LocalAccount wcm:action="add">
                            <Password>
                                <Value> xxxxxxxxxxxxx</Value>
                                <PlainText>false</PlainText>
                            </Password>
                            <Description>Administrator</Description>
                            <DisplayName>Administrator</DisplayName>
                            <Group>Administrators</Group>
                            <Name>Administrator</Name>
                        </LocalAccount>
                        <LocalAccount wcm:action="add">
                            <Password>
                                <Value> xxxxxxxxxxxxx</Value>
                                <PlainText>false</PlainText>
                            </Password>
                            <Description>Driver Account</Description>
                            <DisplayName>Driver</DisplayName>
                            <Group>Administrators</Group>
                            <Name>Driver</Name>
                        </LocalAccount>
                    </LocalAccounts>
                </UserAccounts>
                <RegisteredOrganization>organization</RegisteredOrganization>
                <RegisteredOwner>owner</RegisteredOwner>
                <TimeZone>Central Standard Time</TimeZone>
                <OOBE>
                    <HideEULAPage>true</HideEULAPage>
                    <NetworkLocation>Work</NetworkLocation>
                    <ProtectYourPC>1</ProtectYourPC>
                    <SkipUserOOBE>true</SkipUserOOBE>
                    <SkipMachineOOBE>true</SkipMachineOOBE>
                </OOBE>
            </component>
        </settings>
        <settings pass="auditSystem">
            <component name="Microsoft-Windows-PnpCustomizationsNonWinPE" processorArchitecture="x86" publicKeyToken=" xxxxxxxxxxxxx " language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
                <DriverPaths>
                    <PathAndCredentials wcm:action="add" wcm:keyValue="1">
                        <Credentials>
                            <Domain>domain</Domain>
                            <Password>user</Password>
                            <Username>XXXXXXX</Username>
                        </Credentials>
                        <Path>\\server\eXpress\WAIK\Out-of-Box Drivers</Path>
                    </PathAndCredentials>
                </DriverPaths>
            </component>
        </settings>
        <cpi:offlineImage cpi:source="wim://server/eXpress/waik/operating%20systems/windows%207%20enterprise%2032/sources/install.wim#Windows 7 ENTERPRISE" xmlns:cpi="urn:schemas-microsoft-com:cpi" />
    </unattend>
     
     
     



  • 14.  RE: Windows 7 + DS 6.9 SP4 + imagex

    Posted Jul 16, 2010 11:55 AM
    Thanks for this post it has been of great help.

    I have this working through automation perfectly. We have 2000+ machines with multiple site servers (some on SAT links) so being able to deploy WIN7 hands off  is a must. This works with WINPE32 and WIN764

    With PXE redirection setup we have the Y: drive mapping to a server on the same LAN as the machine to be imaged. I put the WAIK tools in there and copied bcdedit to the same folder and ran the script as below after diskpart (note that I called the system reserved c: and the windows partition d:) 

    y:\tools\waik\tools\x86
    imagex /apply "y:\Images\windows7sys.wim" 1 c:
    imagex /apply "y:\images\windows7.wim" 1 d:

     
    bcdedit /set {default} device partition=d:
    bcdedit /set {default} osdevice partition=d:
    bcdedit /set {bootmgr} device partition=d:


    While still in automation run the following straight after the deploy job

    REM ReplaceTokens .\sysprep\unattend.xml .\temp\%ID%.inf
    copy .\temp\%ID%.inf d:\Windows\panther\unattend.xml
    exit
    (File is only 4kb so will not impact the WAN)


    I then run the following script to copy drivers to the local machine again while in automation
    REM Copy Drivers
    Hardware Model number is %#!computer@model_num%
     
    if "%#!computer@model_num%" =="0200DY" goto 780
     
    REM If we didn't find a match, just exit
    goto Exit
     
    :780
    xcopy  y:\drivers\780Win7 d:\drivers /s /i /y
     
    :Exit
     
    exit

    I then run a job to copy the NS agent across

    REM NS Files
    XCOPY Y:\tools\nsagent d:\tools /s /i /y

    Once this has run through and the machine has the info from the unattend.xml which in my case joins the machine to the domain to a specific OU to allow for NS to install the most current software and M$ patches to it.

    Drivers are installed via scripts

    The NS agent is installed with another script

    The agent then checks in on an aggressive shedule and gets all software/patches required.

    I have multiple unattend.xml files which can be called depending on where the machine is to be built to allow for regionalized builds.

    I have a copy of the unattend.xml I use if anybody requires it.

    Thanks again for the details in the post and hope my input will add to this