Wednesday, June 06, 2007

here



Swapping your MacBook's hard disk, the caveats

I still wonder how that can be possible. After I got my MacBook and installed all my usual stuff and applications, I was left with only about 10 GB of the original 60 GB hard disk space left. After putting a few pictures and movies onto it the hard disk was pretty much full. How'd I manage to survive with 10 GB of iPhotos and pretty much the same installed applications on my old iBook? Must be all those Universal Binaries... ;o)

Anyhow, so I decided to upgrade my hard disk. Found a nice 100 GB Hitachi drive online for 14,000 Yen, which just arrived in the mail here. The day before I went to all the big name electronic stores in town to get an external USB hard disk case so I could connect both drives at the same time. I was pretty shocked to find that barely any Serial ATA cases exist here. I found one, the only and last one, at Best Electronics for a nice 4,000 Yen.

So that set me back about 18,000 Yen, which is very close to the 18,690 Yen Apple is charging for an official 100 GB drive upgrade. Only that I've got an extra 60 GB external USB drive on top. So far so good. Swapping the disk was barely a problem at all. Videos of this procedure can be found all over the internet, and it's a very straightforward and simple operation. Just take out the disk, unmount it from the "sleigh" it came on, mount the new disk onto it and slide it back in. Just one word of advice: If that's the first time you opened your MacBook, it'll be hard to resist playing with these RAM levers. Just make sure to wiggle the RAM module back into place all the way before you close up your Mac again. It's probably best to leave one module in for reference. =)

Okay, so now the tricky part. If you've already installed all your stuff on the MacBook you probably don't want to do it again. So the interesting question is how to get your complete system including all your data from the old drive onto the new one? To be honest I've done it three times in total. I'll give you the rundown of the best procedure first and go into the caveats afterwards...

It doesn't really matter if you put the blank new disk into your Mac first or copy the data onto it before. The MacBook should be able to boot from both the external and the internal HDD, but your mileage may vary. We'll go with the straightforward approach to leave the old HDD in the Mac for now and copy all the data onto the new disk in the external case. So slip it right into there and connect it. Once you do that Mac OS should notice the drive is blank and offer you to initialise (i.e. partition and format) it. Important thing here: since Mac OS doesn't expect you to use this disk as a system disk, it'll partition it using an Apple Partition Map. That's not too bad and you'll still be able to use the drive to boot Mac OS, but it gets in the way of some more advanced things, such as using Boot Camp to dual boot Windows. So make sure you click on the Partition tab, choose Options and change the selection to GUID Partition Table.



Then go on and partition the drive to your heart's content, or just leave it with the default of one Mac partition. Just make sure to give it a unique and clear name to avoid confusions later on (it's not for the faint of heart to erase the drive "Macintosh HD" and then copy all data from "Macintosh HD" onto "Macintosh HD"). Once that's done the by far easiest way to get the copying done is to use SuperDuper! It's a very easy to use and straightforward tool to get a bootable copy of your system. Just connect the external drive, select your old disk as the source and the new disk as the target, use the "Backup all files" setting and off you go. The process took a little under two hours for me. Once it's finished you can reboot from the external drive to see if everything went okay. If it did, go for the swap.

For some reason my external disk is not recognised when leaving it connected during a reboot. So I had to unplug it, start the MacBook, hold down the Alt (Option) key until Apple's boot manager showed up and then plug the drive back in.

The first one or two times you boot from the new drive, Mac OS will be a lot slower then usual. That's due to the fact that SuperDuper! doesn't copy all files to the new drive but skips cache files and especially the Spotlight index, all of which need to be rebuilt in the background. So you'll also notice a lot of hard disk activity after the reboot for a while.

The other methods

I played around with this process for some time, so let me share my other observations. The first time worked perfectly and just as described above. Just when I wanted to install Windows via Boot Camp I noticed the problem with the GUID vs. Apple partitioning tables and Boot Camp refused to work. Good thing I still hadn't erased the old hard disk and was able to repartition and format the new drive again and repeat the whole process without losing any data. While doing so I decided to play around a bit...

I tried using Carbon Copy Cloner, the former tool of choice for every hard disk cloner, but alas the product wasn't updated since 2003 and doesn't work correctly anymore on the newest iterations of OS X. It aborted with some error message about a UTF8 filename after it had copied a couple of gigs already, so I aborted the process at that point.

I also booted from the Mac OS install CD, which gives you access to a terminal and the Disk Utility, both powerful tools when it comes to copying and cloning. A simple cp command on the terminal copied all the data just fine and left me with a bootable system, but hard links and aliases were messed up and the filesystem remained in an inconsistent state and couldn't be fixed (as reported by Disk Utility). So I advise against this practice.

I was thinking about toying with the dd command, but couldn't find a too reliable documentation specific to Mac OS X' disk and partition numbering scheme and knew I might have problems with the partition size afterwards anyway. If you're sure what you're doing though, the dd command might be the best option there is, as it copies the whole partition bit by bit exactly 1:1 as it were onto the new disk. No need to rebuilt indexes and caches and no nagging "maybe something important didn't make it over"-feeling.

I also tried Disk Utility's Restore function, which should be pretty much the same as dd, just with a graphical GUI. Alas, Disk Utility wants you to drag and drop the drives in good Mac fashion from the list on the left onto the appropriate fields, but for some reason drag and drop works differently (read: not really) when booted from the install disk, so I just ended up highlighting the drives instead of dragging them. Also the button that allows you to browse for the drive/file you want didn't let me select a whole drive. I rebooted into my old system to try the Restore Utility from there, and I could get the process started, but it too aborted after a couple of minutes with some random error I didn't bother to remember at that point. So I advise against this practice as well.

Bottom line: as long as you remember to partition your new drive correctly (or don't use and don't care about anything connected to the new GUID partition table), using SuperDuper! you can swap your drive and copy it over very easily and safely in less than two hours.