5

My Macbook Pro suddenly turned itself off (I believe I got a popup saying it was soon out of diskspace, but I didn't think this meant "Your OSX installation will soon be unusable"). After this, I haven't been able to boot into OSX.

Booting into single user mode and running fsck -fy bails out with the message that the "Disk full error":

** Rebuilding extended attributes B-tree.
CreateNewBTree returned -34
   Disk full error

Checking the Mac disks from Linux (I've got a dual boot), I can confirm that non of the Mac related partitions are out of diskspace:

  • the EFI partition has 180MB free (9% used)
  • the Mac Boot partition has 113MB free (82% used)
  • the main Mac harddrive has 17GB free (83% used)

Any help is much appreciated.

  • Have you tried freeing up some space? – user3439894 Oct 10 '16 at 18:31
  • 1
    Yes, I did. And I confirmed that there's plenty of space left, see the bullet list above. – skybert Oct 10 '16 at 18:36
  • I wouldn't call 17GB 'plenty of space' – Tetsujin Oct 10 '16 at 18:42
  • In this context, 17GB is plenty. We're talking about necessary disk space for a system utility (fsck) to run successfully, checking the hard drive for errors. I'm not talking about "plenty of space" in the context of editing video ;-) – skybert Oct 11 '16 at 6:37
  • 1
    At your own risk, mounting it seem to enable ignoring the error : sudo /sbin/mount -uw / be sure to only do this if you've got a backup and know what you're doing. – cregox Apr 27 '17 at 15:03
2

I had this same problem. After a few hours I did manage to solve it by sort of hacking the boot process. The problem is OSX detects some error upon boot and calls up fdsk to solve it. Then fsck returns error code 34 and the boot script halts the system. I tried and failed to disable the fsck call. But... I did succeed at cheating at the boot script and have fsck return a 0 exit code, which worked.. This is what I did:

Disable System Integrity Protection in Mac OS X. Instructions here.

Log in to Single-User mode (instructions here) and mount the file system as readwrite.

You need to replace /sbin/fsck with a script that returns exit 0. To do so try the following commands:

mv /sbin/fsck /sbin/fsck.backup
echo '#!/bin/bash' > /sbin/fsck
echo 'exit 0' >> /sbin/fsck
chmod +x /sbin/fsck

You might get some error messages about SIP being disabled but it did work for me. You then reboot.

Upon reboot, OS X will detect the 'problem' and call our fsck script, which will return a 0 exit code and you'll log in your system.

If you succeed I suggest you back up all your important data and reinstall OSX. If you don't, remember you don't have a proper /sbin/fsck anymore so any program relying on it (maybe Disk Utility?) might have an unexpected behavior.

Good luck.

|improve this answer|||||
  • 1
    Thanks for your suggestion, it sounded encouraging! However, after disabling System Integrity Protection and logging into single user mode, OSX trows a kernel panic when I want to mount it rw (it immediately reboots). – skybert Jan 10 '17 at 16:30

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .