Wow thas was easy - but, be sure to install the correct OS X
We returned home from vacation to find our iMac with a flashing ? on a grey screen. After using our macbook and apple support pages we determined the hard drive had failed.
we ordered our new hard drive and tools from ifixit.com. The website is awesome, The videos and repair guides are very thorough and easy to follow. The order arrived promptly in two days. My daughter and I layed out all the parts and tools. We watched the repair video on our macbook while repairing our iMac. The repair took about 30 min and was very smooth no surprises. The problems began when we tried to restore from the Time Machine backup. You must install the operating system that was on your system when Time Machine completed its last backup or it will not restore. It will not tell you why either.
Important NOTE! You can not restore your system from a Time Machine backup unless you have first installed to your new hard drive the exact same operating system that was in use when Time Machine last completed a successful backup. I found this out after several frustrating hours of unsuccessful restore attempts. This is what happened - After installing the new hard drive, I inserted my Snow Leopard install disk - used the disk utility to format the new drive. Then I selected restore from Time Machine Backup. After about 15 min or so it stopped copping the files and an error report appeared. I tried this same procedure three times, selecting different backups. Each time the restore failed. I packed up the iMac and Time Capsule and headed to the Apple Store. The Genius told me that I had to install Mountain Lion on the system before I could proceed with the restore since that was the operating system that was on the iMac when it was last backed up. In my case, leapord had to be installed before I could install Snow Leopard, which needed to be installed before I could access Mountain Lion from the app store. The Genius helped me out by installing all this in the store. I then was able to easily restore from my Time Machine. Success. And with the larger drive and all that free space The system seems to run a lot faster.