Why can't I boot into Ubuntu after installing and then erasing Fedora?

Solution 1:

First, you reported the following Boot Repair message:

GPT detected. Please create a BIOS-Boot partition (>1MB, unformatted filesystem, bios_grub flag). This can be performed via tools such as Gparted. Then try again.

This message implies that your Boot Repair disc booted in BIOS/CSM/legacy mode. The messages you reported later imply that your installer booted in EFI/UEFI mode, though. This inconsistency could be a factor in your problem, although I don't think it's the sole cause of your problem. If possible, I recommend that you enter your firmware setup utility and disable BIOS/CSM/legacy support. The reason is that enabling this support means you're flipping a coin about your boot mode when you boot, and that creates a potential for problems. It's best to be sure about your boot mode. OTOH, some computers have flaky EFIs, and with them it may be better to install in BIOS/CSM/legacy mode. With such systems, you must at least learn enough about how the firmware operates to be able to force a boot in BIOS/CSM/legacy mode.

Second, you're focusing exclusively on the hard disk, but EFI-mode booting relies heavily on the contents of the NVRAM, too. My suspicion is that something is going wrong in your NVRAM setup. This might be a result of firmware bugs, bugs in your OS installers, or mistakes in your installation procedure. In any event, you should boot a live CD in EFI mode and type the following command in a Terminal:

sudo efibootmgr -v

This will produce output showing the current contents of your boot entries in NVRAM, like this:

BootCurrent: 0000
Timeout: 1 seconds
BootOrder: 0000
Boot0000* rEFInd (direct)   HD(2,c00,114000,6e49fcaf-d054-47c9-ba69-a668c5ee8192)File(\EFI\refind\refind_x64.efi)
Boot0004* UEFI: Built-in EFI Shell  Vendor(5023b95c-db26-429b-a648-bd47664c8012,)..BO

This example is unusually short and is not likely to be representative of what you'll see, since you'll probably see entries for Ubuntu and/or Fedora. Once you know what's there, you can trim extraneous entries. For instance, if there's a Boot0005 entry that refers to Fedora, you can remove it like this:

sudo efibootmgr -b 5 -B

Change 5 to whatever is appropriate. (Note that the numbers are hexadecimal.) You may need to issue this command multiple times to remove all the no-longer-valid entries. If you don't understand an entry, be cautious about deleting it; it might be necessary for the computer to boot correctly. If you're wiping the disk clean, though, you should delete all the entries that refer to any OS you've ever installed on it, including Windows, Fedora, and Ubuntu. With any luck, cleaning unused or invalid boot entries out of the NVRAM will enable your Ubuntu installer to create a new entry that the computer will accept. If you see a large number of entries you don't understand, feel free to edit your question to show your efibootmgr -v output. (Reply to this response so I'll know to check back.)

It's conceivable that your firmware offers a setup option to help clean out unused boot entries, too, so you could go digging through the firmware setup utility for relevant options.

Solution 2:

I see that you're not facing any problem in booting into the Xubuntu / Ubuntu Live DVDs whatsoever, so I excluded everything related to the correct procedure and to the potential issues of booting an Ubuntu Live DVD in a Windows 8 laptop in UEFI mode.

Try again this way:

  1. Boot from the Xubuntu/Ubuntu Live DVD in UEFI mode
  2. At the Installation type step, choose the Other option and make sure that the following requirements are met.

When installing in UEFI mode, you need to setup the drive like this (excluding additional partitions like swap or whatever):

  1. Partition table: GPT
  2. One EFI partition present at the start of the drive and matching the following requirements:
    • File system: FAT32
    • Size: at least 100MB (200MB reccomended)
    • Mount point: /boot/EFI
    • Flags: boot
  3. One / partition present and matching the following requirements:
    • Mount point: /

(Please note that the EFI partition's mount point should automatically be set once the partition has been manually added during the partition layout setup)

Solution 3:

I've finally managed to get everything working on this machine, so I wanted to make a quick post here in case anyone runs into this sort of issue in the future. I followed the advice in Rod Smith's answer and cleared out the old boot entries using efibootmgr; that seemed to start me on the right path, but I still ran into issues installing GRUB in Xubuntu 15.10 Beta 1 and, if I recall correctly, 14.04.2. What finally worked for me was installing Xubuntu 14.10 with secure boot enabled. Unfortunately, I didn't take notes as I was going through this process, so I don't have more specific information about what I tried along the way.