1

I installed Ubuntu 14.04 LTS using a bootable USB pen drive, creating a dual boot with Windows 10. Windows and the EFI partition are on a disk, Ubuntu and its swap partition are on another disk. During the installation I chose as destination for Ubuntu's bootloader the EFI partition (I also tried in a precedent installation to choose not the EFI partition, sda2, but the whole sda disk, resulting however in the following problem).

After the installation, if I try to boot without the pen drive plugged in, the Grub console comes up and I can't go on. The only way I can boot normally is plugging in the pen drive, in this way the OS selection screen in showed and I can go in with the boot.

I tried executing the boot-repair tool, both from the installed version of Ubuntu and from the Live USB, it goes up to the end normally and says that the boot procedure has been repaired but if the I try to boot without the pen drive plugged in, Grub comes up again.

1 Answers1

1

Yours is a common problem, and your question is a duplicate, although I've been unable to find a relevant duplicate through a web search.

Ubuntu installs GRUB in EFI mode in a crazy way, with parts scattered across two partitions:

  • The EFI System Partition (ESP) holds the grubx64.efi binary and one or two other related files. In your case, this is on the hard disk.
  • The GRUB configuration file is stored in the Ubuntu /boot directory, which in your case is on the USB flash drive. The GRUB configuration file defines the boot menu you normally see, so if it's inaccessible, you get an unhelpful grub> prompt (or something similar).

There are a number of solutions, including:

  • Create a /boot partition on your internal disk -- This will put all the critical GRUB files there, so GRUB will continue to work.
  • Install another boot manager, such as my rEFInd boot manager -- rEFInd doesn't rely on cross-partition configuration files for basic functionality, so if you install it to your internal disk's ESP and make rEFInd the default, you'll be able to boot Windows when the USB drive is unplugged or either OS when the USB drive is plugged in. With the right options set in /boot/efi/EFI/refind/refind.conf, you'll be able to boot straight to Windows when the USB drive is unplugged and straight to Ubuntu when the USB drive is plugged in.
  • Install a customized GRUB -- It's possible to configure GRUB to rely on a configuration file on the ESP rather than in /boot. This requires considerable expertise to set up. See this page for some coverage of this topic. (Note that the page includes a notice that it's outdated and to refer to another page, but the newer page lacks the relevant details.)
  • Rely on the computer's built-in boot manager -- Usually, hitting Esc, Enter, F8, or some other function key brings up a boot manager that will let you select between Ubuntu and Windows. You can use this to control the boot process and bypass GRUB when the USB drive is unplugged.

EDIT:* I've just filed a bug report about this problem:

https://bugs.launchpad.net/ubuntu/+source/grub2/+bug/1567534

Rod Smith
  • 45,120
  • 7
  • 66
  • 108