Friday, May 20, 2011

My own little unix server

I love my Macbook Pro I really do! I do Microsoft .NET software development and for this it’s great. Of course I couldn’t do the work without VMWare because .NET is still mostly / only working on Windows machines but that’s another story.

After using the Macbook Pro for some months I found out that OSX has a problem; every now and then the Hard disk gets corrupted. I think this might have to do with the fact that OSX originally used to be Unix; a server OS. Unix Servers are made to run continuously,no administrator turns of his servers at the end of the day, but I do turn of my Macbook!

Especially when you hibernate your Mac, now and then you will get the dreaded message saying The volume Macintosh HD was found corrupt and needs to be repaired. Now in most situations repairing will go ok and after that it’s business as usual. But once in a while this will not work and you need to restore the time machine backup you of course made, didn’t you? Because my notebook harddisk is 1TB this can take hours and hours! Did I tell you I hate waiting?!

After already resigning to the fact that every now and then it would be necessary to do a restore of my backup I stumbled upon a great little tool. The look and feel took me back a bit to the old MSDOS days (no graphics, everything character based) but who cares if it works. The tool is called AppleJack ( http://applejack.sourceforge.net ) and is OpenSource (which means free!).

After installing it you need to start up the Macbook holding the CMD-S keys. The Mac will start in single user, character based mode. Type ‘applejack’ at the prompt and a small and simple menu will show. Chose option ‘a’ for ‘autopilot’ and the whole repair cycle will start. I found that 99 out of 100 this will repair everything and withing 10 minutes it’s back to business as usual; I just love this tool!