To be simple:
When you can’t boot into MacOSX in your mac computer, just Press and hold Apple key + s on you keyboard when powering on, you will get into a text based shell, there we can do some fix without use of Mac install CD.
First, we should know which disk need to run fsck_hfs.
Hint “fsck” and press enter, you will get a error message like:
fsck can’t run on /dev/rdisk0s2
The /dev/rdisk0s2 above is what we need for the following step, if you are installing macosx as default layout, it should be /dev/rdisk0s2
Ok, let’s roll.
Type command: fsck_hfs -fy /dev/rdisk0s2 and hint enter, after a few minutes, it should stop running, end with ***disk modified***
Then you should issue “reboot” command to reboot your mac, if it still doesn’t work, try the following:
fsck_hfs -fry /dev/rdisk0s2
Apple kb link here: http://developer.apple.com/library/mac/#DOCUMENTATION/Darwin/Reference/ManPages/man8/fsck_hfs.8.html
Good luck to you guys.
Following content is off topic and in Chinese, just ignore them if you r trying to fix your mac 😉