Adsense 1

Saturday, August 24, 2013

My experience recovering Windows 8 boot loader

This is in continuation of my experience trying to install Windows 8 with Ubuntu and my EasyBCD2.2 installation overwrote MBR. I wasn't able to boot into Windows 8 at all; all i had was two Windows 8 options shown by EasyBCD2.2 and neither worked.

Here i am writing down all the methods i used "as is". Please be cautious when trying out these as you may end up losing everything (i had a copy of my data elsewhere so did not worry too much). At this point i was ready to explore all options to recover Windows 8 so i could learn the methods along the way and use them for future issues. There may be other easy methods or advanced commands that could be used in this situation but i am not exposed to those (I am from Linux world!)

Recovery attempt through UEFI BIOS

First thing i tried was to see if i can do something from the BIOS. I have worked on different BIOSes over the past years still UEFI was little different. Here we could define the OS booting file from BIOS directly; none of the older BIOSes i have worked with had this feature. Below are some intuitional trials done by me in BIOS.

Points to note before doing this:
1. In UEFI you can add entries for multiple OSes - each pointing to a specific EFI file from a bootable partition
2. I didn't disturb the EFI boot partition when i installed Ubuntu so i assumed all boot files will be there.
3. When i selected boot files for an entry i could see three partitions in the list but i selected the boot file only from first partition since i knew it was the EFI boot partition (usually this partition will have a EFI directory under which all boot files are stored. These settings may differ if you had customized the location or removed/altered boot partition.

Now for the actual entry in BIOS - in the bios menu under boot order option you can see the entries already present. You can choose to retain existing entries or remove them to avoid confusion. For each trial I removed the existing entry for windows and created a new entry with new name (say windows, Windows trial etc.) and selected one of the bootx64.efi/bootmgfw.efi/bootmgr.efi files from the boot disk (Disk0 in my case). In earlier BIOSes if bootloader/MBR is corrupted you cannot boot into any OS; with UEFI to boot into second OS you can hit F12 to create temp boot menu and select the second OS. I always kept Windows as first boot option so i hit F12 and selected Ubuntu manually whenever i wanted to use Ubuntu.

Trial 1:
Tried to reset the BIOS to defaults, recreated the Boot entries for Windows 8 and Ubuntu. Ubuntu worked. When i selected Window 8 EasyBCD's menu showed up.

Trial 2 to N: Multiple unsuccessful trials. Couldn't keep the count :)
Hoping that EasyBCD would have kept a copy of the boot file in the boot partition, I tried creating new entries for Windows 8 by selecting various bootx64.efi files available in the boot partition (under EFI/Boot, EFI/Microsoft/Boot). I tried all bootx64.efi, bootmgr.efi and bootmgfw.efi files i could find in the partition. Nothing worked; all i got was EasyBCD2.2's boot screen (that doesn't load Windows in my system)

After several tries i understood that apparently EasyBCD2.2 had overwritten windows boot files. Note I also tried removing Ubuntu entries from UEFI and recreated it. I could boot into Ubuntu, through UEFI boot menu (by hitting F12), and use it all the time. This is to ensure if the entries i put in actually work.


Recovery attempt through Ubuntu

From Ubuntu, browsing internet, i tried some suggestions and tools to fix the windows 8 boot problem. After trying several choices in boot-repair tool i gave up. This trial was a mere test to see if boot-repair would restore the original Windows 8 boot files. As I expected it didn't work though boot-repair created a boot menu with all Windows EFI files available in the boot partition (obviously none of them worked ie., displayed EasyBCD2.2 menu)

The only choice i had at this point was to boot from a Windows 8 installation CD and do a restoration of boot files by running bootfix commands.

No comments:

Post a Comment