Notes on installing Linux on a 2008 Apple Intel iMac

Support this website by purchasing prints of my photographs! Check them out here.

I love saving computers from becoming landfill-destined eWaste. Behind me is an iMac G3 (2001) happily running OS 9.2, an iMac G4 (2002) with a bad power supply awaiting a lobotomy, and I'm listening to a modded monochrome 4th gen iPod (2004). While the G3 is retro and fun to look at the iPod actually serves a daily purpose. Can I give this 2008 iMac a purpose?

Ultimately, with this being an Intel mac, it's not old enough to be vintage, and not new enough to run modern macOS. I personally don't find it interesting to run old versions of OS X since it's only evolutionarily different from modern macOS. To make the device useful it should be able to do things like browse the web and receive security updates. For that reason Linux is a must.

I won't bury the lede. Follow this guide and you will get your 2008 iMac to run Linux, but with a few shortcomings:

  • Initial configuration requires an Apple USB keyboard
  • The iMac drops frames when playing 1080p videos or fullscreen 720p videos
  • Firefox can't play 720p YouTube video
  • The screen is an ugly TFT display, not a beautiful modern Apple IPS display
  • macOS seems to do better audio equalizing
  • You'll want to to replace the hard drive, upgrade the ram, and swap WiFi cards

Otherwise, for basic web browsing and word processing and email this machine is fine.

Upgrades Before Installation

Technically none of these upgrades are mandatory, but depending on your expectations you may regret not doing them. Here they are ordered by importance.

Note that after performing any hardware upgrade you'll want to "reset the PRAM", which is an Apple term meaning to clear out a cache in the firmware. If you don't you might get weird issues or slow performance. To do this power on the machine, hold Cmd + Opt/Alt + P + R until the computer chimes twice, then release the keys. Note that you will either need to use a USB Apple keyboard, or you may get lucky using a different brand USB keyboard. I am unable to make it work using a USB ThinkPad keyboard that has an included TrackPoint.

These upgrades aren't the easiest thing and you'll be poking around with a lot of fragile components. I suggest figuring out what upgrades you want to make ahead of time, ordering parts, and replacing everything all at once.

Also, while you're inside the iMac, it's worth vacuuming out and removing the decade of dust. Just be careful to not get it between the screen and glass. When I first opened the screen it sucked in dust from around the bezel and I had to use a dust blower to clean it up.

Replace HDD with SSD (Hard)

Upgrading to an SSD is always the most effective thing you can do to save an old PC from becoming eWaste. By default the 2008 iMac comes with a 3.5" 7200RPM SATA hard drive. I'd recommend replacing it with whatever the cheapest 2.5" SSD is that you can find from a brand that you've heard of before. I replaced my hard drive with the PNY CS900 250GB 3D NAND SSD for the cost of $23 USD. Choosing something expensive may be overkill.

You may be tempted to get a 2.5" to 3.5" SATA drive bracket adapter. These are metal or plastic caddies that allow you to properly mount a 2.5" drive in the location of a 3.5" drive. However, the SATA cables are too short, and I don't believe you'll find an adapter which fits perfectly. For that reason I chose to use gaffer tape to attach the drive to the chassis.

A 2008 Intel iMac with an SSD taped inside the chassis
A 2008 Intel iMac with an SSD taped inside the chassis

Upgrading the hard drive is difficult. You'll need to remove the RAM door, pop off the screen with suction cups, unscrew and remove the aluminum chassis. Next you'll need to remove the screen and the plugs, and then remove the caddy. Refer to this iFixit guide: iMac Intel 20" EMC 2133 and 2210 Hard Drive Replacement.

Increase RAM (Easy)

By default the 2008 iMac comes with 1GB x 2 (2GB) of RAM. This is pretty tight even for Linux. For that reason I would recommend upgrading to 4GB of RAM. I was able to purchase a pair of off-brand DDR2 800MHz Sodimm PC2 6400 memory for $10 USD. Note that it is possible to upgrade to 6GB of RAM (2GB + 4GB) however the 4GB sticks are expensive, at least $40 each. I wouldn't recommend upgrading to 6GB unless you otherwise get the machine working great and find yourself limited by memory.

Upgrading the RAM couldn't be easier. Just remove a screw and pull some tabs. Refer to this iFixit guide: iMac Intel 20" EMC 2133 and 2210 RAM Replacement.

Replace WiFi Card (Medium)

The included Broadcom WiFi in the 2008 iMac is hot garbage. I suppose Apple chose it to be cheap and then tuned some custom driver to work with it nicely with OS X. However, with Linux, it sucks. The bandwidth is very low. It disconnects all the time. DNS lookups often fail. I could hardly get one website to load.

I did not choose to replace the WiFi card on my iMac and instead have been surviving with Ethernet. The iMac does have an m.2 slot for the wireless card, however I don't recall how it is keyed. I'm also not sure if there are any firmware restrictions on card compatibility (e.g. older ThinkPad laptops used to have such restrictions) so you'll need to do your own research. When I last upgraded WiFi cards in my newer ThinkPad or my Framework laptop I went with the Intel AX200 WiFi 6 card for about $24 USD. But again it might not be compatible.

Upgrading the WiFi card is of medium effort. You'll need to remove the RAM door, pop off the screen with suction cups, unscrew and remove the aluminum chassis, then you'll be able to access the WiFi card in the lower right corner. Refer to this iFixit guide: iMac Intel 20" EMC 2133 and 2210 AirPort Extreme Replacement.

Installing Linux

Note that this guide was originally much more negative when I posted it. But after reinstalling different versions of Linux several times things are working okay. Here's the gist:

You should not install Linux on a 2008 iMac using a USB thumb drive. Instead burn the ISO to a CD or DVD.

I read dozens of blog posts and videos and nobody seemed to explain this. Circa 2008 was a transitional time period for Apple and they were figuring out the whole UEFI thing. These machines have a faulty implementation. If you do install Linux using a USB thumb drive you'll encounter two major issues. The first is that boot time takes 4 minutes. The second is that the display gets bright and corrupted after waking from suspend. Finding a distro that will successfully boot is difficult too since the partition table provided in the ISO file needs to be formatted as msdos and not gpt. I was able to find an issue on the systemd repository, Support boot in EFI mixed mode, which seems to have a lot more technical details and ultimately suggests that the 2008 iMac UEFI is buggy.

Resuming from Suspend on Linux installed on an iMac 2008 via USB thumb drive shows artifacts
Resuming from Suspend on Linux installed on an iMac 2008 via USB thumb drive shows artifacts

I'm pretty sure the reason the iMac works better when Linux is installed from an optical disc is that it somehow forces a compatibility mode that is somehow persisted, maybe in an EFI variable or as as a GRUB setting. For example, when booting an installer from USB, the GRUB menu is tiny and centered in the screen and the installer defaults to installing the OS on disk with the gpt partition table. But when booting from a DVD the installer stretches to fill the screen and defaults to the msdos partition table when formatting the disk. Even when I tricked a USB installer to use the msdos partition table on disk the installed OS still exhibited the same issues.

Also note that Ventoy doesn't work for installation purposes. While its icon will appear, and you can boot into Ventoy to list your ISO files, and you can even "boot" into an ISO to view it's grub menu, but when you try to actually launch an install it will fail with a security warning. This happens both when you choose to load it as a "normal" or a "grub2" entry in Ventoy. No amount of experiments with Ventoy has gotten me to actually boot any installer.

I downloaded the Kubuntu 24.04.2 ISO file (kubuntu-24.04.2-desktop-amd64.iso) and burned it to a DVD using K3b, burning it at 4x speed and then verifying the disc afterward and used that for my most recent successful install.

Once you have the disc burned insert it into the computer while its on and reboot, or power it on and insert the disc. Then hold down the option key using an Apple USB keyboard. You'll then be shown one or two icons, one for the optical disc and the other for the internal drive if the iMac detects an OS. Click the disc icon or use the arrow keys and enter to select it. You'll then launch a standard issue Linux installer.

Once the install is complete you might want to reset the PRAM again.

Slow Boot Process

Upon booting the machine you will either see black nothingness or the following message for roughly 1:45 minutes (or 4:00 minutes if you installed from USB):

efi stub: loaded initrd from LINUX_EFI_INITRD_MEDIA_GUID device path

If you were to inspect the kernel messages you would see that there are "clocksource" issues, which is something that can happen when booting Linux on old hardware. But by default these kernel messages are hidden when booting. Let's both enable the kernel messages by removing the quiet splash flags and also fix the clocksource issue by adding the tsc=unstable flag.

Run the following to do just that:

sudo nano /etc/default/grub
# before: GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
# after: GRUB_CMDLINE_LINUX_DEFAULT="tsc=unstable"
# (if you see other entries in the quotes then leave them in there)
sudo update-grub

With this change I get to see the one line message above, then a bunch of kernel debug information, during future boots. I recommend keeping it this way until you've settled into the machine. Once that's done you can add quiet splash back again if the messages are annoying.

While trying to reduce boot time I also installed rEFInd, which provides an ugly GUI for choosing which device to boot from. It can be installed either from macOS or from Linux. On Linux it's pretty easy to install if you're using an Ubuntu derivative:

sudo apt-add-repository ppa:rodsmith/refind
sudo apt update
sudo apt install refind

Ultimately I find that rEFInd just makes things uglier and I didn't get much benefit. I wouldn't recommend installing rEFInd if Linux is the only OS you're installing.

A 2008 Intel iMac with rEFInd
A 2008 Intel iMac with rEFInd

USB Keyboard Incompatibility

As noted above there are issues with keyboard compatibility. A general rule of thumb seems to be that Apple USB keyboards work fine and fancy USB keyboards don't. However my ThinkPad USB keyboard is pretty dumb and that doesn't work so I'm not entirely sure what's going on. You'll probably need to experiment with keyboards to see what works best. I did have similar issues with my much older iMac G3 though one would think that Apple would have figured out USB keyboard compatibility during that decade.

This mostly affects the early boot process, like holding Option to choose a boot media or holding Cmd + Opt + P + R to perform a PRAM update. That said, once things are installed and running, it's not that big of a deal. If you choose to install rEFInd you'll be able to use non Apple keyboards to choose boot media just fine.

But, another surprising issue is that one can't wake up from suspend using an incompatible USB keyboard either. Press all the keys and click buttons and nothing happens. But hit a key on an Apple keyboard and it wakes right up. This might not be an issue if you're using, say, a fancy USB keyboard and a dumb USB mouse where you can just click the mouse button. Ultimately it appears that the low level Apple firmware lacks modern USB drivers.

This also suggests that you may have issues with Bluetooth keyboards. I haven't tested but maybe an official Apple Bluetooth keyboard would work fine for configuring boot options and waking from suspend? You'll need to do your own research.

Note that you can always wake the iMac up by pressing the rear power button.

Poor WiFi Experience

Note that this might only be applicable when booting Linux in UEFI mode. Now that I've got the iMac running in legacy mode the experience is better. YMMV.

The built-in Broadcom WiFi card provides a very poor experience. It disconnects a lot, has low bandwidth, and is generally completely useless. It does seem to always support scanning for networks. It does seem to work just fine under macOS.

Ethernet works just fine so I haven't spent too much time trying to figure out WiFi.

I will say that ElementaryOS and Kubuntu 20.04 both supported scanning for networks out of the box, even during the live environment. Linux Mint didn't until after a reboot and after using the driver GUI to install the right software. However the bad connectivity issues always remained.

I did find some guides that recommend installing a special driver:

sudo apt install firmware-b43-installer linux-firmware

Even after installing this driver I didn't notice any better stability with the wireless. For that reason I recommend replacing the WiFi card as outlined above.

Loud Startup Chime

By now the loud startup chime may be driving you crazy. The volume level is stored as an "EFI Variable", which is available to the hardware early on in the boot process. When you change the volume in macOS this also sets the value of the EFI Variable. For that reason the iMac was probably pretty quiet to begin with, but once the PRAM has been reset it goes to 100% volume.

If you've installed the OS from a DVD then it boots in MBR mode (and not EFI mode). This fixes a ton of bugs but it also makes it impossible to change EFI variables. For that reason you might need to boot into a Live Linux environment via USB to execute the following commands. Or if you're dual booting OS X and Linux simply turn down the volume while in OS X.

Run these commands in Linux to set the startup chime volume to around 5% of the overall volume:

chattr -i /sys/firmware/efi/efivars/SystemAudioVolume-7c436110-ab2a-4bbb-a880-fe41995c9f82
printf "\x07\x00\x00\x00\x10" > /sys/firmware/efi/efivars/SystemAudioVolume-7c436110-ab2a-4bbb-a880-fe41995c9f82

The \x10 represents a hex value from 00 to FF so you can tweak it if you prefer it louder or quieter.

No Fans and High Temperatures

Also at this point your fans have likely never turned on and the machine might be getting hot, especially if you're trying to play video. Run the following command to get rudimentary fan support:

sudo apt install macfanctld

In my experience the fans are often very loud and the computer is often hot. Either Linux is really taxing the system or the machine just has poor thermal venting. Ryan Thomas has a more detailed approach which may result in better fan performance.

Slow Performance

Performance of this machine is pretty bad. If you tried ElementaryOS 8.0 like I did (it has the right aesthetic after all) you probably noticed some very bad screen artifacting, especially with the dock. I wasn't able to find a solution. Overall Linux Mint and Kubuntu are much more performant. I find regular Ubuntu a performance hog and didn't even try.

VLC decoding of MKV files or otherwise H.264 content results in constant artifacting issues. Overall I found VLC to not be useful for playing movies on this mac, though it's fine for playing music or CDs.

Linux Mint defaulted to opening videos with the Celluloid media player. I found that Celluloid was able to play content without the bad H.264 artifacting. Unfortunately when Celluloid is run in fullscreen the performance gets very bad and it starts dropping frames. The same video in a smaller window runs fine. I'm not sure if this is a compositor issue or what. Also, 720p DVD rip videos played fine, but 1080p Blu-ray video rips would stutter a lot.

I tested Firefox, Chromium, and I think a weird third browser. Only Chromium was able to play 720p YouTube content without dropping frames. I'm a diehard Firefox fan but for this machine it'll probably need some sort of Chrome variant like Chromium:

sudo apt install chromium

I didn't attempt to run Google Chrome but I'm sure it would run at least as good as Chromium.

Conclusion

The 2008 Intel iMac is a cool looking minimalist machine. Who doesn't love a good aluminum unibody? And who doesn't want to keep computers from becoming eWaste? With Linux installed and a few changes made to the hardware it makes for a neat machine for light web browsing, email, music listening, and word processing. Just don't expect to be able to play high resolution video on it.

Special thanks to Ryan Thomas, author of Installing Linux on a 2008 Intel-based iMac, who answered some questions I had via email.

Thomas Hunter II Avatar

Thomas has contributed to dozens of enterprise Node.js services and has worked for a company dedicated to securing Node.js. He has spoken at several conferences on Node.js and JavaScript and is an O'Reilly published author.