• Recent
    • Unsolved
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    Error trying to restore GPT Partition tables (restorepartitionTablesAndBootLoaders)

    Scheduled Pinned Locked Moved
    FOG Problems
    3
    20
    2.7k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • D
      Dan_Ansel @Sebastian Roth
      last edited by

      @Sebastian-Roth @george1421

      Do I just need to change the start value in both files (d1.partitions and d1.minimum.partitions) for /dev/sda3, and the size value of /dev/sda2 in d1.partitions ?

      Regards,
      Dan

      george1421G 1 Reply Last reply Reply Quote 0
      • george1421G
        george1421 Moderator @Dan_Ansel
        last edited by

        @Dan_Ansel This issue is a bit complex and there is not clean solution as of now. Someone else had this issue and I suggested removing all references of that (in your case /dev/sda3) from all of the d1.xxxxxxx files (make a backup of these files first). Then when FOG goes to restore it won’t know that the partition existed.

        The issue/risk is that there is a binary file d1.mbr that also contains a reference to /dev/sda3 that needs to be removed the OP of that thread said that he was able to remove the reference but didn’t explain how. Once the reference to the non-movable partition was removed from the config files the image deployed correctly. I now don’t feel confident if giving you this solution without first having to test it in my LAB.

        The better issue is resolving it in FOG code, but that is going to take some time since developer time resources are low right now.

        Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG!

        D 1 Reply Last reply Reply Quote 0
        • D
          Dan_Ansel @george1421
          last edited by

          @george1421

          OK thanks for your anwser.
          I’ll get working on a new image then since time is of the essence here.

          I’ll keep an eye on this thread and try out ideas thrown here.
          If my problem can be used as a template on how to resolve this issue, it might help others as well.

          Regards,
          Dan

          george1421G 1 Reply Last reply Reply Quote 0
          • george1421G
            george1421 Moderator @Dan_Ansel
            last edited by

            @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.

            Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG!

            D 1 Reply Last reply Reply Quote 0
            • D
              Dan_Ansel @george1421
              last edited by

              @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 ?

              george1421G 1 Reply Last reply Reply Quote 0
              • george1421G
                george1421 Moderator @Dan_Ansel
                last edited by george1421

                @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

                1. EFI boot
                2. System Reserved
                3. C dirve
                4. 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.

                Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG!

                D 1 Reply Last reply Reply Quote 0
                • D
                  Dan_Ansel @george1421
                  last edited by

                  @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.

                  george1421G 1 Reply Last reply Reply Quote 0
                  • george1421G
                    george1421 Moderator @Dan_Ansel
                    last edited by george1421

                    @Dan_Ansel I’m not sure which would be quicker.

                    1. Recreate your image and recapture with FOG.
                    2. 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.

                    Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG!

                    D 1 Reply Last reply Reply Quote 0
                    • D
                      Dan_Ansel @george1421
                      last edited by

                      @george1421

                      If I understand you correctly :

                      1. I create a new VM with a brand new Win10 install for the disk structure.
                      2. I remove the last partition, and it should normally be the recovery
                      3. I capture the C Drive partition where I have installed everything I need (I capture this specific partition)
                      4. 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

                      george1421G 1 Reply Last reply Reply Quote 0
                      • george1421G
                        george1421 Moderator @Dan_Ansel
                        last edited by george1421

                        @Dan_Ansel said in Error trying to restore GPT Partition tables (restorepartitionTablesAndBootLoaders):

                        1. I create a new VM with a brand new Win10 install for the disk structure.
                        2. I remove the last partition, and it should normally be the recovery
                        3. I capture the C Drive partition where I have installed everything I need (I capture this specific partition)
                        4. 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.

                        1. 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.

                        Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG!

                        D 3 Replies Last reply Reply Quote 0
                        • D
                          Dan_Ansel @george1421
                          last edited by

                          @george1421

                          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

                          1 Reply Last reply Reply Quote 0
                          • D
                            Dan_Ansel @george1421
                            last edited by

                            @george1421

                            There’s an issue when deploying.

                            First, I’ll tel you what I’ve done exactly :

                            1. 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

                            2. I installed a brand new virtual machine in UEFI from the get go to get a proper disk structure, I remove the last partition

                            3. 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

                            1 Reply Last reply Reply Quote 0
                            • D
                              Dan_Ansel @george1421
                              last edited by

                              @george1421

                              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

                              1 Reply Last reply Reply Quote 1
                              • 1 / 1
                              • First post
                                Last post

                              144

                              Online

                              12.0k

                              Users

                              17.3k

                              Topics

                              155.2k

                              Posts
                              Copyright © 2012-2024 FOG Project