I was trying to erase dual boot Ubuntu from my drive partition of 75 GBs. I erased it using disk utility, and followed some steps online to remove the partition.
Now all I see is my primary partition has TYPE Name : FFFFFFFF-FFFF-FFFF-FFFF-FFFFFFFFFFFF
How can I fix it and add that 75GBs to my primary partition of 175 GBs. I search other similar post, but didn't understand anything over there.
Output of gpt -r show /dev/disk0
:
start size index contents
0 1 PMBR
1 1 Pri GPT header
2 32 Pri GPT header
34 6
40 3932000 1 GPT part - 4846465300-0000-11AA-AA11-00306543ECAC
3932040 262151
4194191 32 Sec GPT table
4194223 1 Sec GPT header
Output of fdisk /dev/disk0
:
Disk: /dev/disk0 geometry
Signature: 0xAA55
Starting Ending
#: id cyl hd sec - cyl hd sec [ start - size]
--------------------------------------------------------------------
1: EE 1023 254 63 - 1023 254 63 [ 1 - 4194223] <Unknown ID>
2: 00 0 0 0 - 0 0 0 [ 0 - 0] unused
3: 00 0 0 0 - 0 0 0 [ 0 - 0] unused
4: 00 0 0 0 - 0 0 0 [ 0 - 0] unused
Best Answer
Follow the steps given below.
Determine the partition offset and disk size in blocks. To do this, enter the command given below in a Terminal application window.
Below is an example output where the block size is 512 bytes. From the output, the partition offset and disk size can be determined as 409640 blocks and 195312500 blocks, respectively.
Below is an example output where the block size is 4096 bytes. From the output, the partition offset can be determined as 76806 blocks. To get the disk size in 4096 bytes blocks, the value of 390625232 512-Byte-Units needs to be divided by 8 to get 48828154 blocks.
Enter the commands below in a Terminal application window. Here, you will need to replace
<offset-in-blocks>
and<size-in-blocks>
with an actually numbers.For example, if you used the output from the first example in step 1, then you would enter the commands given below.
Enter the command given below to recover the free space.