Deployment and Imaging Group

 View Only
Expand all | Collapse all

Distribute Disk Image job overwrites the GPT partition structure

  • 1.  Distribute Disk Image job overwrites the GPT partition structure

    Posted Jun 20, 2017 06:03 AM

    Hello,

    For years we have happily used DS6.9, re-branded to Ghost Solution.Until now we deployed a single image captured on MBR partition and deployed for pcs running in BIOS legacy mode. Windows 10 offers new security features that works only in UEFI mode. It has become a business requirement now. I started looking into it.

    To begin with, I captured 2 images in UEFI mode on reference PC. Let's name it EFI. wim and W10.wim.
    Now I trying to apply them on the test PC.
    Before I run the Distribute Disk Image job, I run the script that exactly matches the GPT partition structure on reference PC. The commands are:

    select disk 0
    clean
    convert gpt
    create partition efi size=100
    format quick fs=fat32 label="System"
    assign letter=S
    create partition msr size=128
    create partition primary
    format quick fs=ntfs label="Windows"
    assign letter=C
    exit

    Now my goal is to to apply the EFI.wim image to S: drive and the W10.wim to C: drive using my tokenized answer file, the same I do for Windows 7.
    In fact, the only token I use in my answer file is the computer name: <ComputerName>%COMPNAME%</ComputerName>

    Here is the problem. When schedule Distribute Disk Image job to apply the W10.wim, it erases my GPT structure and recreates the MBR from scratch. Of course, there is no partition left to apply the EFI. wim and PC does not boot at all.
    Am I missing something ? Any ideas ?

    Tomasz



  • 2.  RE: Distribute Disk Image job overwrites the GPT partition structure

    Posted Jun 20, 2017 07:02 AM

    To start with, I have pasted below our Diskpart script (following MS directions here):

    select disk 0
    clean
    convert gpt
    
    REM == Windows RE tools partition ===============
    create partition primary size=400
    format quick fs=ntfs label="Windows RE tools"
    assign letter="T"
    set id="de94bba4-06d1-4d40-a16a-bfd50179d6ac"
    gpt attributes=0x8000000000000001
    
    REM == System partition =========================
    create partition efi size=260
    format quick fs=fat32 label="System"
    assign letter="S"
    
    REM == Microsoft Reserved (MSR) partition =======
    create partition msr size=128
    
    REM == Windows partition ========================
    create partition primary 
    shrink minimum=10000
    format quick fs=ntfs label="Windows"
    assign letter="W"
    
    REM === Recovery image partition ================
    create partition primary
    format quick fs=ntfs label="Recovery image"
    assign letter="R"
    set id="de94bba4-06d1-4d40-a16a-bfd50179d6ac"
    gpt attributes=0x8000000000000001
    
    EXIT

    Next, I could be misunderastanding something here, but if you want to apply a WIM to EFI layout disks within a WinPE session, you do not have a C: drive. By default I think it's W:

    Hope this helps further?



  • 3.  RE: Distribute Disk Image job overwrites the GPT partition structure

    Posted Jun 20, 2017 07:17 AM

    Hi Tomasz.

     

    In the Deploy Image Task there is a option that recreates the partition before deploy the image. Did you uncheck that?

     

    Deploy Image Task > Advanced > Partition Tab

     

     

    Regards,



  • 4.  RE: Distribute Disk Image job overwrites the GPT partition structure

    Posted Jun 20, 2017 07:50 AM

    Hi Fernando,

    Thanks for the suggestion but I am struggling to find the option you mentioned. I use GSS 3.2. Here are the screenshots from the task properties.

    page 1.png

     

    page 2.png

    Thanks,

    Tomasz



  • 5.  RE: Distribute Disk Image job overwrites the GPT partition structure

    Posted Jun 20, 2017 07:52 AM

    I assign letter C: in my script, you assign W: in yours. It does not matter in fact. The question is how preserve the parition structure before applying the image ?



  • 6.  RE: Distribute Disk Image job overwrites the GPT partition structure

    Posted Jun 20, 2017 08:25 AM

    Hi Tomasz.

     

    First of all, sorry. I was wondering you are talking about teh Deploy Image Task in Altiris.

     

    In you case, you have the additional parameters in Imaging Tool Options. I think you can set a command there to the computer not recreate the partitions again. Maybe this can be the way out to your problem.

     

    Have you tried that? This can be a good shot.

    Have a look in the article bellow.

     

    http://www.symantec.com/docs/TECH130961

     

     

    Regards,



  • 7.  RE: Distribute Disk Image job overwrites the GPT partition structure

    Posted Jun 20, 2017 09:22 AM

    Hi Fernando,

    No worries. The kb article is not applicable in this scenario because it covers the Ghost switches. I use the wim images and Imagex tool. I prefer .wim to .gho files because I can service them offline, mount the image and add/remove drivers, updates, features etc. The imagex does not manage partitions.
    Here the problem is different, even if you pass your own switches the GPT partition is still destroyed and MBR created by the task.

    I am familiar with the Imagex command line options as per kb.

    https://technet.microsoft.com/en-us/library/cc749447(v=ws.10).aspx.

    Actually  I fully scripted the UEFI deployment in the script task and it seems to work.
    I'd like to use the native deployment job because of the tokenized answer file and automatic KMS key assignment.
    I used another workaround for the custom token in user files, answer file in this case,  as per very old kb.

    https://support.symantec.com/en_US/article.HOWTO2553.html.

    You see, the problem is I'd like to use a native tools rather than having to develop my custom workaround.

    Any other ideas ?

    Tomasz



  • 8.  RE: Distribute Disk Image job overwrites the GPT partition structure
    Best Answer

    Posted Jun 20, 2017 11:39 AM

    I dont think what you are trying to acheive will be possible using the "native" support for wim files in GSS because it does not support specifying the target volume like it does with Ghost.  Unfortunately the only way I see you achieving this is with a scripted deployment where you are not formatting the drive and targeting a specific volume for the operating system.  I personally have found that its easier to just recreate at least the core operating system partitions everytime so that you can ensure the system is functional and boots as expected.  If you are not willing to compromise on formatting at least the core operating system partitions on the disk... the only way I see this being possible would be with a scripted deployment (leveraging dism/imagex as a runscript instead of a distribute disk image task).  I will say that for us, it makes image deployment easy because we use the same MBR based image created on a VM to deploy to both Legacy and UEFI systems.  We accomplish this by performing a restoration of the windows partition only and the only thing that changes is the partition layout based on wether its legacy or uefi.  The logic is done in a simple batch script.  



  • 9.  RE: Distribute Disk Image job overwrites the GPT partition structure
    Best Answer

    Posted Jun 21, 2017 03:07 AM

    Hi Joel,

    Thanks for your input.

    To recap:

    • Ghost Solution Suite does not support the deployment of WIM images with Distribute Image task in UEFI mode
    • I could use Ghost engine to deploy image in UEFI mode but I will not be able to service the image offline at the same time
    • I can stick to my script leveraging the dism command. This way I can still service the images offline and being able to deploy them

    I am pretty surprised the Symantec claims they support Windows 10 deployment, but in fact it is conditional support, that is if you use their .gho images. I think it is very important message which should be better communicated to their customers. In their section "Current features under considerationhttps://www.symantec.com/connect/groups/deployment-and-imaging there is Native .WIM (DISM) support

    I hope they implement it very shortly because for me it is pretty ridiculous their flag product does not fully support the wim images deployment in UEFI mode in 2017.

    Here is my script in case someone face the same issue.

    .\WAIK\Tools\amd64\imagex /apply I:\Windows10_64\WIM\Windows10Enterprise1703CB.wim 2 S:\
    
    .\WAIK\Tools\amd64\imagex /apply I:\Windows10_64\WIM\Windows10Enterprise1703CB.wim 1 C:\
    
    REM https://support.symantec.com/en_US/article.HOWTO2553.html
    REM Copy tokenized user file
    REM ReplaceTokens .\Sysprep\Win10_64\unattend.xml .\temp\%ID%.xml
    I:\rdeploy\windows\x64\firm copy .\temp\%ID%.xml PROD:\Windows\Panther\unattend.xml
    I:\rdeploy\windows\x64\firm delete .\temp\%ID%.xml

    It is shame I have to use the tricks as old as 2007 to make it work.

    I hope it helps someone.

    Tomasz



  • 10.  RE: Distribute Disk Image job overwrites the GPT partition structure

    Posted Jul 22, 2017 01:52 PM

    You used to be able to "edit" ghost images with Ghostscript - is this no longer an option?