Grub doesn’t see external drive (Intel mac)

Posted on

Problem :

I have an Intel Mac (MacMini) and an external usb-drive. On the internal drive, I have a partition with an OSX install, and one with Ubuntu+Grub2. On the external drive, I have a copy of my complete OSX partition and a copy of my complete Ubuntu partition (both with different UUIDs than the original).

I use rEFIt for dual booting. The internal OSX and Linux and the external OSX appear in the rEFIt menu and are bootable. The external Linux, which I want to be able to boot, is missing. After creating the Linux backup, I did update-grub on the internal Linux (it found all 4 installs) and on the external one (through chroot – it found all installs except internal Linux). This didn’t solve the problem.

When I try to boot the external Linux using the internal Grub, I get the error message:

error: no such device: <the UUID of the external Linux partition>
error: no such partition.
error: you need to load the kernel first.

When I type ls in the internal Grub menu, it lists all partitions on the internal drive, but (hd1) is missing out entirely.

I tried to sync the partition tables on the external drive using gptsync, but it claims no GPT is present. gdisk did find one however, and a manual comparison with fdisk‘s output gives me the impression they are in sync. (The Linux partition is included in both tables.)


I burned rEFInd to a cd and experimented. Results:

  • When I boot my mac pressing C to boot from the cd, it shortly shows rEFInd’s gray background but then immediately launches the grub from the internal install. I can work around this by selecting rEFInd from rEFIt. However, this gives me little confidence for installing rEFInd in OSX.

  • rEFInd shows all options it should show. As was to be expected, the Grubs are still uncapable of booting linux from the external disk.

  • When I launch a Linux kernel from the external disk using rEFInd, it does boot, but after booting it turns out the INternal partition is mounted as /. According to this article, the only changes one has to make after copying a partition, are in the grub. Since I’m not using the grub, I don’t understand.

Solution :

You should first understand the difference between native EFI-mode booting and booting in BIOS/CSM/legacy mode. Intel-based Macs have EFI firmware, and OS X boots in EFI mode. This firmware includes a BIOS emulator (known as the Compatibility Support Module, or CSM; or sometimes referred to as “legacy mode” support) that enables them to boot BIOS-mode boot loaders. Apple intends for this to be used to boot Windows; but many people also use this BIOS/CSM/legacy support to boot other OSes, including Linux. Linux, though, supports EFI-mode booting as well as BIOS-mode booting, so using the Mac’s CSM is often unnecessary, and even a complication. OTOH, there are certain models on which the hardware works better in Linux when booted in BIOS mode than when booted in EFI mode.

Booting from external media on Macs is an iffy proposition, especially in BIOS/CSM/legacy mode. Chances are that’s the problem you’re encountering. I know of no “silver bullet” solution to the problem in BIOS mode. The solution that’s most likely to work is to switch to EFI-mode booting. To do this, I recommend you switch from the abandoned rEFIt to its fork that I maintain, rEFInd. Among other things, rEFInd adds support for directly launching Linux kernels with EFI stub loaders (which includes most distribution-provided kernels since 3.3.0). If you boot rEFInd from the USB flash drive or CD-R image available on its downloads page, it may launch Linux from both your internal and external drives (and OS X from both locations, too). If this works, install rEFInd in OS X and also install the driver for whatever filesystem holds your Linux kernel (usually ext4fs). The result should be an ability to boot either OS directly, bypassing GRUB.

If all this works, I recommend removing the ugly and dangerous hybrid MBR, which Apple’s EFI uses as a trigger to activate its CSM. (The gptsync utility creates or modifies a hybrid MBR.) Please read that link to understand what a hybrid MBR is and why it’s such a problem.


The fact that the rEFInd CD-R didn’t work correctly when you used “C” to boot it directly but did work when launched from rEFIt says little about the probability of rEFInd working correctly when installed on a hard disk or USB flash drive. Unfortunately, booting from optical media in EFI is rather convoluted, and Apple seems to have thrown in their own wrinkles. Thus, booting in that way can be a little dicey, especially since I (rEFInd’s developer) have only one ancient Mac on which to test things. Booting from hard disk (or from a USB flash drive) is more likely to work.

Based on your description, I suspect that you failed to update your /etc/fstab file on the copied filesystem. Updating /etc/fstab to refer to the new UUID for the partition is required when following that procedure. If by chance you have a /boot/refind_linux.conf file, then it must be updated, too. (Chances are you don’t have that file, but you might if you went a little beyond my instructions or if you played with rEFInd in the past.)

Leave a Reply

Your email address will not be published. Required fields are marked *