Danilo's Tech Blog

  • Subscribe to our RSS feed.
  • Twitter
  • StumbleUpon
  • Reddit
  • Facebook
  • Digg

Sunday, 6 January 2013

Upgrading mid-2007 24in iMac with an SSD and a 2.5in HDD in the optical bay

Posted on 18:40 by Unknown
I own a mid-2007 24in iMac with a 2.4 GHz Intel Core 2 Duo processor, 4GB of DDR2 DRAM, running Mac OS Mountain Lion, and for the past few months the computer was getting slower and slower, and when I was running Windows XP in VMWare Fusion, the machine was often swapping, bringing the iMac to a crawl. Finally I decided to upgrade my iMac by installing an SSD. Two years ago I replaced the Western Digital 500 GB hard drive (that failed on me one day by giving me the gray screen of death at boot time), with a 1 TB WD caviar green which I almost filled since then (about 750 GB used).
So I wanted the fast SSD drive but also to maintain the 1 TB of space available. The solution I adopted (found on several posts on the internet) was to replace the existing SATA HDD with an SSD, and replace the optical drive with a PATA to SATA adapter hosting a 2.5in HDD. To avoid the swapping I also replaced one of the 2 GB memory modules with a new OWC 4GB module, bringing the total available memory to 6GB.

Hardware Parts

This is the list of hardware components I ended up buying for this upgrade:

  • Crucial M4 CT064M4SSD2 2.5" 64GB SATA III MLC Internal Solid State Drive (SSD)
  • SilverStone SDP08 2 x 2.5" to 3.5" Bay Converter
  • Western Digital Scorpio Blue WDBABC0010BNC-NRSN 1 TB 2.5' Internal Hard Drive
  • MCE OptiBay Enclosure for SATA Hard Drive for iMac
  • 4.0GB PC-5300 DDR2 667MHz SO-DIMM 200 Pin Memory Upgrade Module

Hardware Installation

Here is the picture of the tools I used to perform the upgrade (grounding wrist band, 6 Pc. mini torx screwdriver set, spudgers, vacuum cups, philips screwdriver.



I followed the instructions to replace the hard drive and the optical bay from the iFixit web site.
The following picture shows the iMac internal components.



The old 1TB caviar green HDD is shown in the following picture. The idea was to replace it with the SSD mounted on the 2.5'' to 3.5'' bay converter.



This picture shows instead the Apple optical drive (superdrive).


I removed the optical drive and replaced it with the 1TB WD Blue HDD mounted on the MCE OptiBay enclosure as shown in the following picture. I also put a piece of foam in the enclosure gap (top of picture) to prevent the HDD from moving.


Then I installed the Crucial M4 SSD inside the SilverStone 2.5" to 3.5" Bay Converter in the bottom position (there is room to install two SSD or two 2.5'' HDD), in order to align the SATA and power connectors with the iMac motherboard.




The following picture shows the newly installed SSD on the top left, and the WD Blue HDD inside the OptiBay enclosure on the bottom right. Notice I attached the thermal sensor for the SSD directly on the metal frame of the bay converter, and used tape to make sure it stays in position.



All the hardware parts described above fitted perfectly in my iMac and I didn't have to do anything special to install them except for adding the piece of foam in the OptiBay enclosure to prevent the HDD from moving around.

Software Configuration

At this point my iMac had two new unformatted disk drives and my original HDD was sitting on my desk. What I had in mind was to install Mac OS on the Crucial M4 SSD, and put the users on the WD Blue HDD. In fact 64 GB are not enough to store the users directories where for example pictures and movies take a lot of disk space. To restore the system I then followed this procedure.
  • I took the original WD caviar green HDD and installed it in a Rosewill external SATA enclosure I had laying around. Then I connected the external SATA enclosure to the iMac via an USB cable.
  • I powered up the iMac holding the option button. This gave me the option to boot into Mountain Lion from the external WD Caviar Green HDD (volume name Macintosh HD).
  • I logged in and opened the Disk Utility application. Selected the Crucial M4 disk, clicked on the Erase tab and formatted the disk by selecting the Mac OS Extended (journaled) format and naming the volume Macintosh SSD.
  • In a similar way I erased the WD Blue HD disk and named the volume Macintosh HD Users. At the end of this procedure, Disk Utility showed the following on the screen:

  • Then I ran Carbon Copy Cloner and copied all directories from the external Macintosh HD except the /Users directory to the Crucial M4 on volume Macintosh SSD (it is simple to do this since Carbon Copy Cloner allows you to select individual directories to copy from the source). I ended up copying about 32 GB to the Macintosh SSD volume, which took about 1 hour. 
  • I ran Carbon Copy Cloner again but this time for source I selected the /Users directory only from the external Macintosh HD, and Macintosh HD Users for destination. To copy 693 GB Carbon Copy Cloner took about 7 hours and 47 minutes.
  • (If you don't want to use Carbon Copy Cloner, you can copy the files directly using the ditto command. For example to clone the /Users directory: 

  • # sudo ditto /Volumes/Macintosh\ HD/Users /Volumes/Macintosh\ HD\ Users/Users/
    )

  • I then opened the Terminal app, logged in as root and created a symbolic link to the new location of the /Users directory:

  • # sudo su -
    # cd /Volumes/Macintosh\ SSD
    # ln -s /Volumes/Macintosh\ HD\ Users/Users/ Users
At this point I rebooted the iMac and when it came back all my original logins with their setting were magically preserved. MacOSX now boots in 13 seconds, and opening applications is almost instantaneous. Now I still had to do some tweaks to make the new setup even better. I followed the suggestion from Martin's blog (Optimizing MacOS X Lion for SSD).
  1. I went to System Preferences, clicked on Users & Groups, clicked the lock icon to unlock the advanced editing. Once unlocked, I right-clicked on each user account and chose Advanced Options from the pop-up menu. Once in the Advanced Options dialog, I changed the Home directory of the user from /Users/user-name to the new location (/Volumes/Macintosh\ HD\ Users/Users/user-name).
  2. I installed and enabled TrimEnabler from this web site.
  3. I set the noatime flag to prevent MacOS from updating the SSD file system every time a file is accessed.
  4. I used the WD Blue HDD for temporary files.

    sudo ditto /private/tmp /Volumes/Macintosh\ HD\ Users/private/tmp
    sudo rm -rf /private/tmpsudo ln -s /Volumes/Macintosh\ HD\ Users//private/tmp /private/tmp
I rebooted the iMac another time and verified that Trim was working, the root file system was mounted with the noatime flag and that temporary files were going to the HDD drive instead of the SSD.
Given new life to an old machine. I'm pretty happy now.
Email ThisBlogThis!Share to XShare to FacebookShare to Pinterest
Posted in Apple, iMac, MacOSX | No comments
Newer Post Older Post Home

0 comments:

Post a Comment

Subscribe to: Post Comments (Atom)

Popular Posts

  • How to build Python-4-Android for the ARM Neon
    Currently the Py4A project does not compile for the ARM Neon architecture. If you try to run ndk-build on the project by setting the APP_A...
  • Problems with new version of rpmbuild
    The Problem With the new version of rpmbuild installed on CentOS 6.x, if you try to use an old RPM spec file, you will get an error like the...
  • How to build the gcc Fortran cross-compiler for Android (ARM and x86)
    If you need to cross-compile for Android a program written in Fortran, you know already that the official Android NDK does not come with the...
  • Upgrading mid-2007 24in iMac with an SSD and a 2.5in HDD in the optical bay
    I own a mid-2007 24in iMac with a 2.4 GHz Intel Core 2 Duo processor, 4GB of DDR2 DRAM, running Mac OS Mountain Lion, and for the past few m...
  • Porting your Legacy C/C++ project to Android
    This is a recurring problem people have often: trying to port a big C/C++ project to the Android platform. You have thousands of lines of te...
  • How to inspect expanded C macros with gcc/gcc+
    Sometimes you get compilation errors in gcc/g++ and you'd like to inspect the output from the C compiler pre-processor to figure out why...
  • Android: Trying to load native library results in a process terminated by signal (11)
    Symptoms You are trying to load your native C/C++ library in an Android application and when at runtime your app calls the System.loadLibrar...
  • Arduino and 7-segment LED counter driven by two tactile switches
    I have posted on YouTube a couple of videos about a project I made with the Arduino prototype board. The circuit uses an Arduino mini and ...
  • How to build Python-4-Android for the x86
    Currently the Py4A project only compiles for the ARM architecture. The following patch for the python-build sub-directory allows you to cros...
  • How to port Mozilla SpiderMonkey 1.7 to Android
    Another third-party package I needed to cross-compile for Android was Mozilla's SpiderMonkey 1.7 Javascript engine. I found two issues h...

Categories

  • Android
  • Apple
  • Arduino
  • ARM
  • busybox
  • CentOS
  • DHCP
  • Fortran
  • GNU
  • GPON
  • iMac
  • Javascript
  • ksh
  • Linux
  • MacOSX
  • Mips
  • Network
  • Python
  • Router
  • UNIX
  • Windows
  • x86

Blog Archive

  • ▼  2013 (12)
    • ►  October (1)
    • ►  August (1)
    • ►  May (1)
    • ►  February (3)
    • ▼  January (6)
      • How to build Python-4-Android for the ARM Neon
      • How to build Python-4-Android for the x86
      • Android: Trying to load native library results in ...
      • How to port Mozilla SpiderMonkey 1.7 to Android
      • How to inspect expanded C macros with gcc/gcc+
      • Upgrading mid-2007 24in iMac with an SSD and a 2.5...
  • ►  2012 (11)
    • ►  December (2)
    • ►  November (2)
    • ►  October (7)
Powered by Blogger.

About Me

Unknown
View my complete profile