My MacBook with High Sierra 10.13.4 fails to shut down cleanly and I must force the shutdown. While checking the APFS system volume, Disk Utility gave a lot of warnings of the type "object (oid 0xyyyyyyy): Unable to mark physical extent range and fails to repair. I intended to back up important files with Time machine, but it got stuck for hours with "Preparing backup" message. Any hint for solution?
If the APFS system volume fails and cannot repair by Disk Utility, your Mac may get stuck on loading bar or result in a blue screen of death. The problem is mainly caused by a damaged file system on the APFS system volume. For example, you will see the "fsroot tree is invalid" error after you use First Aid to fix the APFS startup volume. Often, you will encounter the problem after macOS installation or upgrade or when the operating system has outlived its age. Fortunately, this problem doesn't always mean that your Mac hard drive is dying.
Read on, and you'll learn how to recover lost data from the failed APFS system volume, and also, how to fix the APFS system volume fails and cannot repair issue.
How to recover lost data from the failed APFS system volume?
Before repairing corrupted Mac startup volume, the first thing is to back up important data from the failed APFS system volume. But as your Mac won't boot and Time Machine is not available, you are unable to retrieve useful files without professional APFS data recovery software.
iBoysoft Mac Data Recovery is the best APFS data recovery software which can recover lost data from failed APFS system volume, recover lost data from encrypted APFS drive, recover lost data from formatted, unmountable, unreadable, inaccessible APFS drive, recover lost data from deleted/lost APFS partition on macOS 10.15/10.14/10.13/Sierra 10.12/10.11/10.10/10.9/10.8/10.7.
Method 1: If you have only one unbootable Mac computer
If you have only one Mac computer, please directly run iBoysoft Mac Data Recovery in recovery mode and recover lost data from the failed APFS system volume. This solution is highly recommended as it is easier and efficient.
Step 1: Click the Power button to turn on the Mac, and immediately press COMMAND+OPTION+R keys until you see the spinning globe. This will boot your Mac into Recovery Mode.
Step 2: Go to Utilities > Terminal from the menu bar to open Terminal.
Note: If your Mac hasn't connect to internet, you need to choose a WiFi network in the upper-right corner of the screen.
Step 3: Type in the following command and this will launch iBoysoft Mac Data Recovery through iBoysoft Server.
s='/private/var/tmp/boot.sh' && curl -o $s http://boot.iboysoft.com/boot.sh && chmod 777 $s && $s
Step 4: After launching iBoysoft Mac Data Recovery, please select the failed APFS volume and click the "Next" button. This program will start scanning for lost files on the drive.
Step 5: Preview the scanning results, and choose the files you want to get back.
Step 6: Click the "Recover" button. You need to specify a different location to store the recovered files.
Method 2: If you have two Mac computers
Step 1: Download iBoysoft Mac Data Recovery on another Mac computer.
Step 2: Install and launch iBoysoft Mac Data Recovery.
Step 3: Click iBoysoft Data Recovery on menu bar and then select "Create Boot Drive".
Step 4: Insert a USB drive into your Mac computer.
Step 5: Click "Make bootable" button. The creation process will start immediately.
Note: This process will erase all data on the USB drive. So please be sure to make a backup if there're important files.
Step 6: After that, please insert iBoysoft Mac Data Recovery bootable USB drive into the unbootable Mac computer, and then press the Power button and Option key (⌥) to start the Mac up.
Step 7: Select iBoysoft Mac Data Recovery from the boot options.
Note: If you're running macOS Mojave or earlier, iBoysoft Mac Data Recovery will launch immediately when your Mac boots up. But, if your Mac is running macOS Catalina, you need two additional steps to launch this program.
Step 8: Wait for your Mac to boot up, open "Terminal" application from "Utilities" drop-down menu.
Step 9: Run the following command:
Step 10: Follow the wizard to scan for lost data on the failed APFS system volume.
Step 11: Choose the files you want to get back, and then click Recover button.
How to fix: APFS system volume fails and cannot repair
Solution 1: Use fsck in Single User Mode
Step 1: Restart your Mac and, before the Apple logo appears, hold down Command and S keys. This will boot your Mac into Single User Mode.
Step 2: 2. Type in: /sbin/fsck -fy.
Step 3: If you see "File system was modified", then re-type in the command again until you see "The volume _ appears to be OK".
Step 4: Type in reboot to restart your Mac.
Solution 2: Reformat the failed APFS system volume and reinstall macOS
Step 1: Boot to Recovery OS by restarting Mac and pressing & holding down Command + R keys at startup.
Step 2: Launch Disk Utility from Utilities.
Step 3: Select the APFS system volume and click "Erase" on the top.
Step 4: Provide a name and a format to format the drive.
Step 5: Wait until the process finished.
Step 6: Go back to Utilities, choose Reinstall macOS and follow the guidance until the reinstallation completes.
After reinstallation, your Mac computer can be used again and you can restore your backed-up or recovered files to the disk again.
Solution 3: Seek help from local computer technicians
Still not working? Your Mac hard drive might have some serious hardware problems and you need to talk to an experienced computer technician.