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@ /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…


Boot Camp: Last Resort


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.


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

Rackmount G4


I took a trip out to my previous employer’s business to check out an interesting find he stumbled upon in a purchased lot of computer equipment. Among other official Apple-branded machines and workstations were several apparently custom built 3U rackmount G4 servers. I took a bunch of pictures documenting the meticulous overhauls that were done in readying the new machines for about 8 hard drives, plenty of PCI cards, and proper cooling. Judging by the labels left on the converted towers, they were intended to be used as ProTools workhorses, mixing audio and piping effects around someone’s once-elaborate pro audio setup. Aside from the unique form factor (for a Mac-based server, anyway) and the sheer geekiness of such an undertaking, the power controls and cooling system are of particular interest.


The one really interesting bit of circuitry in the whole system is one tiny Marathon power board, which connects to the relocated front panel board of the original tower. Several years ago, Marathon Computer offered rackmount conversion kits for Apple’s G3, G4, and even iMac systems. These enclosures appear to be made by I-Star, despite similarities to Marathon’s PowerRack kit, though pictures and documentation about Marathon’s kits are now extremely hard to find.

To keep the system and its veritable wall of hard drives running cool and trouble-free, large fans were employed in conjunction with a simple, off-the-shelf fan controller which combines the feedback from multiple fans into one monitoring port, complete with overheating alarm and adjustable temperature settings (via jumpers).

For completeness, a SCSI card and stealth serial port were added, leaving room for ProTools PCI audio cards. In its day, this was a screaming system that bested even Apple’s top PowerMac offerings. Someone clearly spent many hours getting the physical layout and electrical systems just right, which I thought was worth preserving and sharing.

Rackmount G4

MacBook Air Hard Drives

Looking through Apple’s technical documentation on the MacBook Air revealed that the 80 GB drive it ships with is a Samsung HS082HB 1.8″ (4200 RPM, 8 MB cache) ZIF model, a departure from the Toshiba-dominated iPods. With the same size of only 5mm thin, I wouldn’t be surprised if these started showing up in iPod Classic 80 GB models — it seems likely, given that the low end Classic is the thinner of the two and exactly 80 GB in capacity. It seems many drive manufacturers are jumping on the 1.8″ form factor bandwagon now, which will inevitably result in cheaper pocket-sized storage that will be enjoyed by all.

MacBook Air Hard Drives

GPT Protective Partitions and Windows XP

If you’ve formatted a bootable hard drive on an Intel Mac (or have perhaps been tinkering with the wholly unsupported OSx86 project) and later decided to put the drive to use under Windows XP, you might find that you’re unable to format the disk, with Windows Disk Management claiming the device is a “GPT Protective Partition.” You can’t format it, partition it, or even assign it drive letter. What gives?

The secret is that the GPT scheme protects itself from being read and possibly erased by utilities or operating systems which aren’t able to correctly interpret it. Until just recently, I wasn’t aware that a filesystem even had such a capability. I was under the false assumption that a utility running externally of the drive in question could always format a detected disk, no matter the filesystem in place. I doubt it could withstand the raw formatting power of DBAN, but it was enough to confuse Windows XP.

How can the GPT scheme be undone? Typically, software that can create it can also destroy it. In my case, Leopard’s Disk Utility application was able re-partition the drive as follows:

  • Boot a Leopard DVD (retail or OSx86) and choose your native language at the first screen.
  • Run “Disk Utility” from the “Utilities” menu and highlight the offending drive on the left.
  • Navigate to the “Partition” tab, choose “1 Partition” from the Volume Scheme popup menu, select your new desired format (or “Free Space”), and make sure to click the “Options…” button
  • From the “Options” screen, you can choose between GUID Partition Table, Apple Partition Map (for PowerPC Macs), and Master Boot Record. Choose MBR, and click OK.
  • Click “Apply” to partition the drive using the more common MBR scheme, and thus completely erase all trace of the GPT partition.

Once the partitioning is complete, you’ll be able to format and use the drive under Windows XP, Mac OS 9, or any other system incapable of comprehending GPT Partitions.

GPT Protective Partitions and Windows XP

How to Test RAM Under Mac OS X

Whenever I get a new stick of RAM for my Mac or PC, I’m always eager to just plug it in and start using it to its fullest, but having worked on hundreds of computers and encountering dozens of bad memory modules has convinced me that thorough testing is a must. While off-the-shelf PCs can run a copy of the free Ultimate Boot CD tool to perform RAM tests, Macs are a little bit more complicated in this respect. If you’ve purchased AppleCare for your Mac, it comes with a bootable TechTool Deluxe disc, but you’re otherwise left to your own devices when it comes to hardware tests.

Fortunately, with a little preparation right now, you can boot your Mac into Single User Mode and do a complete RAM test in the future. While you can run the necessary software in a fully-booted system, I recommend doing testing in Single User Mode where there are far less programs loaded in memory, and less chance of an important system component getting corrupted if your machine freezes or kernel panics — common symptoms of bad memory. A modified Mac OS X boot CD would be ideal, but that’s another post for another day!

Download Memtest

The testing setup isn’t terribly complex; I’ve taken the liberty of putting together an installable package which will put the Memtest utility into your /usr/bin/ folder. Memtest is a Unix command-line program that does the memory testing, and is the Mac equivalent of MemTest86.

Memtest Usage

To run memtest on a new memory module, first shut down your computer and install the new chip. (Some helpful guides for doing this can be found at iFixit, if you’re unsure of the exact steps.) Ensure the chip is firmly in place, close up your machine (or don’t, if you’re a pessimist), and power it on while holding down the Command and S keys to force Mac OS X to boot into Single User Mode. Once you see a black screen with white text, you can release the key combination. After all the system logging is done scrolling past, type memtest all 2 to test all memory two times. Two passes should be enough to detect any blatant problems, but I wouldn’t hesitate to let it run for hours on end if I suspected an intermittent memory problem (memtest all). When complete, you should be greeted with “All tests passed” if your new RAM is in good condition. If your system locks up or freezes indefinitely during the test, you may have a bad memory module on your hands.

2/16/12 Update: Memtest is still working under Mac OS X 10.7 Lion.

10/25/12 Update: Memtest is still working under OS X 10.8 Mountain Lion.

How to Test RAM Under Mac OS X