My Experiments with BOOT

This summer I had a lot  of issues with my laptop’s boot configuration. Ultimately I did manage to fix them. Here’s a log.
It started with a simple grub  problem and went on till Partition recovery.
I was using my laptop with a dual boot combination of Windows and Ubuntu 12.10. I upgraded my Ubuntu distribution with the

sudo do-release-upgrade

command. I restart my laptop and as expected the grub menu looked all normal with a couple  options for Ubuntu another couple for memtest and the last one for Windows.  This had happened  before so I booted up my laptop with a  Windows Installation USB . I go to the repair option and in the command prompt type in the usual two commands to fix windows boot  i.e.

bootrec /fixmbr
bootrec /fixboot

I reboot and as expected, the grub loader doesn’t show up and the system boots into Windows. Now I have to recover my Ubuntu.
So I boot up with a live Ubuntu 12.10 live USB. Until now every time I had done this recovery manually following the standard procedure at
But this time I chose to do it another way, I read the next answer and it seemed much more convenient than doing it all manually. [This is probably where I made my first mistake]. I used the boot-repair tool by following a simple set of commands which go as follows:

sudo add-apt-repository ppa:yannubuntu/boot-repair && sudo apt-get update
sudo apt-get install -y boot-repair && boot-repair

I reboot and find that my laptop had gone into a boot loop, with an error message suggesting that my MBR[Master Boot Record] is corrupt. I tried the grub re-installing procedure a couple more times but that didn’t help. Next I booted using my Windows Installation USB and the repair option did not list Windows as an installed operating system. That seemed weird so I rebooted a couple times hoping that it would find Windows. But that didn’t help either. Whenever I have the smallest of glitches I usually go and do a fresh install of the OS, but this time I was determined not to do so [maybe the computer engineer in me woke up :P], and get to the root of the problem and solve it.
Thankfully all along I had my old laptop still working fine. After googling around for about 10 minutes I found someone having a similar problem and a solution sitting right there. So I tried that procedure out. The procedure suggested using the Windows Installation Disk and through the command prompt restore the MBR using the following commands sequentially.

bootrec /fixboot
bootrec /fixmbr
bootrec /scanos
bootrec /rebuildbcd

The first three commands worked fine but the last one gave an error saying The requested system device cannot be found.. After looking around for a while I found out a procedure to do so manually. Using the command prompt of the Windows Installation Disk the following commands rebuild the BCD [Boot Configuration Datastore]

del c:\boot\bcd
bcdedit /createstore c:\boot.bcd.temp
bcdedit /store c:\boot\bcd.temp /create {bootmgr} /d "Windows Boot Manager"
bcdedit /import c:\boot\bcd.temp
bcdedit /set {bootmgr} device partition=C:
bcdedit /timeout 10
del c:\boot\bcd.temp
bcdedit /create /d "Windows 7" /application osloader

copy the GUID string from the output of the last command

bcdedit /set {ee186ddd-20c1-11df-aa50-0022191bf8ff} device partition=C:
bcdedit /set {ee186ddd-20c1-11df-aa50-0022191bf8ff} osdevice partition=C:
bcdedit /set {ee186ddd-20c1-11df-aa50-0022191bf8ff} path \Windows\System32\winload.exe
bcdedit /set {ee186ddd-20c1-11df-aa50-0022191bf8ff} systemroot \Windows
bcdedit /displayorder {ee186ddd-20c1-11df-aa50-0022191bf8ff}

But I had an error at the

bcdedit /import c:\boot\bcd.temp

command. And I found my solution here and the rest of the commands worked like clockwork. I reboot and my laptop boots up directly into Windows. So now it’s time was to revive my Ubuntu. I boot up into my live Ubuntu USB and to my surprise, the partition containing Ubuntu earlier is empty. I re-install Ubuntu and restart now there is no boot option, not even the grub menu which is supposed to come up after an Ubuntu install.
I try to to rebuild BCD using the above procedure but that didn’t help. I tried an alternative way and used the

diskpart : clean

command on my main hard drive hoping it would erase my MBR, but it did more than that, it erased my Partition table. This is where I panicked. I used a live Ubuntu USB to recover my Partition table. I looked it up over the internet and found a tool called TestDisk. Overnight I managed to recover my partitions.
So I gave up repairing the problems and decided to go for a clean install and to my dismay that didn’t work either. After clicking on the Install option in the Windows Installation procedure the following error message showed up

A required CD/DVD Device driver is missing

. Forums suggested various things and I tried all of them.
The first suggestion was to use the USB 2.0 ports instead of the USB 3.0 ports. Next enabling the AHCI mode in the Boot options for SATA configuration.
Others suggested something about the UEFI boot options but nothing worked. The only other possibility the blogs suggested was that there was a problem in the Windows ISO. So I downloaded another one but that didn’t help either, so I burned one of them on a DVD and that worked. So finally I have my system loaded with an OS. I boot in and no devices are detected, including USB, LAN and WLAN. Now all my drivers are on my hard drive and I have no way to get the driver on my system. That’s where my live Ubuntu USB came to my rescue. I transferred the drivers on a local drive and now its all working again but I’m still hesitant to install Ubuntu again.


One thought on “My Experiments with BOOT

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s