5

Following a botched Linux install, my Windows 7 install can't find my MBR normally. It's in there -- somewhere -- and I CAN access it if I use F12 during boot to access the mobo boot options:

enter image description here

Note that it's stacking "ubuntu" first -- I have to move down to Windows Boot Manager, and then Windows boots normally. If I select "ubuntu" I get the "BOOTMGR Not Found" message, so obviously the BIOS is booting that "ubuntu" option first, and not finding the BOOTMGR there.

Note also that Windows comes first in the boot order in my BIOS:

enter image description here

So there IS a working MBR in my system. Somewhere. My BIOS, or something, just doesn't know how to find it.

I have used repair options (F8 during Windows boot) and both Startup Repair and bootrec /fixmbr and bootrec /fixboot. All report executing correctly (bootrecs) or "no problems found" (Startup Repair), but I still get BOOTMGR Not Found upon reboot.

Hard Drive BBS priorities gives me this. Changing the order does nothing.

enter image description here

In Windows Disk Manager, I can see the 100MB partition Windows creates, but there doesn't seem to be a way to mark it as active -- the option is greyed out as a right-click option, and also as an Action/All Tasks option.

enter image description here

Following an EFI deletion of the Ubuntu entry, it no longer appears as a boot device, but there's still no BOOTMGR. no_ubuntu_boot

My most recent paste from Linux boot-repair: http://paste.ubuntu.com/7951926/

And an Easy UEFI screenshot:

enter image description here

4 Answers4

6

No, your MBR is not working, but that's fine, because your Windows never used it in the first place.

Your computer has the new UEFI firmware instead of BIOS, and it does not look for boot code in the MBR anymore – instead, it looks for the bootloader file in an "EFI system partition", and the firmware keeps a list of installed operating systems with their respective bootloader filenames. When you choose "Windows Boot Manager" from that list, you're starting \EFI\Microsoft\Boot\bootmgfw.efi from the EFI partition. Similarly, the "ubuntu" entry probably starts \EFI\Ubuntu\grubx64.efi or something similar.

(On Windows, you can access this partition by running mountvol B: /s in the command line.)

For compatibility with older operating systems, however, most UEFI systems are capable of booting in the BIOS way – your boot menu has these special entries for each physical disk, named P1: ..., P2: ..., P3: ... and so on. If you choose the P1 entry, you would start the bootloader stored in the MBR of disk #1.

Boot the Ubuntu installer, and use the efibootmgr tool to list (and delete) broken EFI boot entries:

$ sudo efibootmgr
BootCurrent: 0000
Timeout: 2 seconds
BootOrder: 0000,0005,0001,0006,0007
Boot0000* Linux Boot Manager
Boot0001* EFI Shell
Boot0005* Windows Boot Manager
Boot0006* Hard Drive
Boot0007* CD/DVD Drive

(Optionally add -v to see the actual paths.) To delete option 0005:

$ sudo efibootmgr -b 0005 -B
grawity
  • 501,077
1

You're laboring under BIOS assumptions that no longer apply to your EFI-based computer. As grawity says, boot code on EFI-based computers doesn't reside in the MBR. This means that Windows commands like bootrec /fixmbr no longer work. There are EFI equivalents, but I'm unfamiliar with most of them. One that should work is:

bcdedit /set {bootmgr} path \EFI\Microsoft\Boot\bootmgfw.efi

If deleting the Ubuntu entry using efibootmgr didn't work, though, I have my doubts about bcdedit. Did you by any chance run Ubuntu's Boot Repair tool after installation? If so, it may have juggled boot programs around in an effort to work around bugs in some EFIs. The result is an extra copy of GRUB where the Windows boot loader should be and the Windows boot loader moved to a "backup" location. In this case, you should run Boot Repair again, select its Advanced menu, and locate the option to restore backed-up files. (I don't recall the exact wording of this option.) When you run this option, the Windows boot loader should be restored to its original location.

Another thing you could try is the USB flash drive or CD-R version of my rEFInd boot manager. This may be able to locate the Windows boot loader in some strange location and get you booted. You should then be able to juggle the files manually, use Windows tools to re-install the Windows boot loader, or install rEFInd to your hard disk.

The worst-case scenario is that your failed Ubuntu install has accidentally trashed the Windows boot manager, or maybe even the entire Windows installation. You can check this out by looking for the Windows boot loader files (such as bootmgfw.efi) on the EFI System Partition, which is normally /dev/sda1 or /dev/sda2 under Linux. Use a partitioning tool to examine your partition table and look for Windows partitions. If there are none, Windows is gone and you'll have to re-install everything from scratch. If you've got valuable user data and you suspect this is the case, stop using the disk immediately and use PhotoRec or something similar to try to recover your files. Be prepared for some losses in this worst-case scenario, though.

Rod Smith
  • 22,290
1

Try using EasyUEFI to move the entry of "Windows Boot Manager" to the top of the "Boot order" list.

If this doesn't work, I suggest doing a Repair Install to fix your current installation while preserving user accounts, data, programs, and system drivers.

For detailed instructions see : How to Do a Repair Install to Fix Windows 7.

To create a Windows 7 SP1 boot DVD from your current Windows 7 DVD :
How to Slipstream Windows 7 SP1 and Updates to Create a Bootable USB, Installation DVD, or ISO File.

harrymc
  • 498,455
0

pop in your windows install disk and boot from that disk. Then select repair automatically, it will repair the EFI system partition automatically.

I found that out after fighting with my arch linux/windows 7 dual boot in EFI for about 4 hours trying to get windows to boot back up.

It should repair your EFI system partition configuration with ease.