LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   WinXP cleared my MBR! How can I get Lilo back? (https://www.linuxquestions.org/questions/slackware-14/winxp-cleared-my-mbr-how-can-i-get-lilo-back-55918/)

SoSlack 04-20-2003 05:05 AM

WinXP cleared my MBR! How can I get Lilo back?
 
I was using WinXP and Slack9.0 before i reinstlaled my WinXP.
Now my MBR with lilo is cleared.
How can I get back Lilo on my MBR with Slack9.0
Thanks.

bynaar 04-20-2003 06:55 AM

boot your linux system , trough a floppy or the install CD.

csDraco_ 04-20-2003 07:42 AM

once you boot that disk or CD, mount your /dev/hdaX (X being your root linux partition, in my case it's hda5) by typing:

mount root=/dev/hdaX

and dont forget to run lilo, bacause this is what restores lilo in your MBR ... and youre done :)

lilo

SoSlack 04-20-2003 09:59 AM

ok. I tried doing that after using the cd to boot bare.i
i get this error:

mount: cant find root=/dev/hda7 in /etc/fstab or /etc/mtab

and i dont haev a floppy drive too boot from. I tried booting from cd but how can i install LILO again on the mbr without and HD formatting at all?

1_8_7 04-20-2003 10:14 AM

If im reading what you wrote correctly at the end, then you can't install on a HD that is not formatted for linux. Boot from the cd and run cfdisk and make your linux swap and linux partitions and intstall slackware, installing LILO in the mbr and your fine. Hope this helps, if i have even read your post correctly :)

SoSlack 04-20-2003 10:23 AM

OK..i actually have Linux installed on my computer already.
It's just that I cant boot to Linux again because:
1. I dont have a floppy drive, hence I cant boot from floppy
2. MBR with Lilo has been cleared by WinXP.

This is my HD structure:
/dev/hda1 = NTFS
/dev/hda5 = FAT32
/dev/hda6 = SWAP
/dev/hda6 = EXT3 (/)
/dev/hda7 = EXT3 (/usr)
/dev/hda8 = EXT3 (/home)

So now I have a Slackware 9.0 cdrom and I do not want to reinstall Slackware software into my HD. The question is:
How can I reinstall LILO on my computer using Slackware 9.0 cdrom. I cant reconfigure my linux system (in setup) without having to install the / system again.

Any suggestions?

Proud 04-20-2003 10:30 AM

Find a distro cd like Mandrake's with a Rescue > Restore Lilo option when you boot it? :)

Edit: You sure you used a correct mount command? Doesnt it need a target folder which you're mounting it as?

mount t ext3 /dev/hdb6 /

SoSlack 04-20-2003 10:34 AM

There has to be another way with Slackware 9.0

csDraco_ 04-20-2003 10:58 AM

And there is ... I'll boot from the Slack 9 CD and give you more precise directions :)

I'll be back.

X_shadow_X 04-20-2003 11:43 AM

try this then you bot from cd
bare.i root=/dev/hda6 noinitrd ro (/dev/hdaX X - must be yours root, not users )
login as root
later in CL write liloconfig
(you can use automatic configuration, after it write lilo if you dont get any errors reboot )

hope this heleps i am a newbie :)
sory for english

csDraco_ 04-20-2003 11:44 AM

As soon as you get to the first prompt, when booting your Slack 9 install CD, type this: "bare.i root=/dev/hdaX noinitrd ro". This should boot your slack distro thats on your drive, once it does run the "lilo" command to restore lilo in MBR. I hope this works for you ... but you might get a "no init found" error. I'm posting this using lynx in console, so forgve me for the format of this reply (after "fixing" my fonts I see only squares for letters in my brawser and everything else KDE) Any way I might not be back for some time, but I know there is still one more way of restoring lilo in your MBR: booting with any linux kernal (CD, dickette, network) and runing lilo with a fev parameters teling it to use /etc/lilo.conf on your /dev/hdaX instead of the one on the boot medium or rather your temp ram drive. ... hope this method helps if the first one does not :)

SoSlack 04-20-2003 07:13 PM

Thanks! I got LILO back now!

2damncommon 04-20-2003 07:29 PM

Good replies, X_shadow_X, and csDraco_.
Luckily Slackware still does make booting the installed system from the install CD easy.
Gave this advice to a Red Hat user recently, and found that in Red Hat you need to go to the rescue system on the CD and 'chroot' to the main system.
Seem like an unnecessary step(s) to me.

frieza 04-20-2003 08:22 PM

hmm, does slackware have the mkbootdisk command? once you get your system up and running i'd reccommend you use that and a blank floppy, that way you have a rescue disk in case of an emergency (especially the microsoft brand of emergency :D)

csDraco_ 04-21-2003 10:30 AM

Glad to be of some help :)

Hope you enjoy your distro :)


All times are GMT -5. The time now is 12:17 AM.