6

Original Question

I'm trying to install Xubuntu on a 2015 Dell XPS 13 laptop, but I've been running into all sorts of bootloader-related problems. To make a long story short, I've installed several different distros on this machine over the past few weeks, but the trouble didn't begin until after I installed Fedora 21. Here's a quick summary of events:

  • I originally installed Xubuntu 14.10 and 15.04 Beta 1 alongside Windows 8 without any problems.
  • I erased the entire disk and installed Fedora 21 using LVM with encryption and the default partitioning scheme.
  • I've attempted numerous times to erase the entire disk and install Xubuntu 14.10 and Xubuntu 15.04 Beta 1 using various partitioning schemes. Sometimes I get an error message stating that GRUB installation failed. At other times, the installation completes without error, but when I reboot my machine, Ubuntu is not detected as a boot option. Unfortunately I don't have any error logs available from the times when the GRUB installation failed, and I haven't been able to reproduce that specific problem recently.
  • I tried erasing the disk and installing Fedora 21 again, and the installation completed successfully. I could boot into Fedora without error.
  • I again attempted to erase the disk and install Xubuntu and Ubuntu 14.10, but I encountered the same problems as before: the installation completes successfully, but there are no entries in the Dell boot menu.

I'm using UEFI with Secure Boot disabled for all of this. All I want to do is to erase the disk and perform a standard installation of Ubuntu or Xubuntu with no other operatinng systems installed.

Currently I have Xubuntu 14.10 (and no other OS) installed, but it's not showing up in the boot options when I turn on my machine. I've tried running boot-repair, and it's giving me this 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.

I'm confused by this, because I'm booted using UEFI. (/sys/firmware/efi is present.)

I realize that this is not a lot of information to go on, but I'd be extremely grateful if anyone could point me in the right direction or suggest what might be causing this problem.

Background

In case it's relevant, I'm running the Dell A03 BIOS on this machine. I replaced the stock Broadcom wireless card with an Intel 7260NGW while Fedora was installed in order to get better out-of-the-box networking support without messing with proprietary drivers. That hasn't caused any obvious problems.

Everything described here was done in UEFI mode with Secure Boot disabled using 64-bit ISOs.

I've tried creating installation media using both Startup Disk Creator and dd and encountered problems in both cases.

I've been jumping between distros in an effort to find something with a relatively recent kernel that plays nicely with this machine. I've been trying to install Xubuntu 15.04 Beta 1 rather than Beta 2 in order to avoid this bug.

Summary, Speculation, and Questions

I've tentatively ruled out the following possible explanations (but feel free to correct me if I'm mistaken here):

  • Bad USB drive
  • Improperly created installation medium
  • Booted in wrong mode

It seems like something changed after I installed Fedora, though I suppose that could just be a coincidence. But here's what's puzzling me:

  • Why would installs conducted after formatting the partitions repeatedly fail to properly install a bootloader? Shouldn't a fresh, standard installation of Ubuntu work 99% of the time?
  • Why has the installer displayed "failed to install bootloader" errors on some occasions but completed without error on other occasions?
  • Why am I getting errors about BIOS compatibilty mode when I've been using UEFI and GPT all along?

Terrifying possibilities that I've considered but don't know how to diagnose:

  • There's something wrong with my laptop's hardware.
  • There's something wrong with the Dell BIOS.
  • Fedora made some sort of change to the disk that's persisted despite my repeated attempts to format it and install Ubuntu.
Ben
  • 252
  • does /etc/default/grub in fedora say GRUB_TIMEOUT = 0 or GRUB_HIDDEN_TIMEOUT=true ? if yes, change timeout to some value, like 30, or hidden timeout to false or just comment that line out – Sergiy Kolodyazhnyy Apr 05 '15 at 20:41
  • I don't actually have Fedora installed anymore -- I installed Xubuntu with the "erase disk" option. But when I boot, the machine doesn't seem to detect the EFI partition. – Ben Apr 05 '15 at 20:47
  • I can not tell from your question. Try selecting which OS to boot in your BIOS. If that does not work run boot-repair – Panther Apr 05 '15 at 21:04
  • That's the problem: my BIOS doesn't display any OSes, and boot-repair prints the error message described in the question. – Ben Apr 05 '15 at 21:06
  • I wonder if this post could help. http://askubuntu.com/questions/362689/gpt-detected-please-create-a-bios-boot-partition-while-using-boot-repair – jbrock Apr 06 '15 at 01:44
  • @jbrock Thanks -- I actually came across that question earlier, but Gparted doesn't show any flags on any of my partitions, and I've definitely been in EFI mode throughout the entire installation process. – Ben Apr 06 '15 at 02:09
  • Check the integrity of your install disk. – j0h Apr 08 '15 at 00:37
  • @j0h Thanks -- I did that (step 2 above, and also before several previous attempts). – Ben Apr 08 '15 at 00:38
  • If you don't mind really wiping the hard disk, create a create a new partition table in GParted on the Ubuntu Live disc. Try setting the type to msdos first. – Wilf Apr 08 '15 at 01:45
  • @Wilf Thanks -- I just tried creating an msdos partition table, then a GPT partition table, and I ended up getting a GRUB installation error. – Ben Apr 08 '15 at 02:13
  • Thank you to everyone who offered suggestions. When I get a chance, I will condense this question down to something more useful for anyone who encounters this sort of problem in the future. – Ben Apr 08 '15 at 03:22

3 Answers3

5

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.

Rod Smith
  • 44,284
  • 7
  • 63
  • 105
  • Thank you very much! efibootmgr did show boot entries for Fedora and Ubuntu. The firmware still did not show Ubuntu as a boot option after I deleted these entries and performed a fresh install, but I was able to manually create a boot option via the firmware setup tools. Thanks again for taking the time to explain this. – Ben Apr 08 '15 at 03:19
  • Addendum: I ended up running into more problems after this -- Ubuntu again disappeared from the machine's boot options. To make a long story short, I was able to get things working by installing Xubuntu 14.04.2, setting the next boot option to Xubuntu using efibootmgr, and then running boot-repair after that boot. I then attempted to install 15.04 Beta 1 again and encountered another GRUB failure. So I haven't figured out exactly what's going on yet, but I'm afraid I don't have any more time to devote to this problem in the near future. – Ben Apr 09 '15 at 03:52
1

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)

kos
  • 35,891
  • Thanks -- I actually did try manually configuring a setup very similar to this, with a 512MB EFI partition at the start of the drive, with no luck. I think everything was mounted in the proper place and the proper flag was set, but I will take another look at this approach tomorrow if I haven't found a solution by then. – Ben Apr 08 '15 at 02:12
1

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.

Ben
  • 252