Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

Earlier today my 2009 iMac emitted I/O errors trying to copy files. So I ran disk utility, verify disk to see if anything was amiss. It was. But as it's my startup disk I couldn't repair it, so I tried safe mode. Safe mode worked the very first time, but when I rebooted it shows the progress bar filling up, before halting. Every time I turn it on now, the same progress bar then crash happens. Booting in verbose mode reveals fsck is failing with signal 8.

Using single-user mode, as that's as far as I'm aware the only way I can get any access to the system, I've been running fsck_hfs. However, it always fails. Below is the output from fsck_hfs -d /dev/disk0s2.

** /dev/rdisk0s2
        Using cacheBlockSize=32K cacheTotalBlock=65536 cacheSize=2097152K.
** Root file system
   Executing fsck_hfs (version diskdev_cmds-491.6~3).
** Verifying volume when it is mounted with write access.
** Checking Journaled HFT Plus volume.
** Checking extents overflow file.
** Checking catalog file.
   Missing thread record (id = 9931104)
   Missing thread record (id = 16434146)
   Missing thread record (id = 19370458)
disk0s2: I/O error
hfs_swap_BTNode: offsets 10 and 11 out of order (0x0000, 0x0000)
   Invalid node structure
(4, 115897)
** The volume Macintosh HD could not be verified completely.
        volume check failed with error 7
        volume type is pure HFS+
        primary MDB is at block 0 0x00
        alternate MDB is at block 0 0x00
        primary VHB is at block 2 0x02
        alternate VHB is at block 1952491198 0x74622d5e
        sector size = 512 0x200
        VolumeObject flags = 0x07
        total sectors for volume = 1952591200 0x74622d60
        total sectors for embedded volume = 0 0x00

I absolutely need to be able to boot to use it as an external monitor.

share|improve this question
    
Which OS X version are you running? –  patrix Jul 15 '12 at 14:12
    
Sorry, should have said. It's running Snow Leopard. –  Alec Jul 15 '12 at 14:28
1  
If you still have an Install DVD you can boot from that and run Repair Disk. –  patrix Jul 15 '12 at 14:32
    
Never had an install DVD, it came pre-installed. I've been considering trying to burn one with this old laptop I dug out. I've also been considering DiskWarrior, is it likely to be able to fix it? –  Alec Jul 15 '12 at 14:35
1  
And by "launchd'ing" i mean: launchctl load /System/Library/LaunchDaemons/com.apple.kextd.plist launchctl load /System/Library/LaunchDaemons/com.apple.notifyd.plist launchctl load /System/Library/LaunchDaemons/com.apple.configd.plist launchctl load /System/Library/LaunchDaemon/com.apple.DirectoryServices.plist I then did some other stuff, don't know if it was necessary, and then shutdown -h now, and when that didn't work, exit. –  Alec Jul 15 '12 at 14:52

3 Answers 3

up vote 1 down vote accepted

About three years ago, I ran into the exact same problem you're having. The issue is with the hard drive itself--nothing software related. Take it to the nearest/best Apple repair store and have them replace your hard drive. You can then restore all of your information from your backup. You do back up your computer, don't you?

(Note: if you forgot to back up your computer recently or otherwise cannot access your old files, the repair shop will most likely be able to recover most, if not all, of your data. If the HDD is really badly damaged, however, you're best bet is to send it to DriveSavers for a cleanroom disassembly and data recovery. If you choose that option, however, be prepared to spend several hundred dollars.)

share|improve this answer
    
iFixit has DIY procedures for hard drive replacement. But you need an install DVD or USB stick, that you can borrow from a friend. –  mouviciel Jul 17 '12 at 9:35
    
You're right, it was a malfunctioning hard drive as opposed to just dodgy entries in the filesystem. I do have backups, specifically Time Machine, but I ended up just using DiskWarrior to create a "preview" of the hard drive, cloning that to an external drive, and booting from the external drive. It's temporary until I get a chance to replace the internal hard drive, but all's working smoothly at the moment. –  Alec Jul 21 '12 at 15:10

You can try to force fsck_hfs to rebuild the catalog by running

fsck_hfs -Rc -d /dev/disk0s2

or (if you want to avoid having to answer the prompts)

fsck_hfs -y -Rc -d /dev/disk0s2

Of course this will only fix logical damages and keep failing if the disk itself is damaged.

share|improve this answer
    
I actually tried it with -r (-Rc doesn't seem to work). It gave the error "invalid node structure" always, and "invalid key length" only 75% of the time. –  Alec Jul 15 '12 at 14:32
    
This doesn't bode well :-( –  patrix Jul 15 '12 at 14:37

As far as I can tell:

fsck_hfs -Rc -d /dev/disk0s2

…is not a valid command - the R should be r. So:

fsck_hfs -rc -d /dev/disk0s2

instead.

share|improve this answer
    
The man page for fsck_hfs (on 10.9 at least) says that -r is synonymous with -Rc. –  mhucka Apr 11 at 15:19

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.