Click to See Complete Forum and Search --> : I killed lilo, how do i reinstall it???


grasshopper
12-21-2000, 05:10 AM
Well, I can't boot lilo, it goes straight to windows. All my Linux partitions are still there. Just can't get there!

HELP !!!!!!



------------------
grasshopper

Ardith
12-21-2000, 04:26 PM
If you made a boot disk when installing Linux, it should boot to your Linux partitions. From there it should be possible to reinstall LILO. You'll have to ask somebody else how to do that, though, 'cause I don't know how.

furrycat
12-22-2000, 01:36 AM
As a last resort, search this forum for the other times I've answered this question. A better solution is the following. I'll assume you haven't installed a custom kernel or anything simply because making that assumption lets me further assume that you should be able to successfully boot your system from the boot disk / bootable cd.

Insert the boot disk / cd and at the lilo prompt type "linux root=/dev/hda2" or whatever. Replace hda2 with your real root partition. Replace linux with a valid kernel name from the disk / cd (to find out the valid names just press tab at the lilo prompt). On Slackware "vmlinuz" or "mount" is what you want. On Red Hat you might try "expert".

Once the system is up run "lilo" and you should be fine.

If your boot cd doesn't give you a shell try doing "linux root=/dev/hda2 init=/bin/bash". You'll start up with an init prompt (it's actually bash). From here you need to remount your filesystem read-write and run lilo:

mount -o remount,rw /
lilo
mount -o remount,ro /

If your shell complains that it can't find mount use the full path /sbin/mount or "export PATH=/sbin:$PATH".
The read-only remount is important - read on. The next step is either to reboot or run "exec /sbin/init" - up to you. I recommend the latter for two reasons. 1 because you learn a lot by doing it and 2 because Unix geeks would rather have a red hot poker jammed up their backside than lose system uptime unnecessarily.
Or at least the ones I know would. Perhaps I'm hanging around with the wrong people.

Anyway, I digress. If you reboot the read-only remount is important because the filesystem won't be marked as dirty and you'll be saved an fsck on next bootup. If you call init the remount allows your startup scripts to do the fsck (you can only fsck an unmounted or read-only mounted filesystem unless you are very brave / stupid).

furrycat
12-22-2000, 01:39 AM
Phew! Mozilla didn't show me the confirmation page and when I backed up my typing was gone. Luckily it DID make it through.

grasshopper
12-22-2000, 03:31 AM
Thanks guys...

here is what i did.

I did a fdisk /mbr from dos.

I tried to boot from a floppy, but it would not allow me to get out of the install shell. So I reinstalled the packages from before and did the lilo thing. It was ok with me to wipe the partitions beacuse I had just redone linux a day or too ago!

I am going to make a boot floppy tomorrow! Just in case!



------------------
grasshopper

Ardith
12-22-2000, 04:23 PM
Okay... that'll work too. http://discussions.linuxplanet.com/smile.gif