LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Clobbered MBR ? (https://www.linuxquestions.org/questions/linux-software-2/clobbered-mbr-7960/)

rovoreed 10-26-2001 06:36 AM

Clobbered MBR ?
 
Somehow I have managed to clobber my hda drive.

When I boot all I get is...

LI

... presumably part of the LILO prompt, and then the PC just locks up.

My rescure floppy is giving seek errors and won't boot :-(

The good news is, I can boot the original distribution CD in "rescue mode" and can get a shell up. I can then mount hda and it seems OK. Well, there's lots of files there, and I don't seem to get seek or data read errors.

The problem is, where do I go from here? I can't run lilo because it says there is no /dev/hda device. Also I can't run e2fsck (same reason ?)

How do I create a /dev/hda device ? and will that solve my problems ?

Ultimately what I want to know is, how to make this drive bootable again. Any advice in simple steps please.

Thymox 10-26-2001 07:31 AM

If you're not too worried about re-installing your Linux distro (either you want to get rid of it, or you have no data that is vital and needs to be kept) then try and boot from a Windows Boot Floppy (preferably the same version of Win on the floppy as you're dual booting with (are you dual booting?), i.e. if you're using Win98, don't boot from a Win95 bootdisk) and type fdisk /mbr. This should restore your MBR back to the previous version (which hopefully is the one that boots Windows and Windows only). After this, you can go about re-installing.

Obviously, this is the most basic repair. I'm in no way advocating that you should not try other methods first if you feel comfortable with them. There are plenty of other threads on this website about MBR problems. Here's a link to 'MBR' search. They're sorted into order of replies (largest first).

webtoe 10-26-2001 07:38 AM

try posting your lilo.conf file (i know that might be a tad difficult)

if you can use your rescue disk to get at your lilo.conf an fix the problem then you need to do the following to get lilo to run.

as root go to /sbin and type
Code:

lilo -r /mnt/hda
replace /mnt/hda with whatever you named the place where you mounted your linux drive. this will tell lilo to pretend that the /mnt/hda folder is the root folder and all directory paths (in config files and in the program itself) will be referenced from here instead of the boot disk's virtual file system you are using at the moment.

you should see the normal lilo thing going

added dos *
added linux

etc.

HTH

Alex

P.S. if you can post your lilo.conf
P.P.S. try searching the forum, i think this has happened before

Thymox 10-26-2001 08:06 AM

If you can boot into Windows, then you might want to try downloading this. It will allow you to view Linux partitions from within Windows. Do not under any circumstances use the current version of explore2fs to write to your ext2 partition as this is still under development.

rovoreed 10-26-2001 08:22 AM

Yippeee !

Thanks to "webtoe" I'm up and running again.

This was a Linux only system, no Windows, and 3 partitions, /boot, / (root) and /usr.

You can't imagine my relief.

Now to do a backup (Quick)

Thanks again.

webtoe 10-26-2001 12:49 PM

glad to be of service

(i spent 1 hr yesterday tring to get lilo to do that after i trashed the MBR)

Alex


All times are GMT -5. The time now is 04:09 PM.