Hackintosh: macOS Mojave Disk Utility First Aid Failed to Unmount Mojave Volume (APFS)

Product: Apple macOS Mojave 10.14.x
Partition type: APFS Container & Volume

Someone reminded me that macOS runs faster than Windows 10, even the latest 10.14 Mojave OS.  So I spent few days to install it into my Lenovo Thinkpad W530, and managed to get it up in 3 days.

After few more days of playing around with Clover bootloader, and "Recovery" boot menu.  I stumble on a tool in "Recovery" partition which called Disk Utility > First Aid.

First Aid acts similar to chkdsk (Check Disk) in Windows, or fsck in UNIX, which will umount the drive to perform disk repair, e.g. bad sector, lost cluster/inode, etc.

10.14 Mojave always converts the partition from earlier HFS+ to APFS (latest) file system during installation or upgrade.  The "Recovery" partition in earlier HFS+ now become one of the volume in the APFS container (every partition become a APFS volume in 1 container).  When First Aid trying to umount the volume, it further tried to unmount all the volume residing in the same APFS container.

Since the Recovery volume resides in the same APFS container as boot drive (macOS), First Aid failed to unmount the rest of the volumes in this container, and resulting in error message "failed to unmount" and not able to perform file system check.

I used following approach to create the First Air HFS+ partition manually, and managed to run First Aid from Clover bootloader:


  1. Boot into macOS 10.14
  2. Put in macOS 10.14 Mojave installation media
  3. Free up 10GB space as new partition
    1. Run Disk Utility
    2. Shrink boot drive to free up 4GB of space (tried 3GB, but failed)
    3. For the new partition that it freed up (4GB), you should create it as "Mac OS Extended (Journaled)
    4. Give the new partition any name, as it will be overwritten later
    5. Disk Utility will not allow to copy DMG into APFS volume or APFS container
    6. Click View > Show All Devices" to ensure the new partition is not APFS volume
    7. If you created it as a volume , then redo step 3.  You are doing it wrongly
    8. Both Mac OS Extended and Mac OS Extended (Journaled) work
  4. Prepare creation of "Recovery" partition - Scan DMG Image
    1. From pull down menu of Disk Utility, select Images > Scan Image for Restore...
    2. Browse to the "BaseSystem.dmg" located in "Install macOS Mojave" (macOS installation media) (in Finder, right-click and select "Show Package Contents") > Contents > SharedSupport > BaseSystem.dmg
    3. This is a 481MB file
    4. Enter password to authorize
    5. Wait for ~ 30 sec for Disk Utility to perform block checksum
  5. Create the "Recovery" partition
    1. Select the newly created "Recovery" partition on the left panel
    2. Click on "Restore" button on the top menu
    3. Select the BaseSystem.dmg by clicking on "Image..." button
    4. Click "Restore" button to begin the process
    5. For 10.14.0, 4GB partition will success, while 3GB will certainly failed with size too small error.  The DMG file size of 481MB doesn't mean the partition size is 481MB
    6. Restoring it against 4GB should take < 1 min
    7. The used space for "Recovery" is 1.27GB.  If you want to free it up, change the partition to "Mac OS Extended (Journaled)" by clicking on "Partition" button.  Its data won't be erase 
  6. After new "Recovery" partition created, you are done, and ready to go
  7. The new partition name will be "OS X Base System"
  8. You can rename it to called "Recovery" if your existing Recovery APFS volume is gone/destroyed/removed/corrupted
  9. Shutdown and boot into Clover bootloader
  10. Select "OS X Base System" partition to boot into it.  This is the new Recovery HD we created
  11. Now "First Aid" button will be able to check the macOS Mojave boot disk as it does not reside in the APFS container as boot partition anymore
  12. You can rename the partition to Recovery if you haven't done so, or keep it as separate name

Comments

Popular posts from this blog

Oracle ORA-0600 on 17090 - When login with wrong password

Windows 10: Converting MBT to GPT+EFI Partition Type

AMD Custom Resolution Setting for BenQ EX3501R Ultra Wide Monitor