Like many other uses who reported the same problem, I tried to install and delete Ubuntu in my 13' mid-2014 MBP, messed up and got FFFFFFFF-FFFF-FFFF-FFFFFFFF partition, tried to follow the solutions in other topics, especially this one OS volume shows as type 'FFFFFFFF-FFFF-FFFF-FFFF-FFFFFFFFFFFF' [duplicate]
EDIT1: I had macOS Mojave and APFS.
Unfortunately was not able to fix the issue. As I'm a new user and don't have enough reputation, was not able to add comment to that topic, this why I opened this new topic.
(diskutil list result before and after I messed up with the partitions)
I then booted from an external bootable macOS installation disk, follow the instructions in above topic (diskutil list
, gpt -r show disk0
, diskutil umountDisk disk0
, gpt remove -i 2 disk0
, but when I tried gpt add -i 2 -b 409600 -s 431203056 -t 7C3457EF-0000-11AA-AA11-00306543ECAC disk0
it showed Resource busy
error).
After rebooting to the macOS installation disk and tried to do everything all over again, got the following results:
-bash-3.2# diskutil list
/dev/disk0 (internal, physical):
#: TYPE NAME SIZE IDENTIFIER
0: GUID_partition_scheme *251.0 GB disk0
1: EFI EFI 209.7 MB disk0s1
2: Microsoft Basic Data BOOTCAMP 33.8 GB disk0s3
/dev/disk1 (external, physical):
#: TYPE NAME SIZE IDENTIFIER
0: GUID_partition_scheme *16.0 GB disk1
1: EFI EFI 209.7 MB disk1s1
2: Apple_HFS Install macOS Mojave 15.7 GB disk1s2
/dev/disk2 (disk image):
#: TYPE NAME SIZE IDENTIFIER
0: GUID_partition_scheme +2.1 GB disk2
1: Apple_HFS OS X Base System 2.0 GB disk2s1
/dev/disk3 (disk image):
#: TYPE NAME SIZE IDENTIFIER
0: untitled +5.2 MB disk3
/dev/disk4 (disk image):
#: TYPE NAME SIZE IDENTIFIER
0: untitled +524.3 KB disk4
/dev/disk5 (disk image):
#: TYPE NAME SIZE IDENTIFIER
0: untitled +524.3 KB disk5
/dev/disk6 (disk image):
#: TYPE NAME SIZE IDENTIFIER
0: untitled +524.3 KB disk6
/dev/disk7 (disk image):
#: TYPE NAME SIZE IDENTIFIER
0: untitled +2.1 MB disk7
/dev/disk8 (disk image):
#: TYPE NAME SIZE IDENTIFIER
0: untitled +524.3 KB disk8
/dev/disk9 (disk image):
#: TYPE NAME SIZE IDENTIFIER
0: untitled +524.3 KB disk9
/dev/disk10 (disk image):
#: TYPE NAME SIZE IDENTIFIER
0: untitled +12.6 MB disk10
/dev/disk11 (disk image):
#: TYPE NAME SIZE IDENTIFIER
0: untitled +4.2 MB disk11
/dev/disk12 (disk image):
#: TYPE NAME SIZE IDENTIFIER
0: untitled +1.0 MB disk12
/dev/disk13 (disk image):
#: TYPE NAME SIZE IDENTIFIER
0: untitled +2.1 MB disk13
/dev/disk14 (disk image):
#: TYPE NAME SIZE IDENTIFIER
0: untitled +524.3 KB disk14
/dev/disk15 (disk image):
#: TYPE NAME SIZE IDENTIFIER
0: untitled +524.3 KB disk15
/dev/disk16 (disk image):
#: TYPE NAME SIZE IDENTIFIER
0: untitled +1.0 MB disk16
/dev/disk17 (disk image):
#: TYPE NAME SIZE IDENTIFIER
0: untitled +6.3 MB disk17
/dev/disk18 (disk image):
#: TYPE NAME SIZE IDENTIFIER
0: untitled +6.3 MB disk18
/dev/disk19 (disk image):
#: TYPE NAME SIZE IDENTIFIER
0: untitled +524.3 KB disk19
/dev/disk20 (disk image):
#: TYPE NAME SIZE IDENTIFIER
0: untitled +2.1 MB disk20
-bash-3.2# gpt -r show disk0
gpt show: disk0: Suspicious MBR at sector 0
start size index contents
0 1 MBR
1 1 Pri GPT header
2 32 Pri GPT table
34 6
40 409600 1 GPT part - C12A7328-F81F-11D2-BA4B-00A0C93EC93B
409640 380859368 2 MBR part 218
381269008 42970096
424239104 65994752 3 GPT part - EBD0A0A2-B9E5-4433-87C0-68B6B72699C7
490233856 863
490234719 32 Sec GPT table
490234751 1 Sec GPT header
-bash-3.2# diskutil umountDisk disk0
Unmount of all volumes on disk0 was successful
-bash-3.2# gpt remove -i 2 disk0
gpt remove: disk0: Suspicious MBR at sector 0
-bash-3.2# gpt add -i 2 -b 409600 -s 431203056 -t 7C3457EF-0000-11AA-AA11-00306543ECAC disk0
gpt add: unable to open device 'disk0': Resource busy
-bash-3.2# diskutil verifyDisk disk0
Started partition map verification on disk0
Checking prerequisites
Checking the partition list
Checking the partition map size
Checking for an EFI system partition
Checking the EFI system partition's size
Checking the EFI system partition's file system
Checking the EFI system partition's folder content
Checking all HFS data partition loader spaces
Checking booter partitions
Checking Core Storage Physical Volume partitions
The partition map appears to be OK
Finished partition map verification on disk0
-bash-3.2# diskutil verifyVolume disk0s2
Unable to find disk for disk0s2
-bash-3.2# dd if=/dev/disk0s2 count=3 | hexdump
-bash: hexdump: command not found
dd: /dev/disk0s2: No such file or directory
The FFFF partition is gone along with the disk0s2, don't know what to do now, please anyone help.
EDIT2: the output followed David Anderson's instruction:
-bash-3.2# gpt -r show /dev/disk0
gpt show: /dev/disk0: Suspicious MBR at sector 0
start size index contents
0 1 MBR
1 1 Pri GPT header
2 32 Pri GPT table
34 6
40 409600 1 GPT part - C12A7328-F81F-11D2-BA4B-00A0C93EC93B
409640 380859368 2 MBR part 218
381269008 42970096
424239104 65994752 3 GPT part - EBD0A0A2-B9E5-4433-87C0-68B6B72699C7
490233856 863
490234719 32 Sec GPT table
490234751 1 Sec GPT header
-bash-3.2# fdisk /dev/disk0
Disk: /dev/disk0 geometry: 30515/255/63 [490234752 sectors]
Signature: 0xAA55
Starting Ending
#: id cyl hd sec - cyl hd sec [ start - size]
------------------------------------------------------------------------
1: EE 1023 254 63 - 1023 254 63 [ 1 - 409639] <Unknown ID>
*2: DA 1023 254 63 - 1023 254 63 [ 409640 - 380859368] <Unknown ID>
3: 0C 1023 254 63 - 1023 254 63 [ 424239104 - 65994752] Win95 FAT32L
4: 00 0 0 0 - 0 0 0 [ 0 - 0] unused
-bash-3.2# fdisk -e /dev/disk0
fdisk: could not open MBR file /usr/standalone/i386/boot0: No such file or directory
Enter 'help' for information
fdisk: 1> setpid 2
Starting Ending
#: id cyl hd sec - cyl hd sec [ start - size]
------------------------------------------------------------------------
*2: DA 1023 254 63 - 1023 254 63 [ 409640 - 380859368] <Unknown ID>
Partition id ('0' to disable) [0 - FF]: [DA] (? for help) 0
fdisk:*1> quit
Writing current MBR to disk.
Device could not be accessed exclusively.
A reboot will be needed for changes to take effect. OK? [n] y
-bash-3.2# gpt -f add -i 2 -b 409640 -s 380859368 -t apfs disk0
gpt add: disk0: Suspicious MBR at sector 0
disk0s2 added
-bash-3.2# fdisk -e /dev/disk0
fdisk: could not open MBR file /usr/standalone/i386/boot0: No such file or directory
Enter 'help' for information
fdisk: 1> edit 2
Starting Ending
#: id cyl hd sec - cyl hd sec [ start - size]
------------------------------------------------------------------------
2: 00 0 0 0 - 0 0 0 [ 0 - 0] unused
Partition id ('0' to disable) [0 - FF]: [0] (? for help) DA
Do you wish to edit in CHS mode? [n] n
Partition offset [0 - 490234752]: [409640] 409640
Partition size [1 - 489825112]: [489825112] 380859368
fdisk:*1> quit
Writing current MBR to disk.
Device could not be accessed exclusively.
A reboot will be needed for changes to take effect. OK? [n] y
-bash-3.2# gpt -r show /dev/disk0
gpt show: /dev/disk0: Suspicious MBR at sector 0
start size index contents
0 1 MBR
1 1 Pri GPT header
2 32 Pri GPT table
34 6
40 409600 1 GPT part - C12A7328-F81F-11D2-BA4B-00A0C93EC93B
409640 380859368 2 GPT part - 7C3457EF-0000-11AA-AA11-00306543ECAC
381269008 42970096
424239104 65994752 3 GPT part - EBD0A0A2-B9E5-4433-87C0-68B6B72699C7
490233856 863
490234719 32 Sec GPT table
490234751 1 Sec GPT header
-bash-3.2# fdisk /dev/disk0
Disk: /dev/disk0 geometry: 30515/255/63 [490234752 sectors]
Signature: 0xAA55
Starting Ending
#: id cyl hd sec - cyl hd sec [ start - size]
------------------------------------------------------------------------
1: EE 1023 254 63 - 1023 254 63 [ 1 - 409639] <Unknown ID>
2: DA 1023 254 63 - 1023 254 63 [ 409640 - 380859368] <Unknown ID>
3: 0C 1023 254 63 - 1023 254 63 [ 424239104 - 65994752] Win95 FAT32L
4: 00 0 0 0 - 0 0 0 [ 0 - 0] unused
-bash-3.2#
EDIT3: problem solved, was able to boot into macOS, but when I deleted the free space using Disk Utility (it got attached the the main volume, worked as expected), and then did a reboot, got FFFFFFFF again, the output:
-bash-3.2# diskutil list
/dev/disk0 (internal, physical):
#: TYPE NAME SIZE IDENTIFIER
0: GUID_partition_scheme *251.0 GB disk0
1: EFI EFI 209.7 MB disk0s1
2: FFFFFFFF-FFFF-FFFF-FFFF-FFFFFFFFFFFF 217.0 GB disk0s2
3: Microsoft Basic Data BOOTCAMP 33.8 GB disk0s3
/dev/disk1 (external, physical):
#: TYPE NAME SIZE IDENTIFIER
0: GUID_partition_scheme *16.0 GB disk1
1: EFI EFI 209.7 MB disk1s1
2: Apple_HFS Install macOS Mojave 15.7 GB disk1s2
/dev/disk2 (disk image):
#: TYPE NAME SIZE IDENTIFIER
0: GUID_partition_scheme +2.1 GB disk2
1: Apple_HFS OS X Base System 2.0 GB disk2s1
/dev/disk3 (disk image):
#: TYPE NAME SIZE IDENTIFIER
0: untitled +5.2 MB disk3
/dev/disk4 (disk image):
#: TYPE NAME SIZE IDENTIFIER
0: untitled +524.3 KB disk4
/dev/disk5 (disk image):
#: TYPE NAME SIZE IDENTIFIER
0: untitled +524.3 KB disk5
/dev/disk6 (disk image):
#: TYPE NAME SIZE IDENTIFIER
0: untitled +524.3 KB disk6
/dev/disk7 (disk image):
#: TYPE NAME SIZE IDENTIFIER
0: untitled +2.1 MB disk7
/dev/disk8 (disk image):
#: TYPE NAME SIZE IDENTIFIER
0: untitled +524.3 KB disk8
/dev/disk9 (disk image):
#: TYPE NAME SIZE IDENTIFIER
0: untitled +524.3 KB disk9
/dev/disk10 (disk image):
#: TYPE NAME SIZE IDENTIFIER
0: untitled +12.6 MB disk10
/dev/disk11 (disk image):
#: TYPE NAME SIZE IDENTIFIER
0: untitled +4.2 MB disk11
/dev/disk12 (disk image):
#: TYPE NAME SIZE IDENTIFIER
0: untitled +1.0 MB disk12
/dev/disk13 (disk image):
#: TYPE NAME SIZE IDENTIFIER
0: untitled +2.1 MB disk13
/dev/disk14 (disk image):
#: TYPE NAME SIZE IDENTIFIER
0: untitled +524.3 KB disk14
/dev/disk15 (disk image):
#: TYPE NAME SIZE IDENTIFIER
0: untitled +524.3 KB disk15
/dev/disk16 (disk image):
#: TYPE NAME SIZE IDENTIFIER
0: untitled +1.0 MB disk16
/dev/disk17 (disk image):
#: TYPE NAME SIZE IDENTIFIER
0: untitled +6.3 MB disk17
/dev/disk18 (disk image):
#: TYPE NAME SIZE IDENTIFIER
0: untitled +6.3 MB disk18
/dev/disk19 (disk image):
#: TYPE NAME SIZE IDENTIFIER
0: untitled +524.3 KB disk19
/dev/disk20 (disk image):
#: TYPE NAME SIZE IDENTIFIER
0: untitled +2.1 MB disk20
-bash-3.2# gpt -r show disk0
gpt show: disk0: Suspicious MBR at sector 0
start size index contents
0 1 MBR
1 1 Pri GPT header
2 32 Pri GPT table
34 6
40 409600 1 GPT part - C12A7328-F81F-11D2-BA4B-00A0C93EC93B
409640 423829464 2 GPT part - FFFFFFFF-FFFF-FFFF-FFFF-FFFFFFFFFFFF
424239104 65994752 3 GPT part - EBD0A0A2-B9E5-4433-87C0-68B6B72699C7
490233856 863
490234719 32 Sec GPT table
490234751 1 Sec GPT header
-bash-3.2#
Best Answer
Below is the procedure to fix the partition containing Mojave.
Reboot to the macOS installation disk. I assume this is a Mojava installation USB flash drive. Next, you need to preform the following steps.
Enter the following commands in a Terminal application window.
Below is an example.
The command to reclaim the free space is given below.
An example output is shown below.
This command reclaimed the space, but created a error in the GPT. The output from
diskutil list disk0
is shown below.To once again fix this problem, enter the following commands.
Below is an example
Which is the same as before, except for the removal of partition 2 from the GPT and the size change to 423829464 sectors.