Fedora MBR

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.

bootrec /fixmbr

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 😀

Advertisements

Leave a Reply

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

WordPress.com Logo

You are commenting using your WordPress.com 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 )

Google+ photo

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

Connecting to %s