2

I have tried to install Ubuntu 14.04 LTS on an external drive alongside my Windows 10 OS on my internal drive.

If my external drive is connected everything works just fine. The GRUB menu loads and I have a choice Ubuntu or Windows.

But when my external drive is not connected, Windows should automatically boot, but it doesn't. Instead I'll get a sort of grub-bash. I've tried boot-repair and I see there are some Ubuntu entries on my Windows boot drive sda1, which I think shouldn't be there. I'll guess they should be on the external drive sdb1, or am I wrong?

If that is the problem, how can I move them?

I'm fairly new to all this installation stuff. I only want to try a Linux system for web development.

Here is my boot-repair info

Thanks for your help!

2
  • Your GRUB MBR is on your main drive, but your core.img is on your external drive. You need to put the GRUB MBR on the external drive and restore your Windows MBR on your main drive. Jan 14, 2016 at 21:14
  • There is no "GRUB MBR" or core.img, since this is an EFI-mode installation. That said, the problem is analogous; GRUB is referring to files on the external disk and so is failing when it's unplugged. There are various solutions; see my answer....
    – Rod Smith
    Jan 15, 2016 at 18:34

2 Answers 2

1

You've run into a design flaw of the way Ubuntu configures GRUB 2. Basically, on an EFI-based system, the main GRUB binary goes in the EFI System Partition (ESP), but that binary relies on a grub.cfg file that resides in the Ubuntu /boot/grub directory, which in your case is on the external disk. Because Ubuntu configured GRUB as your default boot loader, the result is that the boot process fails whenever you unplug that external disk. There are several ways to correct this problem, including:

  • Move /boot -- You can repartition your disks so that you have a ~500MB /boot partition on your internal disk, then re-install GRUB. This way, GRUB will be able to read its configuration file from the internal disk even though the bulk of Ubuntu will be installed to the external disk. The drawback is that you'll see an Ubuntu entry whenever the system boots, even when it's non-functional because the external disk is unplugged.
  • Re-prioritize your boot loaders -- You can use efibootmgr in Linux, EasyUEFI in Windows, or other tools to re-order your boot loader priorities. Typically, you'd want to put Windows at the top. You'd then use your firmware's built-in boot manager (typically accessed by hitting Esc, Enter, or a function key, usually F8 or above) to select Ubuntu only when you want to boot it. This may be a workable solution if you boot Ubuntu infrequently, but the awkwardness of accessing the boot manager makes this solution a poor one if you want to boot Ubuntu frequently.
  • Use rEFind (or another boot manager) -- You can install my rEFInd boot manager to the ESP. It will then take over as the default boot manager. Because rEFInd builds its boot list on a boot-by-boot basis, the result will be a boot menu that shows only Windows when the Ubuntu disk is unplugged, and a boot menu that shows Windows and Ubuntu when the Ubuntu disk is plugged in. If you set rEFInd's default to boot Ubuntu, the result would even boot Ubuntu when the disk is plugged in and Windows when it's not plugged in. There are other boot managers, like gummiboot/systemd-boot and rEFIt (rEFInd's predecessor) that would work in this role, too.
-1

You have to boot the Windows USB/DVD, then after selecting your language etc, do not click "Install Now", but instead of that, click "Repair your computer". From there you are able to open up a Command Prompt. Make sure that your external drive is NOT connected, then use the following command: bootrec.exe /FixMbr. This should rewrite the Windows MBR to the main hard drive.

1
  • 1
    The system is EFI-based, so this solution won't work. Even on a BIOS-based computer, the result would be an inability to boot Ubuntu, at least until additional steps were taken, like reconfiguring the BCD or adding another boot manager.
    – Rod Smith
    Jan 15, 2016 at 18:48

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .