When you installed Ubuntu, it placed the Grub bootloader on your internal drive MBR, but all the grub modules are stored on your Ubuntu partition, on the external drive. Grub won't let you do much if it cannot load the modules, so, without the external plugged in you cannot boot anything.
What you should have done is to leave the Windows bootloader on the internal drive, and installed Grub to the external. Then whenever you plug in the external, just override at startup to boot from the external.
To install Grub to the external MBR (assuming it's /dev/sdb
):
sudo grub-install /dev/sdb
To get Windows booting without the external, reinstall the Windows bootloader. To do this boot from a Windows 7 repair CD or the Windows Installation DVD to a repair prompt and run:
bootrec /fixmbr
You can make a Windows Repair CD from Windows if you don't have one. It's also possible to install a Windows-like bootloader from your Ubuntu install:
sudo apt-get install lilo
sudo lilo -M /dev/sda mbr
Note that lilo
will popup a large warning screen, but it's safe to ignore it as this refers to when it's used to boot linux.
This is what it looks like to use lilo
(note the command is case-sensitive):
bcbc@neptune:~$ sudo apt-get install lilo
[sudo] password for bcbc:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Suggested packages:
lilo-doc
The following NEW packages will be installed:
lilo
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 275 kB of archives.
After this operation, 807 kB of additional disk space will be used.
Get:1 http://mirror.csclub.uwaterloo.ca/ubuntu/ precise/main lilo amd64 1:23.2-2 [275 kB]
Fetched 275 kB in 1s (198 kB/s)
Preconfiguring packages ...
Selecting previously unselected package lilo.
(Reading database ... 505850 files and directories currently installed.)
Unpacking lilo (from .../lilo_1%3a23.2-2_amd64.deb) ...
Processing triggers for man-db ...
Setting up lilo (1:23.2-2) ...
bcbc@neptune:~$ sudo lilo -M /dev/sda mbr
Backup copy of /dev/sda in /boot/boot.0800
The Master Boot Record of /dev/sda has been updated.
bcbc@neptune:~$
You'll see a warning that looks like this - it can be ignored when you use lilo
as a windows-style bootloader:
Broadly speaking, you made two mistakes:
- The last I heard, EasyBCD is useless for managing a dual-boot installation on an EFI-based computer. Thus, by installing it you just started digging a hole for yourself.
- You tried to apply BIOS-specific knowledge to an EFI-based computer. I know that almost everybody (including manufacturers) is calling EFIs "BIOSes," but they aren't. An EFI boots in a fundamentally different way than a BIOS, so you really do need to read up on EFI boot methods and ignore all your BIOS-specific knowledge. Thinking of an EFI as a BIOS just creates confusion and causes mistakes. See the following sites for EFI-specific information:
You can recover your system from where you are now, but it might be simpler to start from scratch. To do so, follow your procedure through step #6; however, be sure that you boot the Linux installer itself in EFI mode. That should get you an EFI-mode installation of GRUB, which in theory should boot Windows without your having to run Boot Repair. If you have problems at this point, you can either run Boot Repair (which is klunky and often over-does things) or install my rEFInd boot manager. Do not install EasyBCD.
At this point in time, your best method of dealing with problems is to read and understand the technology; automated tools get things right sometimes, but they also often mess things up worse than they were before. (This isn't really a criticism of the automated tools; unfortunately, there's so much variability from one EFI to the next that it's impossible for automated tools to get things right all of the time.) If possible, test a tool on a USB flash drive without installing it to your hard disk. You can do this with rEFInd, but it's difficult to do a test installation of GRUB to a USB flash drive.
Best Answer
Unfortunately, the instructions were for a self-installed copy of Windows 8, so their setup was NOT a UEFI machine. Things are a little different for preinstalled Windows 8 on UEFI machines.
External (removable) boot devices should have their own 300M, FAT, EFI partition to hold the bootloaders. When you select the location for the bootloader (on sdb for the external), use this partition (which may work) instead of the device (which never works). When it doesn't work, the internal hard disk is used, so just copy the files from the internal disk's EFI to the external disk's EFI. Now, the installer still may not set up the bootloaders into the right directory for a removable device -- they should go into /EFI/Boot, and be named /EFI/Boot/bootx64.efi. Instead, grubx64.efi and shimx64.efi (the bootloaders) typically get put into /EFI/ubuntu (just like on the internal hard disk). I like to use shimx64.efi as the bootx64.efi file so the boot works whether secure boot is enabled or disabled. So, copy /EFI/ubuntu/shimx64.efi to /EFI/Boot/bootx64.efi (note the name change), and also copy /EFI/ubuntu/grubx64.efi to /EFI/Boot/grubx64.efi. The grub.cfg file may be left in /EFI/ubuntu.
The nvram boot entry for USB (disks...) should now boot the external disk -- no new entry in nvram should be needed. If you are getting grub without the external hard disk, looks like it got installed to the internal hard disk's EFI (no problem), and was put before the Windows bootloaders in boot order (problem). efibootmgr from Ubuntu will allow you to change the boot order, or delete the unwanted Ubuntu entry (remember, you will be booting with the USB entry).