Error trying to restore GPT Partition tables (restorepartitionTablesAndBootLoaders)
-
@Dan_Ansel Maybe a quick solution is to deploy the image to a disk the same size or larger than the golden image disk. Once deployed delete that unmovable partition by inserting the disk into another computer as a second disk. Then recapture the image with fog minus that troubling partition. You should be able to do that in about 30 minutes and not have to rebuild anything.
-
@george1421 the partition causing all the trouble is the EFI system one
If i remove it entirely, my OS won’t boot at all, will it ? -
@Dan_Ansel Is your efi partition the last one on the disk? That is a really abnormal disk configuration. Typically the last partition is the recovery partition.
Normal is
- EFI boot
- System Reserved
- C dirve
- Recovery
In this configuration the recovery can be removed with no loss of function other than system recovery. Which in a business environment its easier to reimage with FOG than try to windows recover it.
Edit: looking at your disk map I see the efi partition is #3, very strange configuration.
-
@george1421 yeah I know, I believe it’s because the image was originally in Legacy mode, and I converted it to UEFI (using mbr2pgt), so the EFI partition was created last.
-
@Dan_Ansel I’m not sure which would be quicker.
- Recreate your image and recapture with FOG.
- Do a typical generic install of Windows OEM in UEFI mode. You really don’t care about the OS, you just need the disk structure. Just next/next/next through the windows install. Remove the recovery partition. Capture with FOG to a new image file (just in case). On that new golden computer, then deploy that single partition from your previously captured image to partition 3 on the golden image computer. You will need to change the deploy mode of your original image to single partition. So to say it the another way. Create an basic OEM install of windows. Remove the standard recovery partition. Then take partition 3 from your original golden image and overwrite the OEM partition 3. Its a bit like shuffling the playing cards around.
While its a bit off point here, this is the reason why we use MDT to create our golden images. This allows us to recreate our master golden image using the lite touch approach. We can rebuild the golden image without much pain at all since everything is all automated.
-
If I understand you correctly :
- I create a new VM with a brand new Win10 install for the disk structure.
- I remove the last partition, and it should normally be the recovery
- I capture the C Drive partition where I have installed everything I need (I capture this specific partition)
- I deploy that partition on the brand new install of Win10, writing over the empty C Drive
I’m not sure that’s exactly what you said, hence my question to confirm the steps
-
@Dan_Ansel said in Error trying to restore GPT Partition tables (restorepartitionTablesAndBootLoaders):
- I create a new VM with a brand new Win10 install for the disk structure.
- I remove the last partition, and it should normally be the recovery
- I capture the C Drive partition where I have installed everything I need (I capture this specific partition)
- I deploy that partition on the brand new install of Win10, writing over the empty C Drive
Almost exactly what I think. In step 3 I say make a back up of the new VM but you can do with snapshots the same. The idea is to save the new VM just in case something goes wrong.
- Take your previously captured golden image and only deploy partition 3 to your new VM overwriting the new Win10 install C drive with your golden image C drive.
(I realize there is a small language differences, so I should have been more clear on my idea).
In the end you should end up with
Partition 1 new Win10 partition (EFI boot)
Partition 2 new Win10 partition (System Reserved)
Partition 3 old golden image partition 3
Partition 4 (removed new Win10 partition)I’m thinking this will work as long as the old golden image partition 3 was converted to UEFI mode and the old golden image actually booted (somewhere) before even if partition 3 is the EFI boot partition.
-
Thank you for taking the time to make this a bit clearer to me.
I’m trying this right now.
I just hope the fact that the C Drive partition will not have the same number won’t be an issue (it was /dev/sda2 on the completed install, and will be /dev/sda3 on the new one if all goes well)It really feels like surgery
I’ll keep you updated on how it will go (you’ll probably here from me tomorrow)
Regards,
Dan -
There’s an issue when deploying.
First, I’ll tel you what I’ve done exactly :
-
I capture the specific partition containing the fully installed windows 10 (it was on /dev/sda2). I used the option Single Disk - Resizable, Partition 2 only
-
I installed a brand new virtual machine in UEFI from the get go to get a proper disk structure, I remove the last partition
-
I created the deploy task, and that’s when the problom occurs : since the partition captured wad /dev/sda2 , the task is trying to deploy over the /dev/sda2 of the new installation, and if I change the partition number in the web GUI for the image, I have an other error message telling me that there is not partition with that number to deploy in the image.
Is there a way to tell fog to deploy a partition that was /dev/sda2 over a new one that is /dev/sda3 ?
Regards,
Dan -
-
I did it !!
So I basically made a Frankenstein’s monster version of my image.
As I’ve stated in my last comment, I had an issue where the windows drive did not have the same partition number.
I created a new legacy windows 10 VM, with a smaller C Drive than I created the very first time I worked on that image. I converted that installation into UEFI.
So now my newly installed win10 and my oversized image have the exact same disk structure.I deployed the partition containing all my data onto the new VM, and I had an issue where the UEFI boot was broken.
I used the tools in the installation media to repair the EFI partition. I used diskpart to assign a letter to the EFI partition, exited diskpart and ran this command :
bcdboot C:\Windows fr-fr /s B: /f
Windows booted.
Now I’m capturing the image and I’ll deploy it to make sure it’s working fine
Thanks for all the help and ideas!!Regards,
Dan