4 Answers
4

The only thing that may work for you is this (although, I wouldn't get your hopes up):

Start your computer and hold the ⌘ + S keys to get into Single User mode.

Once you're in Single User mode, type in unmount -uw / and press enter.

Now, type in fsck -fy and press enter. It should go through several stages of checking and repairing the file system.

It will most likely give you an error stating that it cannot be
completed for some reason, but it's worth a shot.

Alternatively, if the issue is isolated to the file structure, you can try doing a reinstall of Mac OS X from the recovery partition. Doing just a reinstall should not erase any of your data.

However, you may want to try to back up your computer first. The only way that I can think of to do this on a MacBook Air 2011 is to use Thunderbolt target disk mode. This will require that you have access to another Thunderbolt equipped Mac as well as a Thunderbolt cable.

If you don't, I'd take a trip to the Genius Bar at your nearest Apple Store. They'll have the extra Mac and equipment necessary to do this. If they/you decide to do this while you wait at the Genius Bar, expect to be there for a couple hours just in case. If they/you decide to leave it with the Geniuses, there is a $99 data transfer fee that they'll most likely charge you.

Thanks. The problem with the backup is that my disk is FileVault2 encrypted. If it wasn't for that I could easily bootup linux and mount my volume. There is no utility to mount filevault under linux isn't it?
–
AlexanderFeb 25 '12 at 14:25

No, unfortunately that's the point of FileVault. Your best bet might be to try the reinstall and hope that that repairs the file structure.
–
Matt LoveFeb 26 '12 at 1:36

Symptoms

Instead of seeing the Finder or the login window after startup, your computer may stop responding and the display may only show a persistent gray screen (you may also see an Apple logo, spinning gear, spinning globe, prohibitory sign, or a folder with a flashing question mark on it).

I know this page. Most of these tips does not work for me: 1.Safe mode is like booting normally 2. I can't reinstall because the setup does not show a volume to install onto. 3. NVRAM does not do anything either 4. repair volume does not work (it says my partition table is currupt. The question now is: How do is fix the partition table?
–
AlexanderFeb 25 '12 at 13:29

If it is a corrupt partition table then you can use TestDisk, the site has information on the utility. Also you might find these instructions useful.

For the above, you need another machine to use the utility and boot your Mac into target mode then connect it to the machine which the utility is installed in. Or you can start from an external drive which has an OS installed and you can install the TestDisk onto it.

I would use another machine to backup the drive in its raw format before I start the procedure. You can do that using the dd command. This also requires another machine (dd is a *nix command). Check the manpage of dd or check one of these links for usage of dd. I am putting links because I don't know what kind of setup you will have before hand (i.e. linux, mac, *BSD, etc). You can also connect and mount an external drive on the corrupt machine and use the dd command to backup the corrupt drive to the attached external drive.