Upgrading a Unibody Macbook Hard Drive

Posted July 14th, 2011 in Hardware, OSX by erich

I’ve been trying to keep my 160GB original drive relatively clean, but after a while, the music and 4GB XCode beta downloads just ate up all the space and I got the dreaded “your startup drive is running low on space” message with about 200MB left.

Alrighty!  Time to order a new drive!  I considered an SSD for speed, but I’m not rich enough to buy a big SSD drive, nor do Macs have TRIM support which SSDs need or they degrade over time, unless you get an OWC auto-balancing drive but again those are big bucks.

I looked into the Seagate Momentus XT hybrid drives that have some flash in them to give you a partial SSD-like boost, but they seem to have some firmware issues.  Yes some people have found a firmware update that works for them, but I don’t want to deal with it – I want a drive that just works.

Western Digital is my go-to drive of choice these days for both laptops and desktops.  I’ve got a 1TB black and a 1TB green in my Windows machine that sync nightly (yes I run both OSX and Winders), and I started looking at the 500GB WD Black laptop drives, but too many people talked about vibration and noise from them.  The WD Blue 500GB, however, has glowing reviews all around, aside from the odd DOA report but that happens for all drives and Amazon has a great return policy so I just ignore that.  Also order this enclosure (or something similar), assuming you’ve got a spare mini USB cable lying around as the one that comes with it is garbage.

To transfer the data from your old hard drive to the new one when it arrives, pop open the enclosure, pull out the little interface board which is likely not even glued down, and throw away the enclosure case.  Okay you could keep it, but you don’t need it.  Plug the interface board onto your shiny new hard drive and attach it to your Mac with a good mini USB cable (directly to the Macbook, not through a hub, so it gets enough power).  Follow these nifty instructions to format the drive and clone your data.  I recommend disabling wifi, pulling your ethernet cable, and shutting down all apps including DropBox and such while doing the sync, to avoid much of any new data being written to your old hard drive while the sync is going.

Now once it’s down, you need to remove your old drive and put in the new one.  The hard drive is right under the battery hatch which opens easily, but the screws in there are easy to strip.  Get thee to Harbor Freight and spend $8 to get this nifty screwdriver kit with a whole bunch of tiny bits for all the stuff you’re likely to find in your computers.  Use a PH0 bit to take out the drive retaining bracket, and then a T6 to move the drive studs from the old drive to the new drive.  Put it all back in, fire up your Mac, and bask in the glory of your awesome skillz!

UPDATE – you may need to load up “hdapm” which is a tiny background program that sets your shiny new drive to _not_ spin down all the time, in order to get rid of a clicking sound that happens every few seconds while OSX and/or the drive decide to take a siesta and spin down, only to spin up a few microseconds later.  Save wear and tear on your drive as well as reduce noise – go get the nice new hdapm installer package and run it – no config necessary!

Database GUI for Mac OSX

Posted February 16th, 2011 in Java, OSX, Software by erich

Need a basic GUI for playing with databases on OSX?  Version 4.7.2 of Aqua Data Studio is the last version that was free, and can use any JDBC driver as well as it comes bundled with a whole bunch ready to go.  The trick is that it is almost impossible to find it.

Google to the rescue!  Search for ads-java-novm-4.7.2.zip and look for a reputable-looking source, such as a linux or darwin distro site such as this one.  Unzip it and edit datastudio.sh, replacing line 4 with “ADS_HOME=../../..”.  Then use Platypus to make a double-clickable app for it, opening up advanced options and unchecking “Remains running after initial execution” and check “Runs in background” if you want to not have the Platypus app cluttering up your open apps list.

Don’t get me wrong, this is not as good as something like Oracle SQL Developer, but it’s another option to have around.

Mac App Store URLs

Posted January 6th, 2011 in iPhone, OSX by erich

The  iTunes App Store for iPhones/iPods/iPads has URLs for deep-linking to apps within iTunes, and it appears that the Mac App Store now has the same.

Sample iOS iTunes link – http://itunes.apple.com/us/app/jewel-beach/id382524862?mt=8

Sample Mac App Store link - http://itunes.apple.com/us/app/jewel-beach/id408904571?mt=12

Exactly the same except for a new media type of 12 at the end.  Time to update the review-request code for Mac Apps!

iPhone Invalid Binary Error – Fixed?

Posted January 17th, 2009 in iPhone, OSX, Rant, Software by erich

The dreaded binary error has bitten me…

“The binary you uploaded was invalid. The signature was invalid, or it was not signed with an Apple submission certificate.”

Okay, in one case, it was actually valid, as I had been using an icon file that wasn’t named Icon.png and wasn’t 57×57.  Thanks to Sean for helping me with that.

But today, it was totally bogus.  I made a trivial change for a resubmit of my PrivateWeb app, and the binary was rejected.  Clean the project & rebuild, still hosed.  Restart XCode, still hosed.  Go to the finder and remove every folder from my project’s build directory and then build again – and it WORKED???  WTF?!

Ahem.  I’m glad it worked, but seriously…  There’s something buggy in XCode land.

Setting up a CVS server on Mac OSX in 4 steps and 4 minutes

Posted November 27th, 2006 in OSX, Software by erich

So. I wanted to set up a cvs server under OSX. I looked around and found a few people with docs about how to set up xinetd or set up launchd, blah blah blah, but I didn’t want to deal with that. Yeah, I know OSX is unix and isn’t that great, but I want something like the old days where to install a web server, you just launched the MacHTTP app and you were done. No config files, just simple apps. Want a mail server? Fire up EIMS. Ah, the good old days…

So, as it turns out, it apparently _is_ simple to get cvs working under OSX. Here are the steps (from memory, so I might have missed something, but damn it’s simple)

  • 1) Insert OSX Install Disc 1 and launch the Xcode Tools / XcodeTools.mpkg installer, Continue, Continue, Agree, Continue, Customize, deselect everything except for the top item, “Developer Tools Software”. Finish the install
  • 2) Fire up Terminal and make a cvs-repository directory in your home directory (or wherever, but that’s what I used): “mkdir cvs-repository”
  • 3) Add required files to the cvs repository with “cvs -d /Users/erich/cvs-repository init”
  • 4) Open your System Preferences, Sharing, Services – make sure Remote Login is enabled
  • 5) There is no step 5

That’s it. I fired up Eclipse, made a test project, connected using the IP address (not by name, for simplicity) of the OSX box, connection type of “extssh”, repository path of “/Users/erich/cvs-repository”, and it worked. That was it.

Secure cvs, no pserver bullshit.

Almost back to the old days. Way better than trying to set this up on Winders. But I can dream of a CVS.app someday, right? Are you on that? :-)