Macbook Pro won’t boot from an installer DVD? What to do?

I’ve had a Macbook Pro since early 2008 and it’s been a very solid machine so far. Unfortunately, it had a bit of a mishap earlier this year during a road trip when I opened a door and it tumbled out of a loose bag and had a bad encounter with the pavement. After the hit, it actually booted up long enough for me to back up some important data, but after shutting it down, it refused to start up and just emitted a series of death clicks, eventually followed by a “question mark disk” icon (a flashing symbol of a disk with a large “?” in the middle).

Cue ahead to a few weeks ago when I finally get around to replacing the hard drive in the thing. I picked up a WD Scorpio Black which, at 7200 rpm and a capacity of 320gb, is a nice improvement over the wrecked stock 5400 rpm / 120gb drive. After removing and reinstalling lots of tiny screws, the new drive went in without any problems.

I picked up a copy of OS X Snow Leopard on DVD, popped it in the drive and started the machine up, expecting to be on my way. Then, uh oh, question-mark-disk icon again! I then spent several hours trying various key combinations that were supposed to make the machine boot from the DVD, or display a list of boot options, or reset the PRAM, or generally make things work, and each and every time, nothing happened. The DVD drive would spin up and make various read-type sounds, only to finally spin down, eject the disc and display the dreaded “?” icon once more.

Looks like my Superdrive is broken or it just doesn’t want to boot from a DVD. What to do? After lots of trial and error and general stress, I found a solution that works:

  • Use MagicISO ($30) or a similar tool to create an ISO image of the DVD. ImgBurn (freeware) might also work. Change the ISO file’s extension to DMG.
  • Download and install TransMac.
  • Get a USB thumb drive that has a 4gb or greater capacity.
  • Open TransMac. Right-click on the thumb drive and select “Format with image”.
  • Browse to and select the OS X DMG file that you created earlier.
  • Wait for TransMac to write the file to the thumb drive. Exit TransMac and eject the thumb drive.
  • Insert the thumb drive into the Mac machine; start it up. Hold down the Option key as it boots.
  • Wait until you see a drive icon with an up-arrow below it. Click on the arrow.
  • Proceed to install OS X. Success!

These instructions assume that you are using a Windows-based PC to create the thumb drive. TransMac is the only Windows-based tool that can do it correctly — other thumb drive writers will mess things up.

If you have access to a .DMG or an .ISO file that already contains an OS X installer, you can skip the first step.

CP437 Fonts for Windows

Codepage-437

CP437, yo

In my search for a good monospaced font for coding and other fixed-width uses, I began looking for a Windows version of the original Code Page 437 “OEM font.”

Unable to find a suitable replacement, I created .FON versions of the font using Fony, a spiffy freeware tool for editing bitmap fonts.

There’s both a 9×16 and an 8×16 version. Those of you who ever knew too much about EGA will recall that it had an 8×16 character size, whereas VGA’s is 9×16. I find that both are suitable for modern use, but I like the 8×16 a bit more because it seems better suited to the aspect ratio of a modern display (9×16 feels a little too “loose”).

Download them both here (Windows .FON format): 8×16, 9×16.

Feel free to re-use and re-distribute as you see fit.

Commission Junction category tree in SQL format

After signing up for Commission Junction, I wanted to be able to store their category tree in a MySQL database. CJ has a method in its Support Services API called getCategories that allows you to retrieve a category list; however, the category list is flat (not in a tree format), and I wasn’t ever able to make the getCategories method work. CJ describes how it should work here, but I didn’t have any luck.

So, I ended up manually building a category tree based on the categories listed in the CJ console. Download it here:

CJ Categories.sql

The category tree is set up in a simple adjacency list (parent-based category) structure. Read this article for more information on tree structures in MySQL.

Use this query to retrieve a complete list of all categories in list format:

SELECT COALESCE(c2.id, c1.id) id, c1.name, COALESCE(c2.name, ”) FROM category_map_cj c1
LEFT JOIN category_map_cj c2 ON c2.parent_id = c1.id AND c2.parent_id != c2.id
WHERE c1.parent_id = c1.id;
SELECT COALESCE(c2.id, c1.id) id, c1.name, COALESCE(c2.name, '') FROM category_map_cj c1
LEFT JOIN category_map_cj c2 ON c2.parent_id = c1.id AND c2.parent_id != c2.id
WHERE c1.parent_id = c1.id;

Leave a comment if you encounter any issues with this or if you have any questions.

Replacing ignition coils in 2004 Mazda MPV

Turns out the Mazda MPV, unlike most of the older cars that I’ve been familiar with, has an ignition coil for each cylinder — six coils in total. Long story short, failed ignition coils seem to be a common problem in Mazda MPVs from 2001 through 2006. My first failed coil happened about a year ago, and manifested itself through hesitation and jerking while driving once the engine had warmed up, along with a check engine light. When it happened the first time, I took it to the dealership and had the coil replaced for around $250 total (roughly half parts, half labor).

About two months ago, the car started jerking and hesitating again, and it gradually got to the point where it took a good amount of gas-pedal-coaxing to get it to hold 25 mph up a steepish hill. I decided that rather than taking it in to the dealership for another $250, I’d just order a new set of coils and replace all six at once myself. This ended up being a little more work than I had anticipated, but, all in all, was a great success and not too difficult, and certainly well worth the potentially huge savings I netted by avoiding a trip to the shop.

Firstly, the subject of acquiring the coils. The coils seem to run anywhere from $65 to $100 when ordered individually or purchased from an auto parts place. Here is what you are looking for:

  • Motorcraft part DG513.
  • Standard part UF406.


Now, rather than paying a lot for all six and buying them individually, order a set of six from Amazon using the link here. It should run $209.99 plus shipping, which is a great price for the set of six. These will fit a 2002 through 2005 MPV, and possibly a year or two under or over.

You’ll need a ratchet with a few metric sockets (8mm, 10mm and 12mm). You’ll also need a short extension, and if you want to replace the spark plugs while you’re in there (I highly recommend you do so), you’ll need a longer (8″ or so) extension and a 5/8″ spark plug socket.

I took pictures while I did mine, but ended up losing them later. For a detailed description of how to replace the coils, visit this great post on the MPVclub.com forums.

Interior renovation on 1984 Ford Bronco

I bought this Bronco about a month ago. The drivetrain and mechanicals are in pretty good shape but the interior was shot, so my first task was to redo it. Exterior work (fixing a bit of rust, polish/wax, maybe new paint) will come next, but at least the interior is mostly done now.

This post is big with a lot of images, so click below to view the whole thing.

Continue reading

2004 Mazda MPV Stalling and Rough Idle: Replacing the Idle Air Control (IAC) Valve

I have owned a 2004 Mazda MPV LX since early 2006, and it has been a great vehicle so far. Plenty of room, fairly fuel-efficient, quite practical and very satisfactory on the whole… with one exception.

Starting around late 2007, the minivan started to occasionally stall while decelerating or braking. The RPMs would drop to near-zero and the engine would die. It only happened a couple of times over a few months but began to get more and more frequent as time passed. Generally it would only happen between 15 and 50 MPH, and only when letting off of the accelerator. After the first few times, I learned to avoid it by tapping the gas as I saw the RPMs plummet; if I did that in time, I was able to keep it from dying. If I didn’t however, my only recourse was to shift into Neutral, start the engine while rolling, shift back into Drive and keep going. Of course, this was quite unsafe, and by the time it was stalling once or twice every time I drove it, it was time to do something about it.

I did a bit of research online and found the occasional mention of a faulty IAC valve being the cause of stalling and rough idling. The folks at Kragen didn’t know what an IAC valve was, and I didn’t pursue it any further from there.

The van began to show a check engine light, so I took it in to the local Mazda dealership to have them check it out. It turns out the check engine light was the result of a sensor that was blocked by excessive carbon buildup in the intake manifold, which was caused in part by the stalling behavior. According to the tech, the stalling was causing the engine to run a richer fuel/air mix on restart (because it interpreted the stall as an indication of a fuel/air mixture that was too lean), and this frequently-richer burn was causing an undue amount of carbon buildup. They cleaned out the intake manifold with Seafoam (or a product like it), did a firmware upgrade, changed the plugs and wires (which I’d asked them to do as a maintenance step while they had it in there), and, $1,100 later, was given a clean bill of health. The MPV passed Oregon’s emissions testing, the stalling was gone and all seemed well.

A couple of months later, the stalling started to act up again, and grew in frequency as it did before. I did a bit more research and all available evidence still pointed at a faulty IAC valve. As it turns out, the folks at Kragen weren’t able to find the part I was referring to because it seems to go by several name/acronym combinations: IAC valve, idle air control valve, idle control valve.

Still not sure that a fix was in sight but willing to try it, I ordered a replacement IAC valve from an online parts retailer for around $65 and put it in. Replacement of the valve was very easy; it is attached to the intake manifold by two bolts, and has a simple wire harness attached to it. Here are two pictures showing its location on the engine. I saved these when I was doing my research and, unfortunately, can’t find the original source, but here they are:

Location of idle air control valve on MPV engine

Location of idle air control valve on MPV engine

Closeup of IAC valve

Closeup of IAC valve

As you can see, the valve is fairly easy to locate. It should be in a similar location for the following years:

  • 2002 Mazda MPV
  • 2003 Mazda MPV
  • 2005 Mazda MPV
  • 2006 Mazda MPV

Years 2001 and earlier have the IAC valve attached to the firewall, but it should not be too difficult to find (the part itself looks the same as the one seen here).

Since installing the replacement valve around four months ago, the minivan has been running as good as it did when I bought it. There have been no issues whatsoever with stalling or rough running.

Pick up a replacement IAC valve from Amazon using the link below. The part is listed as being compatible with a series of Ford cars; however, the engines are the same and this will work for any 2001+ MPV.

Update: Slightly better image of the IAC valve below.

It's the gizmo with the red circle around it.

It's the gizmo with the red circle around it.

Mounting a big ext2fs partition on a USB drive in FreeBSD

I have a Maxtor OneTouch 4 Plus external USB drive, 750gb, that I wanted to connect to my home server running FreeBSD 7.0. I planned on using the drive for holding music and media, using the FreeBSD server as a media hub running Mediatomb and NFS/SMB shares.

In planning the venture, I needed the hard drive’s format to be as universally compatible and as universally stable as possible. I needed to be able to reliably interact with the drive under FreeBSD and Linux, as well as OS X and Windows (should the need ever arise, I want to be ready).

After some thought, I ended up settling on ext2 for the drive’s file system. I chose ext2 because:

  • It is fairly universal, in that it can be mounted and used reliably from most OSs.
  • I did not want to use FAT32; plus, FreeBSD’s msdosfs driver could not mount the drive properly (even with the -o large switch).
  • Did not want to use NTFS because of general shakiness on any non-Windows platform.
  • I initially tried UFS, but gave up after repeated failed attempts to get FreeBSD to partition and label it properly. (Not sure why; suspect the drive’s detected geometry may have been an issue.)
  • Considered ZFS but decided I don’t want to be that cutting-edge; plus I wouldn’t have a use for most of its extended functionality. (I just need a basic filesystem.)
  • Considered HFS+ but FreeBSD support is shaky (old driver, could not get it to compile on 7.0).

So, I plugged the drive into an Ubuntu Ibex box, formatted it into one ext2 partition and plugged it in to the FreeBSD box.

mount -t ext2fs /dev/da0s1 /mnt/media

So far, so good. The output of the mount command shows that the drive is there and mounted. But then:

cd /mnt
ls -la
ls: media: Bad file descriptor

For some reason, the mount point could not be listed.

After some research, I came across this bug report that described the problem in greater detail. Basically, newer versions of Linux seem to format ext2fs partitions using a 256-byte inode size, versus the previous default of 128 bytes, which is what the FreeBSD ext2fs driver expects it to be.

Fixing The Problem

To fix it, you’ll apply a patch by Josh Carroll, who posted it in the bug report linked above. Under a standard FreeBSD 7.0 installations, the commands will be something like this (as root):

cd /usr/src/sys/gnu/fs
cp -R ext2fs ext2fs.orig
cd ext2fs
fetch http://pflog.net/~floyd/ext2fs.diff
patch <ext2fs.diff
cd /usr/src
make buildkernel KERNCONF=GENERIC && make installkernel KERNCONF=GENERIC

If all goes well, you should then be able to restart, mount the drive, and have it work as expected. Good luck!

Finding a Driver for the “eHome Infrared Transceiver”

I have an older Toshiba laptop that I’ve had set up as an experimental media center box for a while now, running MediaPortal on top of Windows XP Pro. The thing has been working very well so far, except for one major problem — no matter how hard I tried, I could not get Windows XP Pro to recognize the receiver for the generic Media Center remote control I had picked up off of NewEgg.

Initially, I picked up a Logitech Harmony 550 remote, hoping I could make it work with the laptop’s built-in IrDA transceiver, but to no avail — the IrDA unit apparently cannot communicate on the Consumer IR spectrum that a standard remote control uses. Not one to be easily defeated, I picked up a cheap, generic Windows Media Center remote control and receiver. I plugged the receiver in and, to my dismay, Windows was unable to locate a driver for the device.

After months of sporadic attempts and research, I finally found the solution. Under Windows XP, the receiver will show up under “Other devices” in the Device Manager as an “eHome Infrared Transceiver”, sporting an exclamation mark badge over a question mark — missing drivers. Windows Update turns up nothing, and a patch for Windows XP MCE that is suggested by many seems to not help anything either.

Make it work!

To install the drivers for the device, follow these steps:

  • Right-click on the device entry and select Properties.
  • Click on the “Reinstall Driver…” button. Opt to not check Windows Update; you’ve probably already tried with no luck.
  • Get esoteric with the “Install from a list or specific location” option.
  • Get more esoteric with the “I will choose the driver to install” option.
  • Under the “hardware type” box, choose the “Universal Serial Bus controllers” option.
  • On the next page, a correctly-labeled driver should appear as the only option in the box. Continue.
  • Skip affirmatively past any prompts you receive.
  • After the driver is installed, wait a bit while it churns through the resultant child devices that will appear.

You should now be good to go! I just discovered this earlier this evening and was very excited, so I figured I’d make a post about it to save others the pain and heartache that I experienced.

Additional Note: In order for the correct driver to appear, you may need to install this update. It is for XP MCE 2005 but should also install cleanly on XP.

Second additional note (December 2009): It’s worth mentioning that the remote and receiver work perfectly out of the box on Windows 7 (as I assume they would also on Vista, though I never tried).