MacOS – How am I supposed to fix a disk from single user mode

fsckmacos

I have an orphan directory on my main disk.

  1. I restart the computer in single user mode.
  2. In single user mode, the main disk / is mounted as read-only.
  3. I type /sbin/fsck -fy.
  4. fsck points the problems but does not fix them. I suppose because the disk must be unmounted or because the disk is read-only.
  5. I try to unmount the disk by using umount / or umount /dev/disk2s1, I get a Resource busy, try diskutil umount error.
  6. I try diskutil umount. I get an error telling me that diskutil cannot run from single user mode.

The main disk is APFS.

WTH is that? How am I suppose to fix the problem?

Best Answer

For Mojave and other recent os, recovery HD and disk utility are far superior for repairing the containers and volumes.

Once you try twice to repair using disk utility, I might either look at the exact output from Disk Utility or then do the additional work repairing / deleting using the fsck family of tools, but I would use terminal from recovery instead of single user mode.

Basically, you aren’t supposed to use single user mode for this anymore from what I can tell. Also consider, some errors Disk Utility will not fix. You are expected to back up your files and erase the disk at that point, reinstalling the OS and restoring from a backup.