Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

iMac 27" (late 2011), Mountain Lion, Bootcamp, and OSX partition disappearing and refusing to mount

Hey all,


I'm putting this as a question in the discussion forms for bootcamp as I'm not sure where else to put it, but I resolved an issue I was having and having spent all of yesterday and the day before reading through this community and some others looking for answers and mostly seeing "hope you have backups, time to format!" (which to me is not always the best answer), I thought I would put it here for search purposes (with all the key words I had to use) in case anyone else has a similar issue.


My scenario was this:


2011 27" iMac with Mountain Lion installed and Windows 7 installed on a boot camp partition.


1) Haven't been in windows in a while, wanted to play some windows only steam games. Load windows 7. All is well. Have fun. Time to reboot into osx.


2) Reboot using bootcamp toolbar icon.


3) Wander away from computer. Come back to find windows 7 has loaded again. "That's weird", I think. Reboot again, this time hold down option key to select boot device.


4) Discover the only options are the Bootcamp partition and the Recovery partition. OSX "Macintosh HD" partition has disappeared. Huh.


5) Load recovery partition and load disk utility.


6) Review disk utility to discover the Macintosh HD partition shows up in the list, but won't mount. Run verify and repair tools. Errors are as follows: Invalid node structure, invalid key length, invalid record count, etc etc. Running a repair fails - disk utility advises me to back up and erase the drive and that the partition is unrepairable. No offense disk utility, but I think I'll try a few more options first.


7) Purchase DiskWarrior on advice of multiple posters in other threads and general online consensus of it being capable of fixing these sorts of errors. Go through process of loading bootable dvd.


8) Diskwarrior cannot see the Macintosh HD partition. This is bad. Review more threads. Advice is that if diskwarrior can't fix it, hope you have backups and wipe the drive. Likely to be hardware failure. I'm skeptical of hardware failure, because windows is chugging along running fine if I boot into it, and I ran a scan of the windows partition and it came back clean. SMART status is also showing the drive is ok. However, running out of options and starting to lose hope.


9) Follow advice in this support topic: http://support.apple.com/kb/ts1417?viewlocale=de_de Both safe mode and disk utility aren't options (safe mode won't work without it seeing the partition) so sounds like fsck is the final option.


10) Start up in Single User Mode (http://support.apple.com/kb/HT1492). Run fsck per instructions. It reports back ok.


11) Realize fsck is checking the recovery partition, and not my damaged OSX partition. Realize I don't know anything about unix commands and have no idea how to tell fsck to check a different partition.


12) Learn that I need to find out what the drive id is for the damaged partition. Reboot, load up disk utility, select greyed out "macintosh HD" partition, click info. Write down the id: disk0s2 (likely to be the default for you as well if you have one drive in your imac and a default bootcamp install).


13) Go back into single user mode and type the following (without quotes): "fsck_hfs -fy /dev/disk0s2"


14) (Forgot to copy down exactly what it said at this point, but gist of it was that the drive had errors and isnt repairable). Feel like ****, thinking this is unlikely to resolve itself nicely.


15) With nothing to lose, try to force fsck to rebuild the catalog - "fsck_hfs -rc -d /dev/disk0s2" I found this syntax on some forums and can't find the thread again. I have no idea what the -rc and -d do that -fy don't, but if someone can let me know, that'd be cool. Either way, this resulted in something actually happening. Tells me it is "rebuilding catalogue b-tree". Still, finishes with a bunch of errors about improperly linked files, more node errors, etc etc.


16) Retry "fsck_hfs -fy /dev/disk0s2". It seems to be doing stuff now, even though there are lots of errors. Continue to re-run fsck using this syntax. Probably ran it 10-15 times. Takes over an hour. Finally, minimal errors being reported.


17) Realize that perhaps I should try Diskwarrior again now, since I've managed to do soemthing to the partition with fsck.


18) Run Diskwarrior from bootable DVD. Success! It now sees the damaged partition. Reports that it has a bunch of damaged crtitical files, and needs to be repaired, but hey, at least it can see it.


19) Let Diskwarrior do its thing, and reboot.


20) Boot from repaired OSX partition. Rejoice. Immediately plug back in the timemachine drive you foolishly unplugged to take away over the holidays and neglected to plug back in before you had commenced work on stuff you didnt want to lose through formatting, which is why you are so desperate to recover files rather than wiping and restoring from time machine backups and avoiding this whole mess.



TL;DR - If Disk Utility and DriveWarrior fail you, try running fsck (using different syntax that apple recommends) as many times as it takes to get the partition to a stage where diskwarrior can see it. All advice I saw for similar questions was to erase, reinstall OSX, and restore from time machine backup. For those of you who are foolish like me and had files that werent time machine'd, or those who operate without, maybe try this.


Hope this helps!

iMac, OS X Mountain Lion (10.8.2), osx partition disappeared

Posted on Jan 3, 2013 9:45 AM

Reply
1 reply

Feb 8, 2013 3:59 PM in response to morgan30

What -rc & -d do.

From: The fsck_hfs manual page.

https://developer.apple.com/library/mac/#documentation/Darwin/Reference/ManPages /man8/fsck_hfs.8.html


-d Display debugging information. This option may provide useful information when fsck_hfs cannot repair a damaged file system.


-r Rebuild the catalog btree. This is synonymous with -Rc.


-R flags Rebuilds the requested btree. The following flags are supported:
a Attribute btree
c Catalog btree
e Extents overflow btree



I had the same problem as you but unfortunately "fsck_hfs -rc -d /dev/disk0s2" is failing saying: "The volume could not be verified completely." I believe it's supposed to be telling me the partition's name (normally "Macintosh HD") between 'volume' and 'could' because there's 3 spaces in between the words.


"fsck_hfs -fy /dev/disk0s2" is failing with the same error.


I tried "fsck_hfs -r -d /dev/disk0s2" since the c appears redundant with a lowercase R. and it again says it cannot be verified completely and adds "volume check failed with error 7". Which unfortunately is not documented on the fsck_hfs man page!


Unfortunately for me, Diskwarrior still can't see my busted Mac OS partition.

iMac 27" (late 2011), Mountain Lion, Bootcamp, and OSX partition disappearing and refusing to mount

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.