Error trying to restore GPT partition tables


  • See title - I receive this error when trying to deploy an image. The image is Windows 10 LTSC 2021. I have tried shrinking the C : partition by a few GB to see if that will help.
    fogerror.jpg

    Fog 1.5.9, Kernel 5.10.71

    Thoughts?

  • Moderator

    @jshaver @george1421 Well done!

    As far as the upgrade: although it seemed to finish with an error concerning updating the PHP components, the node showed the latest version in the console. Not sure what’s up with that, but it looks like the upgrade fixed this issue.

    You might want to post the error log here so we see what went wrong and if it’s worth investigating. You find the log in /root/fogproject/bin/error_logs/...

  • Moderator

    @jshaver OK good deal. That will give you the cleanest path forward. For my own knowledge I was interested to know if it deployed straight away without recapturing. It shouldn’t have worked without a recapture, but stranger things have happened.

    Well good deal. If you have any other issues post back in a new thread.


  • @george1421 I went ahead and re-captured after the FOG upgrade

  • Moderator

    @jshaver said in Error trying to restore GPT partition tables:

    Success! I was able to deploy the image to smaller drives on a Lenovo T480 (nvme) and a Lenovo M83 (sata).

    Did you need to recapture the golden image or did the upgrade correctly handle the deploy without needing to reupload? It should have required a reupload, but if it worked for you out of the box run with it.


  • @george1421

    Success! I was able to deploy the image to smaller drives on a Lenovo T480 (nvme) and a Lenovo M83 (sata).

    As far as the upgrade: although it seemed to finish with an error concerning updating the PHP components, the node showed the latest version in the console. Not sure what’s up with that, but it looks like the upgrade fixed this issue.

  • Moderator

    @jshaver said in Error trying to restore GPT partition tables:

    I will work on upgrading fog to the dev branch version.

    yep this is the second part I knew you were going to run into.

    You should have a fogproject folder you downloaded using git. On the fog server change into that directory probably /root/fogproject
    then:

    sudo su -
    cd /root/fogproject
    git pull
    git checkout dev-branch
    git pull
    cd bin
    ./installfog.sh
    

    Just run through the installer once again and it will lift the version to 1.5.9.110 or later. I don’t remember the last build number.
    Once that is done recapture your golden image then test deploying to a system with a smaller disk.


  • @george1421

    Sorry for the confusion there. I just tried to deploy the image to a similar model machine, a Lenovo T480 with a nvme drive, and received a similar error.

    fogerror2.jpg

    d1.partitions:

    label: gpt
    label-id: EE3360B8-46A8-40E3-B384-492F8ACC1848
    device: /dev/nvme0n1
    unit: sectors
    first-lba: 34
    last-lba: 1000215182
    sector-size: 512
    
    /dev/nvme0n1p1 : start=        2048, size=      204800, type=C12A7328-F81F-11D2-BA4B-00A0C93EC93B, uuid=D2484D5A-3DD9-4BBF-952D-3310C195517D, name="EFI system partition", attrs="GUID:63"
    /dev/nvme0n1p2 : start=      206848, size=       32768, type=E3C9E316-0B5C-4DB8-817D-F92DF00215AE, uuid=07C5A412-0D0C-4CC8-AB32-C146A8D5EEB5, name="Microsoft reserved partition", attrs="GUID:63"
    /dev/nvme0n1p3 : start=      239616, size=   896529037, type=EBD0A0A2-B9E5-4433-87C0-68B6B72699C7, uuid=705D6E72-00EE-45BF-BB16-C9C43BDECD48, name="Basic data partition"
    /dev/nvme0n1p4 : start=   999170048, size=     1042432, type=DE94BBA4-06D1-4D40-A16A-BFD50179D6AC, uuid=7AF5280A-8FBA-401A-95D9-1F6FF4AF556F, attrs="RequiredPartition GUID:63"
    

    d1.minimum.partitions:

    label: gpt
    label-id: EE3360B8-46A8-40E3-B384-492F8ACC1848
    device: /dev/nvme0n1
    unit: sectors
    first-lba: 34
    last-lba: 1000215182
    sector-size: 512
    
    /dev/nvme0n1p1 : start=        2048, size=      204800, type=C12A7328-F81F-11D2-BA4B-00A0C93EC93B, uuid=D2484D5A-3DD9-4BBF-952D-3310C195517D, name="EFI system partition", attrs="GUID:63"
    /dev/nvme0n1p2 : start=      206848, size=       32768, type=E3C9E316-0B5C-4DB8-817D-F92DF00215AE, uuid=07C5A412-0D0C-4CC8-AB32-C146A8D5EEB5, name="Microsoft reserved partition", attrs="GUID:63"
    /dev/nvme0n1p3 : start=      239616, size=    79380302, type=EBD0A0A2-B9E5-4433-87C0-68B6B72699C7, uuid=705D6E72-00EE-45BF-BB16-C9C43BDECD48, name="Basic data partition"
    /dev/nvme0n1p4 : start=   999170048, size=     1042432, type=DE94BBA4-06D1-4D40-A16A-BFD50179D6AC, uuid=7AF5280A-8FBA-401A-95D9-1F6FF4AF556F, attrs="RequiredPartition GUID:63"
    

    I will work on upgrading fog to the dev branch version.

  • Moderator

    @jshaver I don’t have a solid answer for you on the why just yet. But I can say you have the trifecta of issues.

    Source drive is larger than target drive
    NVMe disk structure to SATA
    I assume Windows 10 20H1 or later and FOG 1.5.9.

    The last bit will catch you once we can figure out why writing the MBR/GPT structure failes with error 4 “An error prevented saving changes”.

    One thing I need to clarify because I can read your answer to #4 a few different ways. So let me ask it again. Have you deployed this golden image to any other modes other than the same model where the image was captured from?

    I did find a thread with a similar issue: https://forums.fogproject.org/post/136759 lets follow Sebastian’s request to post the content of two files. I’m starting to think is the 500GB -> 250GB issue. We can talk about best practices here with imaging once we get this issue resolved.

    EDIT: Thinking about it we might need you to upgrade to the dev branch of FOG and then recapture the image if that darn 4th partition is causing this issue.


  • @george1421

    Thanks for the prompt reply.

    1. 512GB
    2. 256GB - the image is set to Single Disk - Resizable
    3. Yes, to the same model of the source machine.
    4. Lenovo T15 Gen1
    5. Yes, source computer is nvme based drive. Samsung mzvlb512hbjq-000l7. Target is SATA - could this be the source of the problem?

    I’m not sure which partition is the problem.

  • Moderator

    @jshaver We will need a bit more information here.

    1. What was the source disk size
    2. What is the target disk size
    3. Have you ever successfully deployed this golden image to a computer?
    4. If so was it the same model or a different model of computer?
    5. While I’m not sure if its relevant, was the source computer an nvme based drive? I see the target is a sata attached drive.

    If this was partition 4 with the issue I would recommend you upgrade to the dev branch of FOG 1.5.9 I think its 1.5.9.115 or later now. MS changed the way the recover partition was marked on the disk making it non-movable with fog 1.5.9 so if the target disk is smaller than the source disk image deploy will fail.

336
Online

9.1k
Users

15.7k
Topics

145.8k
Posts