Remove "Windows" Entry from Mac Boot Loader Background

A while back, I installed Windows 8 on my MacBook Air (mid 2013 model) using Bootcamp. It never really worked, (it would freeze all the time, the WiFi would cut in and out, etc.) so I got rid of it. I tried to do this through Bootcamp again, but for whatever reason this didn't work, so I booted up on a live Ubuntu USB and manually erased the NTFS partition for Windows.

Once back in OS X (Mavericks, but it was Mountain Lion when I installed Windows), I expended the default HFS+ partition to fill the full space of the SSD. So now I've got a nearly out-of-box Macintosh HD partition; everything on the Mac side works fine.

But lately, I find myself getting increasingly annoyed at the BSD coreutils among other things, and so I'd like to be able to dual boot into some version of Linux (probably Ubuntu or Xubuntu, but this is kind of arbitrary). 

My Issue

So but it turns out that when I "uninstalled" the Windows partition, something didn't quite update in the boot loader (I'm kind of fuzzy on my knowledge of the difference between a boot loader and a boot manager, so I might be using these terms incorrectly). When I start up my Mac holding down option, I get the following...



which is weird because this is what my main hard drive looks like in Disk Utility



and again with gpt:

$ sudo gpt -r show /dev/disk0
      start       size  index  contents
          0          1         PMBR
          1          1         Pri GPT header
          2         32         Pri GPT table
         34          6
         40     409600      1  GPT part - C12A7328-F81F-11D2-BA4B-00A0C93EC93B
     409640  489562928      2  GPT part - 48465300-0000-11AA-AA11-00306543ECAC
  489972568     262151
  490234719         32         Sec GPT table
  490234751          1         Sec GPT header


To Be Fixed

I can't see where these icons would be coming from. In the end, I'd like to just have both of these gone (and I guess any other hidden remnants of Windows that they might be indicating).
When you don't use the Boot Camp utility to remove Windows, the Windows boot image on your EFI partition is not removed. This is what you see when you hold down ⌥ during boot.

The procedure to solve this is not for the faint of heart. You need to mount the EFI partition in OS X (normally, it only gets mounted for system updates).

Mounting the EFI partition

List the partitions on your Mac:

diskutil list


You should see something like this:

/dev/disk0
 #: TYPE                     NAME          SIZE       IDENTIFIER
 0: GUID_partition_scheme                  *251.0 GB  disk0
 1: EFI                                    209.7 MB   disk0s1
 2: Apple_HFS                Macintosh HD  250.1 GB   disk0s2
 3: Apple_Boot               Recovery HD   650.0 MB   disk0s3


Take note of /dev/disk0 and 1: EFI. The numbers 0 and 1 have significance later.

Now mount the EFI partition (replace the numbers 0 and 1 if they are different in your output):

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


Remove the Windows boot image

Now navigate to /Volumes/efi/EFI. This directory is supposed to only contain an APPLE directory. On a machine where I had Windows installed, it also contained a Microsoft and Boot directory. These can be safely removed, but for extra safety I would recommend renaming them to something different instead.

Then umount and delete the directory you created earlier.

sudo umount /Volumes/efi
sudo rmdir /Volumes/efi