Click to See Complete Forum and Search --> : repair mbr ?


anton
09-23-2001, 09:35 PM
Hello,


well, it froze again, I had to reset computer again, and now my mbr corrupt :( ... is there any way to repair mbr/ reinstall lilo ? ... i tried booting via loadlin , but couldn't, b/c it doesn't see my ata 100 drives :(

try to boot into "rescue" mode via CD, but it seems not to allow u to install lilo :(

p.s. I'm using mandrake 8.0 ...

thx

Nalle
09-24-2001, 02:30 AM
Well, it's not all that difficult, and this methode should make it possible to restore mbr under allmost any sircumstanses:

You need:

- A bootdisk for your favourite Linux OS
(or a one-disk-distro of some kind)
- A bootdisk for DOS 5 or newer (Win95/98 is fine)


I've found that I sometimes get problems just running lilo if I'd screwed up my mbr, so I flush DOS' mbr first, then I run lilo, and that works.

Now, first - the easy way - just flushing a new lilo (that could not work if your mbr is seriously screwed).

Boot with your linux bootdisk adding the parameters:

mount root=/dev/hdXY

How to add the parametres varies a bit from distro to distro, so there I have to ask you to look in your distro's documentation.

On Slackware (that I use), you simly add it on the lilo prompt, when booting the diskette, and i suppose yo can do that with most of distros?!

Where XY represent the harddisk/partition that '/' is on (e.g. /dev/hda2).

Once you've logged in, you run lilo and reboot again.

Now for the sure way:

First you boot from a DOS diskette.

Run 'fdisk /mbr'

Reboot with your linux bootdisk (or the one disk distro), using the parametres as mentioned above.

Flush lilo as is also described above.

NB! Do not forget to fix the problem causing your mbr to get screwed in the first place *smile*.


</nalle>

[ 24 September 2001: Message edited by: Nalle ]