Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I installed Windows 8 using EFI, and later on I installed Ubuntu using EFI as well. As I always do, I had trouble with the bootloaders. Ubuntu replaced the bootloader on the EFI, which I was very well aware it would. Booting it only works half of the time though, and I'd rather use BCD than GRUB because the Windows 8 BCD starts Windows while you make the decision wether you want to boot Windows or Linux and I mainly use Windows.

Either way. Like I said, it only works half the time. By that I mean sometimes when I boot from EFI it says "Select proper boot device" and then i have to boot using the MBR. The same thing happens vice versa. Setting the MBR as the default boot device reports the same error now and then and then I have to boot from the MBR on another harddrive (No, not EFI).

Basically my question is this: How do I remove the GRUB2 prompt and make BCD appear instead?

I tried installing the bootloader to the EFI partition using bootrec and bcdboot following this procedure:

First I mounted the EFI partition using diskpart (B: being the EFI volume and J: the Windows volume)

cd /d B:\EFI\
del ubuntu
bootrec /fixboot
bcdboot J:\Windows /l en-gb /s B: /f ALL

And then I rebooted. The result is a broken EFI partition which doesn't boot anything but I can still boot from the MBR on another harddrive.

share|improve this question

First, in an EFI-mode installation (which your Windows almost certainly uses and Ubuntu probably used), the MBR is irrelevant to the boot process. Under EFI, the firmware reads boot loader files in the EFI System Partition (ESP). The MBR contains no boot code, just a protective partition that helps to identify the disk as using the GUID Partition Table (GPT) partitioning system. Confusingly, though, most UEFI-based computers also support a BIOS/legacy boot mode and so can boot from emergency disks and the like intended for BIOS-based computers. These disks do use MBR-based code. The second disk you mentioned may be booting in this way, but your description is unclear on this point.

If your ESP had an EFI\ubuntu directory, then Ubuntu was installed in EFI mode, and by deleting that directory, you rendered Ubuntu unbootable, at least until you repair it. I'm not fully conversant in the Windows bootrec and bcdboot tools, so I'm not entirely sure what those commands did. As a first step to recovery, I recommend you locate a Windows 8 recovery disc and use it to repair your installation. This will probably get Windows up and running again, but Ubuntu will probably remain unbootable.

At that point, you'll need to restore Ubuntu to bootability. There are a number of ways to do this. Two that spring to mind include:

  • Run Ubuntu's Boot Repair Tool. This is a fairly automated tool that will probably get Ubuntu up and running, but you may run into your original reliability problem. It may also rename the Windows boot loader in a weird way that might cause problems down the road.
  • Using Windows, install my rEFInd boot manager and a driver for your Ubuntu filesystem (probably ext4). This will enable rEFInd to load the Linux kernel directly, without the help of GRUB; however, the first time you boot Ubuntu, you'll need to do so by highlighting the Linux option and, instead of hitting Enter, pressing F2 or Insert twice. You'll then be able to edit boot options to add the Linux root device, as in root=/dev/sda5. (You'll need to know the device name, though; it may well not be /dev/sda5 for you.) Once Ubuntu comes up, run the script that comes with rEFInd and on subsequent boots, you won't need to edit your boot options. This approach is a little more tedious to start with than using Boot Repair, but it's a little less likely to cause problems down the road.
share|improve this answer
I have no intention of saving Ubuntu. Either way I can still boot into it without any problems whatsoever. The ESP did contain an Ubuntu folder and I wouldn't have removed it in the first place if Ubuntu was important to me. Windows automatic repair-thingy doesn't do anything useful. bootrec is a simple tool for managing BCD and /fixboot will replace the BCD with a new one if the old one is corrupted. I don't know what bcdboot does, but someone suggested I tried it. – Time Sheep Feb 13 '13 at 20:45
I might as well add that the only reason I still have Ubuntu is installed is because I cannot make the BCD appear before i choose Windows in GRUB. I also just realized (by checking) that Windows is running on the MBR partition scheme, so it might not be booting from EFI after all. Ubuntu does... Appearantly – Time Sheep Feb 13 '13 at 20:47
up vote 0 down vote accepted

I can no longer verify answers, as I swapped out the harddrive, so I will have to close the question.

share|improve this answer

You must log in to answer this question.

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