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

Error trying to restore GPT partition tables. Exit returned code 4

Scheduled Pinned Locked Moved Solved
FOG Problems
5
36
8.1k
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.
  • M
    Matthieu Jacquart
    last edited by May 27, 2019, 9:37 AM

    Hi,

    I try to deploy image on computer, each time I ahve this error :

    Error trying to restore GPT partition tables
    Exit returned code 4
    

    fog.jpg

    I test on 2 different computers, 2 different images and 3 fog version (master, dev-branch and working), always same error…

    Since few weeks when I upgrade fog (git pull then ./installfog.sh), I have error message about deleting fogproject account. But I never created fogproject user, just fog user, and I each fog installer create once again this fogproject account. Could it be related ? Acces right problem between fog and foguser account ?

    Thanks for help !

    Fog 1.5.9.138
    Debian 11
    Vmware ESXi

    1 Reply Last reply Reply Quote 0
    • S
      Sebastian Roth Moderator
      last edited by Sebastian Roth May 27, 2019, 10:17 AM May 27, 2019, 4:06 PM

      @Matthieu-Jacquart The two things are not related from my point of view.

      You need to know that we changed the FTP user account from fog to fogproject in version 1.5.6 because we don’t want people to use that account as it’s a service account and messing with it causes issues. Just leave it alone!

      The error you posted the picture “Error trying to restore GPT partition tables” is most likely a partition layout problem. Please post the conetents of the text files d1.partitions, d1.minimum.partitions and d1.fixed_size_partitions.

      As well you might try a debug deploy. When you hit the error and get back to the shell just run the same command (sgdisk -gl /images/Profs-LV/d1.mbr) manually, take a picture and post here.

      Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

      Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

      M 1 Reply Last reply May 27, 2019, 5:29 PM Reply Quote 0
      • M
        Matthieu Jacquart @Sebastian Roth
        last edited by May 27, 2019, 5:29 PM

        @Sebastian-Roth Hi Seb, what I don’t understand with foguser account is that I have to delete it each time I run isntall.sh script, if not I’ve got an error message. Not a big deal but strange…

        For text files, I’ve got this for first image I tested

        d1.partitions :
        
        label: gpt
        label-id: 4C01BDD7-29D4-4B8C-99D8-987EEA909303
        device: /dev/sda
        unit: sectors
        first-lba: 34
        last-lba: 250069646
        
        /dev/sda1 : start=        2048, size=     1021952, type=DE94BBA4-06D1-4D40-A16A-BFD50179D6AC, uuid=081D3F0B-1B52-4643-8A24-684A7C1A8429, name="Basic data partition", attrs="RequiredPartition GUID:63"
        /dev/sda2 : start=     1024000, size=      204800, type=C12A7328-F81F-11D2-BA4B-00A0C93EC93B, uuid=607139A0-16C8-4261-BB87-253F40D707BD, name="EFI system partition", attrs="GUID:63"
        /dev/sda3 : start=     1228800, size=       32768, type=E3C9E316-0B5C-4DB8-817D-F92DF00215AE, uuid=485F8027-C27D-4519-AA08-3980851152A7, name="Microsoft reserved partition", attrs="GUID:63"
        /dev/sda4 : start=     1261568, size=   248807936, type=EBD0A0A2-B9E5-4433-87C0-68B6B72699C7, uuid=5BB64B2B-6646-419B-BE8A-13BB2269F0E8, name="Basic data partition"
        
        d1.minimum.partitions
        
        label: gpt
        label-id: 4C01BDD7-29D4-4B8C-99D8-987EEA909303
        device: /dev/sda
        unit: sectors
        first-lba: 34
        last-lba: 250069646
        
        /dev/sda1 : start=        2048, size=       21394, type=DE94BBA4-06D1-4D40-A16A-BFD50179D6AC, uuid=081D3F0B-1B52-4643-8A24-684A7C1A8429, name="Basic data partition", attrs="RequiredPartition GUID:63"
        /dev/sda2 : start=     1024000, size=      204800, type=C12A7328-F81F-11D2-BA4B-00A0C93EC93B, uuid=607139A0-16C8-4261-BB87-253F40D707BD, name="EFI system partition", attrs="GUID:63"
        /dev/sda3 : start=     1228800, size=       32768, type=E3C9E316-0B5C-4DB8-817D-F92DF00215AE, uuid=485F8027-C27D-4519-AA08-3980851152A7, name="Microsoft reserved partition", attrs="GUID:63"
        /dev/sda4 : start=     1261568, size=   248807936, type=EBD0A0A2-B9E5-4433-87C0-68B6B72699C7, uuid=5BB64B2B-6646-419B-BE8A-13BB2269F0E8, name="Basic data partition"
        
        d1.fixed_size_partitions
        
        :2:3:4
        

        and for the second one :

        d1.partitions
        
        label: gpt
        label-id: 24A810B8-1662-11E9-AB92-B083FE947687
        device: /dev/sda
        unit: sectors
        first-lba: 34
        last-lba: 250069646
        
        /dev/sda1 : start=        2048, size=   249860608, type=EBD0A0A2-B9E5-4433-87C0-68B6B72699C7, uuid=24A810B5-1662-11E9-AB92-B083FE947687
        /dev/sda2 : start=   249862656, size=      206848, type=C12A7328-F81F-11D2-BA4B-00A0C93EC93B, uuid=24A810B6-1662-11E9-AB92-B083FE947687
        
        d1.minimum.partitions
        
        label: gpt
        label-id: 24A810B8-1662-11E9-AB92-B083FE947687
        device: /dev/sda
        unit: sectors
        first-lba: 34
        last-lba: 250069646
        
        /dev/sda1 : start=        2048, size=   249860608, type=EBD0A0A2-B9E5-4433-87C0-68B6B72699C7, uuid=24A810B5-1662-11E9-AB92-B083FE947687
        /dev/sda2 : start=   249862656, size=      206848, type=C12A7328-F81F-11D2-BA4B-00A0C93EC93B, uuid=24A810B6-1662-11E9-AB92-B083FE947687
        
        d1.fixed_size_partitions
        :2:2
        

        Fog 1.5.9.138
        Debian 11
        Vmware ESXi

        1 Reply Last reply Reply Quote 0
        • S
          Sebastian Roth Moderator
          last edited by Sebastian Roth May 27, 2019, 2:29 PM May 27, 2019, 8:02 PM

          @Matthieu-Jacquart said in Error trying to restore GPT partition tables. Exit returned code 4:

          what I don’t understand with foguser account is that I have to delete it each time I run isntall.sh script, if not I’ve got an error message

          Can you please post the exact error message you get. I am fairly sure you don’t mean the sgdisk error in the picture, right?! Probably you get “The account “fogproject” already exists and has been used to logon and work on this machine.”

          PS: Turns out I forgot to update a database setting when we renamed the account. So you need to manually do that as well. Please go to FOG Configuration -> FOG Settings -> TFTP Server and update TFTP FTP USERNAME to fogproject.

          About the partition layouts. We changed the was FOG finds fixed partitions a little bit and I guess your layouts are now failing to be resizable with the new method. Let’s see if we can figure out why.

          For the first one:
          We have the first three partitions that I would think should be marked as fixed and not altered. The first one is the recovery partition. Second the EFI boot partition and third is the so called Microsoft Reserved Partition (MSR). Find all the type UUIDs here: https://en.wikipedia.org/wiki/GUID_Partition_Table
          Now the forth partition is the one where Windows is installed and which I would expect to be found as resizable by FOG. But this is obviously not the case as we see :2:3:4 in the d1.fixed_size_partition file which I find strange! Can you please schedule a debug capture task on your master machine, boot it up and when you get to the shell run parted -l /dev/sda, take a picture and post here.

          Now the second layout:
          This is an interesting one. Here the EFI boot partition is last. As we detect this as fixed. Moving a boot partition would cause trouble in the old MBR days and we are still a bit conservative in deciding if we alter a partition or not because we hope to not break too many things. Now with the EFI boot partition being behind the Windows partition we are simply unable to resize your Windows partition in this layout. But this is nothing new for this kind of partition layout. FOG has not changed in that case in the last years.

          It would be great to be able to handle those kind of partition layouts better but it’s a complex topic and many things can go wrong. So it would be a lot of work which we can’t do right now.

          Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

          Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

          M 1 Reply Last reply May 28, 2019, 8:42 AM Reply Quote 0
          • M
            Matthieu Jacquart @Sebastian Roth
            last edited by Matthieu Jacquart May 28, 2019, 2:58 AM May 28, 2019, 8:42 AM

            @Sebastian-Roth first for fogproject account, I’ve got this message each time I run install.sh :

             * Configuring services
            
             * Setting up fogproject user................................../var/log/lastlog: Aucun fichier ou dossier de ce type
            Already exists
            
            The account "fogproject" already exists and has been used to
            logon and work on this machine. We highly recommend you NOT
            use this account for your work as it is supposed to be a
            system account!
            
            Please remove the account "fogproject" manually before running
            the installer again. Run: userdel fogproject
            

            So I delete this user I installer run fine, until next time…
            fogproject account is created on Debian but doesn’t appear on fog web UI when I display all users (there’s just fog and root account)

            In .fogsettings file I’ve got this username

            username='fogproject'
            password='xxxxxx'
            

            I’ve just updated TFTP username name (it still was fog)

            For partition layout, for the first one with debug task I’ve got this
            IMG_20190528_104657.jpg

            I tried to deploy it removing “:4” but same error

            Fog 1.5.9.138
            Debian 11
            Vmware ESXi

            1 Reply Last reply Reply Quote 0
            • S
              Sebastian Roth Moderator
              last edited by Sebastian Roth May 28, 2019, 9:46 AM May 28, 2019, 3:45 PM

              @Matthieu-Jacquart Please run the parted -l /dev/sda command on the machine you capture the image from. The output you posted looks like you did this on a machine you are trying to deploy to. Sure this won’t give us the needed information. As well we need the full output on the screen! If there are characters missing (right or left or bottom) we might miss some important hint.

              About the installer complaining about the user every time: This is because we check lastlog to see if the account was used to login to the machine. Please run: lastlog --user fogproject --clear to get rid of the entry in the lastlog file. After that the installer should not complain anymore. I will add that to the information output of the installer soon.

              Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

              Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

              M 1 Reply Last reply May 28, 2019, 7:10 PM Reply Quote 0
              • M
                Matthieu Jacquart @Sebastian Roth
                last edited by May 28, 2019, 7:10 PM

                @Sebastian-Roth said in Error trying to restore GPT partition tables. Exit returned code 4:

                lastlog --user fogproject --clear

                ok, for machine I capture image I’ll test tomorrow.

                For lastlog command it returns an error : No such file or directory

                Fog 1.5.9.138
                Debian 11
                Vmware ESXi

                1 Reply Last reply Reply Quote 0
                • S
                  Sebastian Roth Moderator
                  last edited by May 28, 2019, 8:03 PM

                  @Matthieu-Jacquart said in Error trying to restore GPT partition tables. Exit returned code 4:

                  For lastlog command it returns an error : No such file or directory

                  I cannot imagine the command lastlog is not installed. I just verified on a fresh clean minimal Debian 9.9 install. Probably try typing the command instead of copy&paste. Because sometimes characters like the dashes -- come out differently if copy&pasted.

                  Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

                  Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

                  M 1 Reply Last reply May 29, 2019, 1:34 PM Reply Quote 0
                  • M
                    Matthieu Jacquart @Sebastian Roth
                    last edited by May 29, 2019, 1:34 PM

                    @Sebastian-Roth lastlog command is installed but doesn’t return any result for fogproject user, and same problem for fog and root account ! I just don’t understand, very strange…

                    For error deploying image, I tried to uplaod image on another computer and now I’ve got this…
                    IMG_20190529_123222.jpg

                    Debug command parted -l /dev/sda give this
                    IMG_20190529_082404.jpg

                    I don’t understand but I’m leaving office now for a big week-end until monday, I’ll chek this next week !

                    Thanks
                    Matthieu

                    Fog 1.5.9.138
                    Debian 11
                    Vmware ESXi

                    1 Reply Last reply Reply Quote 0
                    • S
                      Sebastian Roth Moderator
                      last edited by May 29, 2019, 9:11 PM

                      @Matthieu-Jacquart I am not sure we’ll get to anything here. There are too many strains of topics combined in one forum thread. This makes it very hard to follow and quite often we seem to mix up things here.

                      For the parted -l /dev/sda output it would have been interesting to see the one with the four partitions.

                      Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

                      Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

                      M 2 Replies Last reply Jun 6, 2019, 8:58 AM Reply Quote 0
                      • M
                        Matthieu Jacquart @Sebastian Roth
                        last edited by Jun 6, 2019, 8:58 AM

                        @Sebastian-Roth Ok I continue test, upgrading image to 1903 but still same problem.
                        So these are results on PC I used to update masters, Dell Optiplex 3020 with SSD 128GB. I have no problem to upload and deploy image on this model, but all others models failed with “Error trying to restore GPT partition tables. Exit returned code 4”

                        d1.partitions :
                        
                        label: gpt
                        label-id: 24A810B8-1662-11E9-AB92-B083FE947687
                        device: /dev/sda
                        unit: sectors
                        first-lba: 34
                        last-lba: 250069646
                        
                        /dev/sda1 : start=        2048, size=   248742296, type=EBD0A0A2-B9E5-4433-87C0-68B6B72699C7, uuid=24A810B5-1662-11E9-AB92-B083FE947687
                        /dev/sda2 : start=   248745984, size=     1116160, type=DE94BBA4-06D1-4D40-A16A-BFD50179D6AC, uuid=5F6E777F-5719-4379-A14B-0397E0C234B2, attrs="RequiredPartition GUID:63"
                        /dev/sda3 : start=   249862656, size=      206848, type=C12A7328-F81F-11D2-BA4B-00A0C93EC93B, uuid=24A810B6-1662-11E9-AB92-B083FE947687
                        
                        d1.minimum.partitions :
                        
                        label: gpt
                        label-id: 24A810B8-1662-11E9-AB92-B083FE947687
                        device: /dev/sda
                        unit: sectors
                        first-lba: 34
                        last-lba: 250069646
                        
                        /dev/sda1 : start=        2048, size=    55035482, type=EBD0A0A2-B9E5-4433-87C0-68B6B72699C7, uuid=24A810B5-1662-11E9-AB92-B083FE947687
                        /dev/sda2 : start=   248745984, size=     1116160, type=DE94BBA4-06D1-4D40-A16A-BFD50179D6AC, uuid=5F6E777F-5719-4379-A14B-0397E0C234B2, name="attrs=\x22RequiredPartition GUID:63"
                        /dev/sda3 : start=   249862656, size=      206848, type=C12A7328-F81F-11D2-BA4B-00A0C93EC93B, uuid=24A810B6-1662-11E9-AB92-B083FE947687
                        
                        d1.fixed_size_partitions :
                        
                        :3:2:2:3
                        

                        And for parted -l /dev/sda command :

                        fog.jpg

                        Thanks
                        Matthieu

                        Fog 1.5.9.138
                        Debian 11
                        Vmware ESXi

                        Q 1 Reply Last reply Jun 6, 2019, 9:55 AM Reply Quote 0
                        • Q
                          Quazz Moderator @Matthieu Jacquart
                          last edited by Jun 6, 2019, 9:55 AM

                          @Matthieu-Jacquart Pretty weird layout, that’s not going to be pretty on devices with larger or smaller disks.

                          M 1 Reply Last reply Jun 6, 2019, 9:57 AM Reply Quote 0
                          • M
                            Matthieu Jacquart @Quazz
                            last edited by Matthieu Jacquart Jun 6, 2019, 8:14 AM Jun 6, 2019, 9:57 AM

                            @Quazz yeah, strange layout I agree 😞
                            Any way to restore a good layout (gparted or else) ?

                            Fog 1.5.9.138
                            Debian 11
                            Vmware ESXi

                            1 Reply Last reply Reply Quote 0
                            • J
                              Joe Gill
                              last edited by Jun 6, 2019, 3:34 PM

                              @phishphan Did you read this? Looks similar to what you’re experiencing.

                              1 Reply Last reply Reply Quote 0
                              • S
                                Sebastian Roth Moderator
                                last edited by Jun 6, 2019, 9:59 PM

                                @Matthieu-Jacquart Well GParted might be able to shuffle around the partitions for you. It’s a GPT layout and hopefully a real EFI setup. Moving the boot partition (now sda3) might work without breaking the whole thing. But I highly recommend you take a sector by sector backup copy of that machine first before trying!

                                Make the smaller partitions first and then the larger data/windows partitions last.

                                Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

                                Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

                                1 Reply Last reply Reply Quote 0
                                • D
                                  drumnj
                                  last edited by drumnj Jun 6, 2019, 4:09 PM Jun 6, 2019, 10:06 PM

                                  I ran into the same issue. Upgraded to 1.5.6 and got this error when deploying my image. It was working on 1.5.5 before I updated, then recaptured a new image. If it helps…the 1.5.6 captured image doesn’t work, but the 1.5.5 captured image does. Used the same image that was captured on 1.5.6 on both versions, get this error. Using the 1.5.5 captured image on both versions, no error.

                                  fog_error_156.jpg

                                  Running:
                                  Ubuntu 18.04.2 LTS
                                  Hyper-V

                                  1 Reply Last reply Reply Quote 0
                                  • S
                                    Sebastian Roth Moderator
                                    last edited by Jun 6, 2019, 10:12 PM

                                    @drumnj Please don’t cross post those kind of partition layout issues!!! Each and every partition layout is different - peroid and therefore every one of those issues is kind of different too.

                                    Please open a new topic and post at least d1.partitions, d1.minimum.partitions and d1.fixed_size_partitions of your particular image as well as the image you just uploaded. Thanks!

                                    Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

                                    Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

                                    D 1 Reply Last reply Jun 6, 2019, 10:16 PM Reply Quote 0
                                    • D
                                      drumnj @Sebastian Roth
                                      last edited by Jun 6, 2019, 10:16 PM

                                      @Sebastian-Roth Looks like it’s the same type of error. I did my tests using the same checkpoint on my image, multiple times, so nothing changed with my partitions, just the FOG version. I’m just going to stick with 1.5.5 since it works. I’ll test again when another version comes out.

                                      1 Reply Last reply Reply Quote 0
                                      • S
                                        Sebastian Roth Moderator
                                        last edited by Jun 6, 2019, 10:23 PM

                                        @drumnj If you don’t give us your particular partition layout details we can’t fix the issue (if there is one in 1.5.6). It’s as simple as that!!

                                        Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

                                        Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

                                        1 Reply Last reply Reply Quote 0
                                        • M
                                          Matthieu Jacquart @Sebastian Roth
                                          last edited by Matthieu Jacquart Jun 27, 2019, 7:34 AM Jun 27, 2019, 1:32 PM

                                          @Sebastian-Roth Ok I have same issue on another computer with standard layout, I think it coul be related to Win10 1903 update ? If I upload image before sysprep and deploy on another configuration, it’s ok. But if I sysprep and then capture image, deploy failed
                                          fog.jpg

                                          d1.fixed_size_partitions
                                          :2:2
                                          
                                          d1.minimum.partitions
                                          label: gpt
                                          label-id: 6A1C2439-885F-11E9-BB12-1866DA164C99
                                          device: /dev/sda
                                          unit: sectors
                                          first-lba: 34
                                          last-lba: 250069646
                                          
                                          /dev/sda1 : start=        2048, size=       24940, type=DE94BBA4-06D1-4D40-A16A-BFD50179D6AC, uuid=6A1C2436-885F-11E9-BB12-1866DA164C99, name="attrs=\x22RequiredPartition GUID:63"
                                          /dev/sda2 : start=     1979904, size=      202752, type=C12A7328-F81F-11D2-BA4B-00A0C93EC93B, uuid=6A1C2437-885F-11E9-BB12-1866DA164C99, name="attrs=\x22GUID:63"
                                          /dev/sda3 : start=     2182656, size=    46627670, type=EBD0A0A2-B9E5-4433-87C0-68B6B72699C7, uuid=6A1C2438-885F-11E9-BB12-1866DA164C99
                                          
                                          d1.partitions
                                          label: gpt
                                          label-id: 6A1C2439-885F-11E9-BB12-1866DA164C99
                                          device: /dev/sda
                                          unit: sectors
                                          first-lba: 34
                                          last-lba: 250069646
                                          
                                          /dev/sda1 : start=        2048, size=     1977856, type=DE94BBA4-06D1-4D40-A16A-BFD50179D6AC, uuid=6A1C2436-885F-11E9-BB12-1866DA164C99, name="attrs=\x22RequiredPartition GUID:63"
                                          /dev/sda2 : start=     1979904, size=      202752, type=C12A7328-F81F-11D2-BA4B-00A0C93EC93B, uuid=6A1C2437-885F-11E9-BB12-1866DA164C99, name="attrs=\x22GUID:63"
                                          /dev/sda3 : start=     2182656, size=   247886848, type=EBD0A0A2-B9E5-4433-87C0-68B6B72699C7, uuid=6A1C2438-885F-11E9-BB12-1866DA164C99
                                          

                                          IMG_20190627_152742.jpg

                                          I passed this script but same result

                                          dism /online /cleanup-image /startcomponentcleanup
                                          dism /online /cleanup-image /scanhealth
                                          dism /online /cleanup-image /checkhealth
                                          dism /online /cleanup-image /restorehealth
                                          sfc /scannow
                                          chkdsk C: /f
                                          

                                          Fog 1.5.9.138
                                          Debian 11
                                          Vmware ESXi

                                          Q 1 Reply Last reply Jun 27, 2019, 1:51 PM Reply Quote 0
                                          • 1
                                          • 2
                                          • 1 / 2
                                          • First post
                                            Last post

                                          161

                                          Online

                                          12.0k

                                          Users

                                          17.3k

                                          Topics

                                          155.2k

                                          Posts
                                          Copyright © 2012-2024 FOG Project