Words and code and rock and roll
Advertisement

Removing unusable Ubuntu GRUB from OS X EFI

Published 2013-10-6 (Modified 2013-10-6)

I’m trying to install Ubuntu 13.04 on my good, old MacBook Pro. The idea is to dual boot Ubuntu and OS X, or indeed triple boot as I already have Windows 7 in Bootcamp installed. But so far I’m failing. It is in theory pretty straight forward to install Ubuntu on a Intel Mac, and I’ve made space for it and installed rEFIt to handle the boot. Bu to no avail. Installing from a CD stops before the installer really starts. And when installing from an USB, the installer finished, but Ubuntu would not start.

I was going to try again, and uninstalled the usb installation. But when restarting, the rEFIt menu gave me the option of running GRUB from my EFI partition. The wording was

Boot EFI/Ubuntu/grubx64.efi from EFI

If I understand it correctly, the EFI partition is supposed to be used for firmware updates. And more important, it is invisible as you are not suppose to delete it. But to get rid of the GRUB option from the rEFIt menu, I had to delete the Ubuntu folder from it.

The answer was to create EFI as a volume and mount it. This is what I did in terminal:

Jonass-MacBook-Pro:~ jonas$ diskutil list
/dev/disk0
 #:                   TYPE NAME           SIZE       IDENTIFIER
 0:  GUID_partition_scheme               *500.1 GB   disk0
 1:                    EFI                209.7 MB   disk0s1
 2:              Apple_HFS Macintosh HD   408.8 GB   disk0s2
 3:             Apple_Boot Recovery HD    650.0 MB   disk0s3
 4:   Microsoft Basic Data BOOTCAMP       55.6 GB    disk0s4

mkdir /Volumes/efi

sudo mount -t msdos /dev/disk0s1 /Volumes/efi

The diskutil list is to find the identifier of the EFI partition. In this case it was disk0s1. The I created the folder for the efi volume with mkdir, and then mounted disk0s1 to this folder with mount.

If you then have a look at your devices in Finder, a EFI device is added. With a single EFI folder.

[caption id="attachment_534" align="aligncenter" width="316"]EFI  as a device EFI as a device[/caption]

In the EFI folder, you will find two folders. The standard APPLE folder, and the Ubuntu folder I want to remove. The only thing in this folder is the grubx64.efi file.

[caption id="attachment_535" align="aligncenter" width="510"]Content of EFI Content of EFI[/caption]

And after I deleted the Ubuntu, I was back with only OS X and Windows in the rEFIt menu.

Advertisement