Boot Camp Drivers for iMac (Early 2009)

Apple’s newest iMacs are a fast set of machines and run Windows faster than any PC I’ve ever used, but unfortunately, Apple has yet to update Boot Camp with the required drivers to support the latest and greatest components. Mac OS X ships with the necessary software and works as expected, but Windows XP is met with some trouble. Right away, you’ll notice that your graphics resolution is set to a paltry 800×600, and you have no sound output as well. Here’s how to get those systems working until Apple can provide an “official” fix:

Graphics Drivers

Visit nVidia and download the “GeForce 9M Series (Notebooks)” driver package, as this is graphics chipset in the Early 2009 iMacs. Run the downloaded setup utility, next-next-nexting your way through the steps, and reboot at the end when prompted. Upon restart, you’ll be able to properly max out your display to the iMac’s native resolution.

Audio Drivers

Boot Camp 2.1 actually ships with RealTek HD audio drivers, as evidenced by the lack of a yellow exclamation mark for this system in Windows’ Device Manager, but they don’t seem to work properly, since there’s no sound output.

Visit RealTek and download the “High Definition Audio Codecs” driver package for your OS. In this instance, I downloaded “Windows 2000, Windows XP/2003(32/64 bits) Driver only (Executable file)”, since I’m running Windows XP Pro SP2. Run this setup utility as well, rebooting again when done. After restarting, you should be greeted with Windows’ standard login sound, confirming the install worked.

Update: The Mac OS X 10.6 Snow Leopard disc includes Boot Camp drivers for these iMacs. The Snow Leopard disc is a hybrid image: it provides the Mac OS X installer when viewed under a Mac OS X system, but shows Windows drivers when viewed in Windows. Just run the setup in Windows right off the disc, and you should be set.

Boot Camp Drivers for iMac (Early 2009)

More Backup 3 QuickPicks

I’ve added a few more QuickPicks to my 2005 QuickPicks post, including SSH keys, .bash_login, Apache configuration, and Xcode settings.

One of these days, I’ll get a Time Capsule or other Time Machine compatible device, but for now, Backup works great as a lightweight little app that does what I need it to do, and is fairly extensible with QuickPicks.

More Backup 3 QuickPicks

Learning Cocoa for the iPhone

These last few weeks, I’ve been teaching myself Cocoa to learn what makes Mac OS X and iPhone OS apps tick. While Objective-C is quite a departure from my usual web development world, Cocoa has quickly become one of my favorite languages, as it takes care of much of the drudgery of pure C and has plenty of useful frameworks to get your application up and running quickly. Here are some of the best resources I’ve found so far:

  • Cocoa Dev Central and Become an Xcoder are both excellent tutorials for beginners, written in a clear, straightforward manner. They also explain the ins and outs of memory management, which is critical on platforms like the iPhone and iPod touch.
  • Stanford’s CS193P lecture notes and examples have proven to be one of the best resources for learning Cocoa, particularly for the iPhone. These notes and tests offer Cocoa Touch in bite-size chunks, with a little bit of “on your own” work to ensure you know your stuff before moving on.
  • Google Code Search is a good last resort for examples of how others are using a small bit of code or a particular class. For more accurate results, append “lang:objectivec” to your search string to narrow results to only Objective-C code.
Learning Cocoa for the iPhone

How to Run Hamachi on Leopard

A while back I detailed how to get Hamachi VPN running on Mac OS X, but times have changed, so here’s how to go about it under Leopard. Again, it’s a bit tricky, involving some Terminal work, but it’s pretty straightforward as far as command-line software goes.

Download and Install Tun/Tap

Hamachi for Mac OS X depends on some other tunneling software, a Tun/Tap kernel extension which does the low-level work. Download the latest Tun/Tap package and install it.

Download and Install Hamachi

Next, download the latest Hamachi for Mac OS X. Installation is a bit more complicated than the Tun/Tap drivers. Unzip the archive, and open up a Terminal window, and type “cd”, followed by a space. Don’t press Return just yet… Instead, drop the Hamachi folder right into the Terminal window, which will insert the path to that folder after the prefix you just typed: cd /Users/you/Downloads/hamachi-0.9.9.9-20-osx. Press Return, and the Terminal’s new working directory will be the Hamachi folder — this is just a quick drag-and-drop shortcut to avoid typing out the path to a folder you already have available.

Once in the Hamachi folder, type sudo ./install. Enter your administrator password to perform the install.

Hamachi should now be installed, and you can initialize it for the first time by typing hamachi-init. This will generate public and private encryption keys in your Home folder, under .hamachi/ (the initial dot makes the folder hidden in regular Finder windows).

With both set-ups out of the way, it’s time to start using Hamachi!

Run Hamachi

Configure Tun/Tap by typing sudo ./usr/sbin/tuncfg

Start up Hamachi by typing hamachi start followed by hamachi login.

At this point, you should be connected to the Hamachi service, but without a VPN for your computers to join. If you already have a network, or plan to join a trusted friend’s network, you can easily join it by typing: hamachi join SomeNetwork.

Most likely, though, you’ll need to create your own network: hamachi create MyNetwork

Now you should have a virtual network in place and can go online hamachi go-online MyNetwork.

To see other parties on the network, run hamachi list

If other computers are online, you’re ready to connect to them with any higher-level software like iChat via Bonjour, the Finder’s “Connect to Server” command, Safari, etc.

To log out of Hamachi and shut down VPN connections, type hamachi stop

For more information about how to use Hamachi, you can view its manual by typing code>hamachi -h

How to Run Hamachi on Leopard

Coda 1.5

The developers at Panic have been very busy for the last several months preparing a major update for their one-window web development app (covered earlier), Coda, and have finally delivered. Coda 1.5 brings tons of new features like multi-file search, customizable books, “reverse publish”, and more, but the one that really takes the cake is full Subversion support. None of that bolted-on nonsense, either — Panic went out of their way to carefully weave Subversion into the interface, presenting commands as needed. The update is also free for registered owners.

If Coda is your primary tool for web development, and you already use Subversion, you’re most likely aware of Versions and Cornerstone, but now you can toss both of those apps and have your source code management built right into your leafy-green development environment. And, after reading how to go about setting up Subversion on MediaTemple, your Mac web development paradise should be complete, ready to start developing all those killer web apps you’ve been pondering. Check out Coda and get coding!

Coda 1.5

iPhoto Billing Information Error

While trying to order some prints from Kodak/Apple via iPhoto yesterday, I repeatedly got the pseudo-error message:

Please review your billing information and approve it.

After checking out my billing information twice, and still getting that error, I found the answer on an Apple Discussions thread: Make sure your credit card verification code is entered in the Account Information screen. Why iPhoto doesn’t highlight or complain about the missing required field is beyond me, but overlooking this tiny field causes problems that hardly indicate their source.

iPhoto Billing Information Error

Delivery Status Widget

I don’t use the Dashboard in Mac OS X as much as I expected to when it was first released, but when I do, one of the few widgets I employ is Delivery Status, which keeps track of packages during shipment. Big, bold numbers display the days until delivery, and smaller text reports on various stops throughout the package’s voyage. With support for over 30 carriers, including all of the most common here in the U.S., Delivery Status conveys what you need to know at a glance, making it an ideal Dashboard widget. Also in the works is an iPhone/iPod Touch application serving the same purpose with an interface optimized for touchscreen devices.

Delivery Status Widget

Boot Camp: Last Resort

In my endless configuration with my computer set-up, I ran into my second major issue with Boot Camp, and managed to find a working solution worth documenting. Starting with a single Mac OS X Leopard volume, Boot Camp Assistant kept failing and reporting “not enough space left on device” while attempting to live-partition my hard drive into two partitions for OS X and Windows (newer versions of Mac OS X can partition hard drives while booted, without any formatting). However, I had over 50% of the drive’s capacity free, so there should have been lots of space left on the drive. Clearly something was amiss…

Having started out with computers as a relatively old school Mac user — one who had to backup and erase a hard drive to partition it — I was immediately suspicious of the new-ish live-partition tool. To work around that, I tried booting the Leopard DVD and running Disk Utility from the Utilities menu, then partitioning the drive using that method. Again, I was met failure, but with an ambiguous “partition error” on which Disk Utility did not elaborate. The “Verify Disk” command reported that my volume was in good shape, despite my suspicions of corruption. DiskWarrior 4 also confirmed that the volume’s directory structure was intact. With 90+ GB free on my MacBook Pro’s 160 GB disk, how could I have “not enough space” to simply slice off a 20 GB Windows partition for run-of-the-mill use?

Out of quick-fix ideas, I decided to back up my Mac OS X volume, erase the drive, partition it, restore my OS X image to the big partition, then install Windows to the new smaller partition. Without a network-ready imaging utility like Ghost or TrueImage for Mac OS X (are there any?), I had to do this a slightly more complicated way:

  1. Boot Mac OS X and connect to a network share on another computer (a networked PC, in my case).
  2. Run SuperDuper! and back up the entire contents of the drive to the other computer.
  3. When done, boot the Leopard DVD and run Disk Utility again, and erase and partition the drive into one HFS+ Journaling partition for Mac OS X and one FAT32 partition for Windows.
  4. Boot a Windows CD, and “quick format” the FAT32 partition to NTFS (since Disk Utility can’t natively create an NTFS volume), then install Windows.
  5. Install Boot Camp drivers from the Leopard DVD: The Windows volume on the Leopard DVD contains the necessary Boot Camp drivers. Nice touch, Apple!
  6. Boot from the Leopard DVD again, but run Terminal this time — there’s no point-and-click way to connect to a network share from the DVD…
  7. Typically, you’d do mount_smbfs to connect to a Windows share, but it failed with “mount_smbfs: failed to load the smb library: Unknown error: 1102” (No luck with mount -t smbfs, either). mount_afp appears to work, though.
  8. With no way to use SMB to get at the imaged Mac OS X volume made earlier, I downloaded a trial version of Extreme-Z IP, which provides AFP file and printer sharing support for Windows. After skipping prompts about Printer Sharing and automatically importing my SMB/Windows shares, it worked beautifully.
  9. Back at the Terminal on the MacBook, mkdir /Volumes/Sharename; mount_afp afp://username:password@192.168.1.10/Sharename /Volumes/Sharename mounted Sharename from the PC onto /Volumes/Sharename on the Mac over Ethernet. (The hidden /Volumes/ folder is where all connected Mac volumes show up).
  10. Back under Disk Utility, I was almost able to Restore the disk image to the proper volume over the network as if it were a local volume, but… it was grayed out in the file picker dialog.
  11. The “Scan Image for Restore” button resulted in a failed process, but it DID add the disk image to the sidebar of Disk Utility, which enabled drag-and-drop such that I could restore it to the HFS+J volume.

After a few hours of restoring data, my MacBook Pro is back, with Mac OS X on one volume just as I left it right before the imaging, and a fresh Windows install on the other. Surely Apple never meant for Boot Camp to be this complicated, but they underestimated the extent of my tinkering and day-to-day use! I hope my documentation can help someone in a similar situation…

Resources

Boot Camp: Last Resort

SmartSleep

SmartSleep is one of those “I wish I knew about this earlier” pieces of software that saves me several minutes every day when I put my MacBook Pro to sleep. Intel Mac laptops (and some of the late G4 laptops) have three sleep states: basic sleep, sleep and hibernate, and full-on hibernate. Sleep is the basic low-power mode, and hibernate actually writes the contents of RAM to disk to conserve even more battery power and prevent the contents of RAM from being lost in the event of a power outage. By default, Intel Macs do the latter, and spend 20 to 60 seconds dumping RAM to disk before going to sleep, depending on how much RAM you have installed. If you happen to run your Mac on AC power most of the time, waiting for the disk to spin down can feel like minutes, but SmartSleep lets you safely switch between sleep modes. After setting my MacBook Pro to sleep only, it blinks off and spins down in only a second or two — a huge improvement in sleep time. This “feature” has been bugging me for the last several months, and SmartSleep quickly and effectively adds the system preference that Apple forgot.

SmartSleep

Two Weeks with Coda

One Window

Two weeks ago I finally decided to give Panic’s newest Mac OS X offering, Coda, a thorough test to see if will better serve my web development needs. I had known about it since its initial release, hailed by many as the perfect solution to web developers needs, while downplayed by some due to lack of features. Coda is an 80% solution — an application that tries to simplify the average coder’s workflow, unifying the standard multi-program arrangement into one window, with configurable tabs for various purposes. Panic won’t win everyone over with this tactic, but the idea of opening a single, dedicated program to do my work in really appealed to me both as a designer and a programmer. Coda’s icon, a simple green leaf, subtly hints “keep it simple” at every launch. Panic’s developers have taken this approach to heart, crafting a straightforward interface which rivals that of the best Mac applications.

One week ago, I purchased Coda. It doesn’t have Subversion support and it doesn’t have fullscreen mode. What I did find, though, is a unique application that neatly organizes most of the tools I need to get web development done. A syntax-completing text editor, visual or textual CSS editor, terminal, and live web preview are among my most used tools, any of which can be swapped for another, or split into multiple views. With my preferred syntax coloring set up, Coda’s split tabs make me feel right at home, editing HTML and CSS side by side with a preview of the results just a click away.

Get Back to Work

Coda makes getting back into “the zone” really quite easy with its Sites feature, which keeps track of each project’s tab arrangement, FTP settings, public URL, and more. Double-click a Site to start working right where you left off. As for publishing, Coda leverages Transmit’s FTP engine, which keeps folders in sync between your computer and web host with little effort.

A Few Shortcomings

I often work with MySQL as my data store and use CocoaMySQL as a front-end, but switching applications goes against the one-window flow that Coda tries so hard to bring together, so I installed phpMyAdmin and just use it inside a Preview tab within Coda — couldn’t be simpler. The same goes for online documentation not covered by the built-in PHP and JavaScript references. For Subversion, I’ll just use command-line ‘svn’ calls within a Terminal mode, as it’s surprisingly straightforward for a command-line utility.

Only the Beginning

As of this writing, Coda is just at version 1.1, so there’s plenty of room for it to grow. At the very least, I hope to see fullscreen mode similar to NetNewsWire’s in the near future, so I can really get into my code and ignore little distractions like menu bar extras, Mail badges, etc. Panic has dropped their biggest application yet on the Mac web developer community, and overall, I’m very satisfied with Coda and am getting so much more done in so fewer windows.

Two Weeks with Coda