I had Linux installed on my Macbook in dual boot with MacOS.
Today, I uninstalled Linux, so I erased the partitions on which it was installed from Internet Recovery Mode. But, now, when I want to resize my Mac partition to its original size (250GB) ( now it is 200GB, Linux had 50GB in total) one of these 2 things will happen:
- If I try to resize it from inside the OS, in Disk Utility, it won't find any free space. It will show that I have 200GB available (my current partition) which is not true.
- In Recovery Mode, I am able to see the free space of 50GB but I can't add it to my current partition, nor can I format it as another partition. It would get stuck on "Preparing to partition disk".
disk0s2 is the Recovery partition. Don't ask me why it's name is FFFFFFFF-FFFF-FFFF-FFFF-FFFFFFFFFFFF.
Please, tell me that the solution is not to re-install/format everything. Thanks!
Best Answer
Your EFI is missing in the partition table - the content should be still there though - and the Recovery HD's partition has the wrong type.
To salvage this you just have to rewrite the GUID partition table:
diskutil list
and with the disk identifier of the internal disk found there:gpt -r show diskX
. Usually it's disk0 - below I assume it's disk0. Use the disk identifier you have found in your environment in the commands below!Unmount the internal disk:
Remove all partitions:
Re-add all partitions:
Verify disk and main volume and repair it if necessary:
Resize the main volume: