I dual boot my laptop, Windows 8.1 and Fedora, now, and to be honest I get fedup of linux, and remove it from my system, then I get bored of windows and like to re-install Fedora again.
This morning was one of those times, I got fedup of Fedora so booted my machine with the windows 7 CD, went in to rescue mode and fixed the mbr with this command.
Damn I’ve forgotten I’ve left some files on my fedora setup, how the hell am I going to get them back. There are a number of ways to boot fedora, off a usb stick, live cd or some other way, you’d have to google for the ways, but I wanted to know how to rewrite the mbr so that I have the windows and boot options back. This is how I did it.
1, Boot from the Fedora installation cd/dvd
2, Select Troubleshooting
3, Follow all instructions till you get to a prompt
4, At the command prompt type chroot /mnt/sysimage
This next part depends on your setup, it could be /dev/hda or /dev/sda, you’d have to know your own setup.
5, At the prompt type /sbin/grub2-install /dev/sda
Exit and Reboot
Menu back, worked for me 😀