Contribute
Register

<< Solved >> Partition map needs to be repaired. Recovery mode??

Joined
Jan 9, 2013
Messages
176
Motherboard
Gigabyte Z390 Designare
CPU
i7-9700K
Graphics
RX 580
I'm trying to made a bootable backup with CCC ahead of moving from Ventura to Sonoma. My backup isn't showing up in the picker. I tried running Disk Utility First aid, and got the error, "The partition map needs to be repaired because there's a problem with the EFI system partition's file system. : (-69766)"
I think I want to run Disk Utility First Aid from Recovery Mode, but I can't remember how and can't find it in the search. I don't see it in the picker. What is my next step?

Edit: I also tried Disk Warrior and it also asked me to enter Recovery Mode.
 
Last edited:
I'm trying to made a bootable backup with CCC ahead of moving from Ventura to Sonoma. My backup isn't showing up in the picker. I tried running Disk Utility First aid, and got the error, "The partition map needs to be repaired because there's a problem with the EFI system partition's file system. : (-69766)"
I think I want to run Disk Utility First Aid from Recovery Mode, but I can't remember how and can't find it in the search. I don't see it in the picker. What is my next step?

Edit: I also tried Disk Warrior and it also asked me to enter Recovery Mode.
boot into recovery and in terminal:
diskutil repairDisk disk0
 
According the link, above the just comes from checking the EFI partition, not the whole drive.

• The EFI partition (aka EFI Service Partition "ESP" to the PC industry) is not Apple specific. It is a garden variety FAT32 partition according to the industry rules for GPT format drives. It can be any size but Apple makes it 200MB and usually no need for it to be larger on any PC.

• If the ESP to be checked & repaired is not on the boot drive, you don't need to boot into another instance of macOS.

• You might not even need to if it's on the boot drive because the ESP is not normally mounted and not a part of the active OS.

• You do need to boot another macOS if the partition map of the boot drive is actually is broken because all filesystems need to be unmounted to fix that.

• There's distinction between checking a whole drive, or a particular partition, where various macOS-specific partitions lives inside an Apple container volume under GPT. All of these can be checked with DU, but checking a container does not imply checking the partitions within it.

• ESP is not used by Apple except as a staging area for firmware updates on actual Macs.

• Any drive ESP is seen and may be changed by Windows and Linux installers. So if you are messing around with multi-boot, the ESP is a point of contention due to hacks using it for bootloader.

• If you must boot another install, it doesn't matter if you have no "recovery" mode. You just need a bootable macOS instance at the same major version number as the drive to be fixed. Any way that you can create a macOS installer and boot it will do.

Disk Utility
diskutil (Terminal)
fsck -y (Terminal)

These all do the same thing re checking and correcting drive structures.
It might be the case that for the EFI, being an old school MSDOS format, that even the version of macOS doesn't much matter. You might even be able to check it / repair with Linux. You need to tell fsck what volume type is being checked using a commandline option.

—Note that if a partition is mounted when you give command to fix, the fix stops with a FAIL. Do not be alarmed. Disk Utility will try unmount first, but often it can't for reasons unknown to me. Unmounting it by hand works, then try again and it proceeds. Again, just because you get a cryptic FAIL message from Disk Utility doesn't mean that anything is wrong, it may mean it can't unmount the partition.

Everything else you need to know can be looked up via the Googz.

Good luck.
 
Thanks for your attention. I tried reading the thread you linked. Sanigo first says "I use usb to boot, and use diskutil to fix the partition. But the problem remains after reboot." Then "I used the following to fix the problem:
sudo fsck_msdos disk0s1". Is this step 1 and step 2? That's what I assumed, which is why I was trying to create a bootable USB. Is it really "disk0s1" or...?

Other threads suggest booting into recovery mode, but I can't figure out how to do that, if it's even possible on a hackintosh.

If you've never populated the backup drive with a macOS bootloader, it won't appear to the BIOS.
Sorry, I don't fully understand this, but I did used to have a bootable backup selectable from the picker.

If what you need is just to copy your source drives EFI over to the ESP of the backup, you are going down a needless path.
This is the first thing I tried using HackinDROM. My OS and Applications are on an M2 ssd, and the backup copy is on a partition of an HDD. I updated HackinDROM to 2.1.9, then updated OC to 0.9.7 on the SSD, mounted both ESPs and copied the EFI folder to the backup. But the backup doesn't show up in the picker as mountable. I'm trying to figure out where I went wrong and I keep making more mistakes and hitting walls. Everything is another problem.

  • The capacity of the backup ESP is supposed to be 206.5 MB, but only 142.4 MB is available, even when totally empty. When I try to update the backup using HackinDROM, it says there's not enough space, even though I've emptied the trash. And 142.4 mb should be enough anyway but somehow it's not.
  • When Disk Utility first aid, I get partition map and unable to mount errors on the "internal physical disk" and "internal physical volume", but not on the "container disk", "APFS volume group", nor "APFS data volume".
  • I tried downloading Sonoma, but I don't know where it is. The installer is not in "Applications". EDIT: SOLVED The update from System Settings was doing weird things, but I followed the link from https://support.apple.com/en-us/102662 and got a visible download in Applications.
  • I can't even follow the beginner instructions to create a bootable USB. They don't seem at all right. Is it me?
 
Last edited:
if you are messing around with multi-boot
I'm not.

If you must boot another install, it doesn't matter if you have no "recovery" mode. You just need a bootable macOS instance at the same major version number as the drive to be fixed. Any way that you can create a macOS installer and boot it will do.

Disk Utility
diskutil (Terminal)
fsck -y (Terminal)
Is this possible from the shell?
 
Everything else you need to know can be looked up via the Googz
I'm sorry to be leaning on you like a pita, but Googz is what I've been doing and it's an absolute morass of outdated contradictions and bad info.
 
I'm sorry to be leaning on you like a pita, but Googz is what I've been doing and it's an absolute morass of outdated contradictions and bad info.

The easiest alternative to Recovery is to use a bootable USB installer memory-stick.

Use the BIOS boot picker to select your USB stick to boot. F12 iirc.

When the boot menu comes up select the Installer entry. Once it has loaded - do not start the installer - use the built-in version of Disk Utility to check your main drive.

You can even use the Terminal version. - goto the Tools menu in the menu-bar to find it - if you prefer.

:)
 
Thanks for your attention. I tried reading the thread you linked. Sanigo first says "I use usb to boot, and use diskutil to fix the partition. But the problem remains after reboot." Then "I used the following to fix the problem: sudo fsck_msdos disk0s1". Is this step 1 and step 2? That's what I assumed, which is why I was trying to create a bootable USB. Is it really "disk0s1" or...?

Because you are *not* booted from the drive you want to fix, you are already effectively in recovery mode with respect to that drive. There's no system dependency upon it, so its volumes can be umounted and structure checked and fixed running from your primary drive.

Let's say you have a physical drive you've made with CCC and renamed to "BACKUP".

Find out the /dev designator BACKUP using diskutil list

For example...

Here is a sample listing of /dev/disk1, which includes a normal macOS APFS container (a virtual disk inside) at /dev/disk3

Code:
% diskutil list
/dev/disk1 (internal, physical):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *2.0 TB     disk1
   1:                        EFI EFI                     209.7 MB   disk1s1
   2:                 Apple_APFS Container disk3         2.0 TB     disk1s2
/dev/disk3 (synthesized):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      APFS Container Scheme -                      +2.0 TB     disk3
                                 Physical Store disk1s2
   1:                APFS Volume BACKUP - Data            878.9 GB   disk3s1
   2:                APFS Volume BACKUP                   9.3 GB     disk3s2
   3:                APFS Volume Preboot                 2.1 GB     disk3s3
   4:                APFS Volume Recovery                1.2 GB     disk3s4
   5:                APFS Volume VM                      1.1 MB     disk3s5

To be extra clear, there's a bit to unpack above...

As just mentioned, a macOS system drive has two "disks", one for the physical drive itself and one for the APFS system container, which includes a signed-system-volume (protected OS files) the user Data partition, plus support partitions Recovery, Preboot, and VM.

A drive designator will have 1 or 2 numbers: the first # is the drive HW unit number, e.g., disk1, and the second # is the partition unit number, e.g., s2.

You can tell these two "disks" belong to the same physical drive because of the name of the container drive disk3 is "BACKUP" and it lists Physical Store disk1s2.

So, working backwards from the name of paritions within the APFS container, we find the APFS container is located inside disk1, e.g., partition 2 of disk1.

NOTE—After you make a copy with CCC Legacy Bootable Copy Assistant, the backup drive has the same name as the source! On a running mac, the boot drive isalways disk0. If you wanted to repair disk0 you might have to boot into another macOS.

The ESP for disk1 "BACKUP" in this example is listed as type "EFI". Its designator is therefore disk1s1

NOTE 2—By convention every GPT drive has its ESP as the first partition after the partition table, e.g., 1 as reported by diskutil list.

Now that you know the ESP's designator disk1s1 you can check and repair it:

Code:
% diskutil repairVolume /dev/disk1s1

Started file system repair on disk1s1 (EFI)
Checking file system and repairing if necessary and if possible
Volume is already unmounted
Performing fsck_msdos -y /dev/rdisk1s1
** /dev/rdisk1s1
** Phase 1 - Preparing FAT
** Phase 2 - Checking Directories
** Phase 3 - Checking for Orphan Clusters
99 files, 200814 KiB free (401628 clusters)
File system check exit code is 0
Restoring the original state found as unmounted
Finished file system repair on disk1s1 (EFI)

If repairs are needed, you might need to re-run using sudo diskutil /dev/disk1s1

Other threads suggest booting into recovery mode, but I can't figure out how to do that, if it's even possible on a hackintosh.

A proper hackintosh install will include a bootable recovery volume which will be accessible from the OpenCore picker (not the BIOS picker). But this is academic for the moment.

This is the first thing I tried using HackinDROM. My OS and Applications are on an M2 ssd, and the backup copy is on a partition of an HDD. I updated HackinDROM to 2.1.9, then updated OC to 0.9.7 on the SSD, mounted both ESPs and copied the EFI folder to the backup. But the backup doesn't show up in the picker as mountable. I'm trying to figure out where I went wrong and I keep making more mistakes and hitting walls. Everything is another problem.

This all makes sense... You want to get the EFI of the source drive into the ESP of the backup.

  • The capacity of the backup ESP is supposed to be 206.5 MB, but only 142.4 MB is available, even when totally empty. When I try to update the backup using HackinDROM, it says there's not enough space, even though I've emptied the trash. And 142.4 mb should be enough anyway but somehow it's not.
  • When Disk Utility first aid, I get partition map and unable to mount errors on the "internal physical disk" and "internal physical volume", but not on the "container disk", "APFS volume group", nor "APFS data volume".
  • I tried downloading Sonoma, but I don't know where it is. The installer is not in "Applications".
  • I can't even follow simple instructions to create a bootable USB.

It seems that something is damaged about your backup drive ESP.

Try the above to repair it. If that doesn't work, the next step is to consider what caused it to get into a funky state.

For exampke, the next question would be how did you format the drive before using the CCC Legacy Bootable Copy Assistant? And what happened with the drive after it was formatted? Etc... But leave that for later after you've checked and repaired the backup ESP.
 
Back
Top