Reinstalling Mountain Lion

This post will be about reinstalling Mountain Lion on my iMac but I want to explain the background first. I am still using the iMac I bought in December 2009 when it came with Snow Leopard. In February 2012 I upgraded to Lion and wrote about it here (I upgraded again to Mountain Lion in September). Meanwhile I was thinking about replacing the machine as it was coming up for three year mark where AppleCare expires. My iMac is the one that was released in October 2009 and since then there had been two new models released at intervals of 280 days, but it was another 577 days before the most recent model was released in November 2012 (I got those numbers from the MacRumors Buyers Guide). If any of my friends had been in the market for a used iMac I may well have traded up but for me there was a downside to the new model – it has no optical drive. Although I accept that optical media is on its way out I wasn’t ready to make the break so I would also have needed to buy an external drive. Of course Apple has an interest in seeing people switch from buying plastic discs to downloading stuff from the iTunes Store so I can understand why they might want to leave out the optical drive, though to be fair a lot of people probably have made the break and would prefer not to have to pay for a built in drive that they don’t need. However, having watched the announcement it seems to me that at least part of the reason for omitting the optical drive was to allow a thinner case, or at least a case with a much thinner edge. Yes the new model does look very cool but I don’t understand the obsession with slimness in a desktop machine. My iMac has not moved for over three years since I unpacked it and the new model would not take up any less desk space. The upshot is that I decided to keep my current machine for the time being and wait to see where Apple goes with the next iteration. Having decided to keep the machine I also decided to have a fresh start and do a complete reinstall of Mountain Lion.

Since buying my first Mac in 2003 I had always maintained a policy of using a standard account as much as possible and switching to an administrator account only when required. It does make things a bit less convenient but there is a claimed security advantage and it was a habit I had previously developed when working as a Solaris systems administrator. This policy was regularly discussed on the Usenet group comp.sys.mac.system and was sometimes the cause of heated debate. People arguing against the policy did so on the basis that it is inconvenient and that if it was necessary on security grounds then surely Apple would have encouraged it? In fact Apple did recommend the practice in its security guides. For example, in chapter 2 of the Mac OS X Security Configuration Guide for Snow Leopard under “Using Setup Assistant” it says:

Setup Assistant configures the first account on the computer as an administrator account. Administrator accounts should only be used for administration. Users should use standard user accounts for day-to-day computer use.

Opponents would rightly point out that it was a fairly obscure document and that if it was really important Apple would prompt users to follow the advice from within Setup Assistant itself. As far as I can tell Apple have not updated the guide for Lion or Mountain Lion and my impression is that there have been enough Mac OS X security enhancements since Snow Leopard to make it safe enough for all but the most paranoid to use a single administrator account for everything. Anyway, that is what I decided to do, so before reinstalling I merged my two accounts into one and then copied the merged home folder to an external drive from which I could copy it back later (this was in addition to my normal Time Machine backup).

I was now ready to reinstall so I rebooted while holding down Cmd-R, which boots from the recovery partition. From there I entered Disk Utility and erased the main partition by writing a single pass of zeroes. I then quit Disc Utility and went into “Reinstall OS X”. I generally keep Wi-Fi turned off on my router and my iMac is always connected to it by an Ethernet cable so there was no problem getting an Internet connection, and authenticating with my Apple ID allowed Mountain Lion to be downloaded (because I had previously purchased it from the Mac App Store using that ID). During the installation and setup process I chose not to enable location services or set up iCloud.

So now I was up and running with a fresh install of Mountain Lion but I still had a lot to do. The first thing was to copy my home folder back off the external drive and put it in my new home folder so I could easily access the stuff on it. The first thing I needed from it was my notes which I keep in VoodooPad, so I had to download and install that. I make extensive use of some command line tools which I install using MacPorts so getting that going was the next job. MacPorts requires Xcode so I installed it from the App Store and in Xcode Preferences -> Downloads I installed Command Line Tools. I was then able to install MacPorts followed by the ports I use (mutt, gnupg, msmtp, rtmpdump etc). The installation of msmtp failed but I got it to work by following these instructions. It was then a question of taking stuff from my old home folder and putting it in place in the new one. At this point with a basic working system I decided it was time to do a Time Machine backup and again I made a fresh start by first reformatting my Time Machine drive.

Once I started using the system I noticed that I could no longer play .avi or .flv videos so I installed Perian and that did the trick. Next I installed iMovie and the iWork applications which I had previously purchased from the Mac App Store, and then a few third party applications I use – RipIt for ripping DVDs, a BitTorrent client called Transmission and an image editor called Acorn. I had previously ripped more than half my DVDs but I hadn’t done any for a while so I decided to check that RipIt was still working. I inserted a DVD and clicked on “Compress” to rip and then compress it. This can take a couple of hours so I went away and left it running. When I came back the machine was asleep and when I woke it up RipIt was displaying an error which I somehow guessed was due to unexpected sleep. It didn’t take me long to find that other people had been having the same problem since upgrading to Mountain Lion and it is due to a new power management system where applications have to make “power assertions” to keep the machine awake. It seems that RipIt has not been updated to make the required power assertion but Apple now provides a command line tool called caffeinate which you can run in Terminal to prevent sleep.

Over the next few days I installed a couple more applications and modified various preferences to get things working the way I wanted but that was basically it. I didn’t actually need to do any of this but it was an interesting exercise and I got rid of a load of cruft in the process. OS X 10.9 will probably be released sometime this summer and is likely to be even more tightly linked into iCloud and iOS. Since I have decided to forego a new iMac for now perhaps I should finally go mobile and get myself an iOS device, but which one?

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s