PDA

View Full Version : Possibly need to fix my MBR, help



optV
20th November 2005, 11:36 PM
Well I've got an interesting problem, I've been sucessfully using FC4 on my toshiba portege 4010 laptop for a couple weeks now. I'm fairly new to linux but in those few weeks, I've managed to get my wireless working almost flawlessly, ACPI nearly perfect, even got the modem working and could burn and play dvds no problem. In other words everything was smooth and solid...finally. Last night I burned a dvd using k3b with no problems as usual, then I shut down my pc using "shutdown -h now" everything seemed to shutdown nicely (no failed kills, etc).

This morning I started up my laptop and almost instantly (just after the post) "DISK BOOT FAILURE, INSERT DISK AND PRESS ENTER." The first thing I thought was that the hard drive was toast. I've seen the exact same brand hard drive (IBM Travelstar) fail in another laptop and it was clicking like crazy, luckily mine wasn't. I checked to see if any media was in my cd drive, nada.

The next thing I did was check all my bios settings and they seemed the same as before. I swapped the boot order so the the HDD was first, same error.

I eventually tried botting from the FC4 rescue cd and it almost instantly found my linux installation and mounted it! This was very relieving. The files all seem to be there and fine. I think its the MBR, could that be corrupt? I saw a similar thread where someone mentioned the following fix, but I wanted some opinions before trying it:

"
command line in rescue cd:
Type chroot /mnt/sysimage
Then issue the command:

dd if=/dev/zero of=/dev/hda bs=512 count=1

Where hda is the partition with mbr.
"

any ideas

sailor
21st November 2005, 02:30 AM
I would go with the following to re-install grub on your MBR:
1.- Boot from first FC CD or use the RESCUE CD
2. - type "linux rescue"
3. - rescue program will find your FC linux partition and mount it to /mnt/sysimage
4. - type chroot /mnt/sysimage
5. - type grub-install /dev/hda (this command install grub on MBR of the first HD)
6. - type exit
7. - hit ctr-alt-del to reboot your linux box

optV
21st November 2005, 05:40 AM
I would go with the following to re-install grub on your MBR:
1.- Boot from first FC CD or use the RESCUE CD
2. - type "linux rescue"
3. - rescue program will find your FC linux partition and mount it to /mnt/sysimage
4. - type chroot /mnt/sysimage
5. - type grub-install /dev/hda (this command install grub on MBR of the first HD)
6. - type exit
7. - hit ctr-alt-del to reboot your linux box

Sailer, I can't thank you enough! It worked like a charm. Any ideas on how it might have gotten messed up in the first place?

The ONLY time I ever had to do an unclean shutdown was a few days ago, when resizing a xine window while it was playing a DVD, and a bunch of other programs open. It froze solid with an odd blue screen and wouldn't budge, ctrl -alt-backspace, ctrl-alt-f1, ctrl-alt-del, none of it worked, so I was forced to hard restart and it came back up fine. After that everything was cool, even after multiple soft restarts.

Any advice incase something like that happens again?

giulix
21st November 2005, 10:35 AM
Check your boot media for windoze viruses. They like to mess up the MBR...