Micro Focus Contributor
Micro Focus Contributor
176 views

Imaging UEFI +GPT. What is wrong?

I tried to make an universal base image with UEFI and GPT based on the documentation:

1. Install a Windows 10 (audit mode, without LAN/update, minimal sysprep settings)

2. Make the 4 images with the next commands:

img -mp <win10_boot>.zmg -I=1
img -mp <win10_ESP>.zmg -I=2
img -mp <win10_WRE>.zmg -I=3
img -mp <win10_data>.zmg -I=4

3. Boot on PXE and run script:

#!/bin/bash

echo "!!!!Delete ZISD!!!!"

zisedit -c

#Delete partitions
img -pd -all

#Windows Recovery Environment partition
img -pc 1 -type=NTFS -size=499 -A -guid=WRE

#EFI System partition
img -pc 2 -type=FAT32 -size=100 -guid=ESP

#MRP (Microsoft reserved partition)
img -pc 3 -type=1 -size=128 -guid=MRP

#Windows data partition (Microsoft Disk Partition - MBD)
img -pc 4 -type=NTFS -guid=MBD

#Set partitions to active
img -pa 1
img -pa 2
img -pa 3

#Restore partitions
img -rp win10_boot.zmg -ip $PROXYADDR -ap=a1:p1
img -rp win10_ESP.zmg -ip $PROXYADDR -ap=a1:p2
img -rp win10_WRE.zmg -ip $PROXYADDR -ap=a1:p3
img -rp win10_data.zmg -ip $PROXYADDR -ap=a1:p4

#img --fix /dev/sda

sidChange -i

exit 0

4. Reboot machine  but show 'Recovery screen'

 

The base machine and the test machine running in VMware. I tried PXE and 17.4.1 boot cd too. The partition informations are the same on the 2 machines. (checked with command 'img -pc' and 'fdisk -l').

What is wrong?

Labels (1)
0 Likes
7 Replies
Knowledge Partner
Knowledge Partner

Re: Imaging UEFI +GPT. What is wrong?

I always opt to take *one* image of the whole disk (taen at minimal size, currently set to 40GB (vs the individual partitions), and then later in the unattended phase let it expand my c: drive. 
I've also switched to winpe based imaging already, and have zero issues with partitioning or boot problems.

CU,
--
Massimo Rosen
Micro Focus Knowledge Partner
No emails please!
http://www.cfc-it.de
0 Likes
Micro Focus Expert
Micro Focus Expert

Re: Imaging UEFI +GPT. What is wrong?

Why is "sidChange -i" in your script.

It was about to post a number of steps to make sure that the "SIDChanger" does not run.

Your image should be built using SYSPREP or a Scripted Install.

Both of those will create a new random SID.

Honestly, I'm at a loss to conceive of any scenario where ZENworks should ever be changing a SID these days.  It's really more of a legacy feature of eons ago.

0 Likes
Micro Focus Expert
Micro Focus Expert

Re: Imaging UEFI +GPT. What is wrong?

But along with removing the explicit call for SIDChange....

I would also explicitly disable it in my image.

#1 - Make sure the hidden RESTOREMASK.XML gets created on the root of C: prior to imaging to block SIDChanger.

https://www.novell.com/documentation/zenworks-2017-update-4/zen_cm_preboot_imaging/data/bg4iu9s.html

#2 - Also place some registry keys on the Image to prevent it.

[HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Novell\ZCM]
"ZISWin Do Not Restore Mask"=dword:0000013c
"ZISWin Sysprep Restore Mask"=dword:0000013c

 

These cover two different times and places where the SID Change may occur.

0 Likes
Micro Focus Expert
Micro Focus Expert

Re: Imaging UEFI +GPT. What is wrong?

But along with removing the explicit call for SIDChange....

I would also explicitly disable it in my image.

#1 - Make sure the hidden RESTOREMASK.XML gets created on the root of C: prior to imaging to block SIDChanger.

https://www.novell.com/documentation/zenworks-2017-update-4/zen_cm_preboot_imaging/data/bg4iu9s.html

#2 - Also place some registry keys on the Image to prevent it.

[HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Novell\ZCM]
"ZISWin Do Not Restore Mask"=dword:0000013c
"ZISWin Sysprep Restore Mask"=dword:0000013c

 

These cover two different times and places where the SID Change may occur.

0 Likes
Micro Focus Contributor
Micro Focus Contributor

Re: Imaging UEFI +GPT. What is wrong?

So do you think the SIDchange cause the problem?
0 Likes
Micro Focus Contributor
Micro Focus Contributor

Re: Imaging UEFI +GPT. What is wrong?

Before I take one image all of the partitions. We have a working solution for automated imaging process at many of customers. First time when need uefi and I think I build it on linux base PXE.
0 Likes
Micro Focus Expert
Micro Focus Expert

Re: Imaging UEFI +GPT. What is wrong?

It may cause the issue.  I've seen Windows hang at initial boot due to the SID Changer.  That is a simple place to start.

 

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.