I recently decided to install Ubuntu on my new laptop as a dual boot set up with Windows 7. Shortly thereafter, I started to run into issues with the laptop not going into hibernation correctly and with BSODs randomly. Sure, I could have spent some time sorting these issues out, but I decided I would rather install Ubuntu on a completely separate machine and go about my business. If I continue to run into these issues on my new laptop, then I'll start to troubleshoot in more detail.
I found a pretty straight forward how-to here.
I thought I would be able to make do without a Windows 7 CD and just use the Hiren's Boot CD. Wrong. Sure, I probably did something wrong, and sure, it probably could have been recovered, but I simply couldn't make it work.
So, I decided to contact a friend who I knew would be able to assist in the recovery process. He has his own company maintaining corporate environments in the New Mexico area. He comes HIGHLY recommended for all of your computer needs by the way. You can find him here: http://www.dynamic-i.com/
So down to the nitty gritty:
The issue I was running into: I deleted the partition that Ubuntu was installed on as well as the GRUB partition, as suggested in the above linked how-to. When I went to reboot and repair the Master Boot Record (MBR) with Hiren's Boot CD, nothing was working and I ended up with the following error: No Operating System Found
I scored a copy of a Windows 7 CD and managed to boot to it, but alas, even trying to repair the MBR through the built in repair method, didn't work...after about 15 different tries.
So I took my trusty Ubuntu CD, popped it in, booted to the CD and selected to 'Try Ubuntu without making changes".
At this point, I opened up a Terminal (Applications > Accessories > Terminal) and entered the following:
sudo dd if=/dev/zero of=/dev/sda bs=446 count=1
Note: with the dd command above, the /dev/sda should be the path to the HDD that's having issues. In my case, I only have one hard drive on my laptop. On some machines with multiple drives, it will be sdb or sdc, etc. The easiest way to do this would be to just disable or disconnect the other drives in the system so you don't accidentally do this to the wrong drive. For more on this, scroll to the bottom of this article for other options if you have multiple drives.
Note2: This technique will not work for drives that are in a fake RAID, soft RAID, software RAID, etc. Real/hardware RAIDs will work fine. Apparently, it will just destroy the fake RAID.
This returned the following:
1+0 records in
1+0 records out
446 bytes (446 B) copied, ....
Basically, we just wiped out any hint of the MBR that was there before. This let us basically start from scratch when we put the Windows 7 CD in.
I then shut down the laptop, pulled the Ubuntu CD out, insert the Windows 7 Cd, then booted to the Windows 7 CD and went into the recovery console. At this point, a window came up with:
Windows found problems with your computer's startup options. Do you want to apply repairs and restart your computer?
Select to 'Repair and Restart'.
We wanted to reboot to the CD again once at this point.
Again, we want to come up to the recovery console instead of going through the install process. At this point, we have the option to open up a command prompt, which we did. We wanted to run two different commands as follows:
bootrec /fixmbr
bootrec /fixboot
Reboot the computer and pop out the disc...and voila! Windows should boot right up! At least it did for me. This made me a very, VERY happy individual.
Note2 Continued: There is a disk utility built into Ubuntu which you can use to determine which drive letter to use in the above command line within Ubuntu to wipe the MBR completely. It's called Palimpsest (System > Administration > Disk Utility). With this utility, you can just pick the HDD from the list, and in the right pane, it will show the location.../dev/sdX