Context: Missing or corrupted Master Boot Record (or MBR) can and usually will prevent the
Problem: Having botched a Linux installation, the Master Boot Record (MBR) was destroyed. To recover and boot the computer again, the MBR must be restored to work order.
Constraints:
Details: Installing Fedora 9 Live CD to an Dell Latitude C600, I didn't allow enough room for the Live CD install (I misremembered options for a selective install.) Additionally, a previous GRUB installation on the Master Boot Record was not clean off before installation started. Near the end of the installation, an error occurred (out of space.) The result was a damaged MBR record. The exact cause of the damage was not known.
Solution: Restore MBR from
Note!: This was a "long shot" action on my behalf and thus poses a risk on your behalf. The contents of the file mbr.bin were a guess on my part as was application of dd. While this works, you should know that your results may vary greatly. Use these instructs only as a last resort!
References:
Disclaimer:
This solution worked for me. It may or may not work for you. I am not responsible for your actions nor the your results of your actions should you act on what you read here. I do not claim expertise in this very specific area and only convey my experience. There is no warranty on this (and most) free information.
Problem: Having botched a Linux installation, the Master Boot Record (MBR) was destroyed. To recover and boot the computer again, the MBR must be restored to work order.
Constraints:
- No floppy drive
- BIOS doesn't support USB booting
- CD ROM limited on ability to read different CDs
- Windows booted from the MBR directly so I could not use Microsoft's fdisk
- Lilo was not found on the Fedora 9 Live CD
- Grub-install on the Fedora 9 Live CD did not function according to expectation
Details: Installing Fedora 9 Live CD to an Dell Latitude C600, I didn't allow enough room for the Live CD install (I misremembered options for a selective install.) Additionally, a previous GRUB installation on the Master Boot Record was not clean off before installation started. Near the end of the installation, an error occurred (out of space.) The result was a damaged MBR record. The exact cause of the damage was not known.
Solution: Restore MBR from
- Boot Fedora 9 Live CD
- Confirm presents of file usr/lib/syslinux/mbr.bin
- Open a Xterm or other shell
- Log in as root or superuser
- Umount the targeted drive partition. In my case:
- umount /sda1
- Write the replace MBR to the drive:
- dd if=/usr/lib/syslinux/mbr.bin of=/dev/sda bs=1
- reboot
Note!: This was a "long shot" action on my behalf and thus poses a risk on your behalf. The contents of the file mbr.bin were a guess on my part as was application of dd. While this works, you should know that your results may vary greatly. Use these instructs only as a last resort!
References:
- http://en.wikipedia.org/wiki/Master_boot_record
- http://support.microsoft.com/kb/69013
- http://linuxmini.blogspot.com/2007/10/restore-grub-in-ubuntu-if-your-mbr-is.html
- http://fedoraproject.org/wiki/FedoraLiveCD/USBHowTo#MBR_appears_to_be_blank.21
Disclaimer:
This solution worked for me. It may or may not work for you. I am not responsible for your actions nor the your results of your actions should you act on what you read here. I do not claim expertise in this very specific area and only convey my experience. There is no warranty on this (and most) free information.