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