iMac 5,1 with Linux on external USB disk

Started by ga, February 07, 2015, 17:26:40 PM

Previous topic - Next topic

ga

This post is to record what I found, as I found no good information for this configuration in many searches.

The iMac 5,1 has a 32-bit EFI bootloader and a 64-bit Intel CPU.  The boot ROM also supports some BIOS emulation ("Boot Camp"), but it works only with the internal disk.  Several years ago Apple stopped supporting this hardware with new OS releases, so it is time to look for an alternative. I wanted to keep the Apple OS during the transition, so wanted a bootable external disk.

Versions of Linux are easy to install on an external USB disk, but the boot firmware ignores them.  I tried several EFI boot managers like rEFIt with no success.   The boot ROM can start a boot manager on the external disk, and the manager shows the Linux installation, but it never boots.  I think the problem is that the boot ROM offers no support for the boot manager to read the external disk, and they depend on that.

I started reading about the possibility to boot a kernel from the Windows partition on the internal disk with NTLDR and SYSLINUX.  I found a mention of Plop Boot Manager; it booted on the second try.

This is what I did:

Boot the Linux install DVD and install to the external disk, partitioning it in traditional style (MBR) with primary partitions, and boot via GRUB in the MBR.  The Ubuntu installer warns that the machine needs a dedicated boot partition.  I ignored it and created only root, swap and /usr partitions, plus a FAT one for file sharing with MacOS.

Boot the PLPBT CD and select USB boot.  After a few seconds the GRUB menu appears and soon Ubuntu starts.


There were some fixable problems:

The PLPBT screen is hard to read, with horizontal lines over the text.  Only the text mode boot screen is clear, all of the graphic modes are ugly, or fail to lock the monitor.  I made a custom PLPBT CD with text mode, and a quick timeout to default USB boot.

The keyboard does not work in GRUB, and it boots only after timeout.  I plan to shorten the timeout.

GRUB shows an error: "Error: attempt to read or write outside of disk 'hd0'."  It can be ignored, but adds another timeout.

The wireless Ethernet card did not work until I added the device firmware in /lib/firmware/b43.  To save carrying the machine to the router, I used another Ubuntu machine to install and run firmware-b43-installer_019-1_all.deb, which creates the firmware files.

Once Ubuntu starts, the screen is very bright.  I added this to /etc/rc.local:
echo 9 > /sys/class/backlight/apple_backlight/brightness

With both a CD and USB disk to boot, and the timeouts, boot is quite slow.  I plan to try starting PLPBT from the internal disk via NTLDR and BOOT.INI.


Thanks Elmar!

ga

A few other notes, based on a year of use.

Booting into Ubuntu is more reliable when the USB disk is plugged into the middle of the three USB sockets at the rear.
After a few months it failed to boot at all.  The fix was to delete /boot/grub/grubenv, so added 'rm /boot/grub/grubenv' to /etc/local.
After a update disaster, a clean install of Ubuntu 15.10 no longer requires the extra network interface firmware.

Elmar


newmanda

Thank you ga, and thank you Elmar! I have spent hours trying to work around the Linux install problems on my iMac 5,1. It is now happily loading the latest Ubuntu thanks to both of your contributions.