Problem with LILO and MBR
Well.........I have Slackware 10.0 installed on one partition and two FAT32 (with win98) partitions. Few days ago I formated C partition and offcourse deleted LILO in MBR. I have Slack CD#1 but when I boot system with it I can't boot anything else except default kernel (which is on disk) and when I get console and type for example #lilo -v I receive message "Unknown command". I also have Knoppix (live CD) and when I try to mount / on /mnt/hda2 (root partition) I receive message "Not a valid block...." and so .... I will be very gratefull to someone who help me.
|
Boot with the Slack CD1 and at the boot: prompt enter
bare.i root=/dev/hda2 noinitrd ro which is your Slack / (root) partition. Then su to root and issue "lilo" and that will restore it to your MBR. Edit: and then reboot... |
The KNOPPIX cd should also work. I use KNOPPIX as a rescue disk all the time. You could boot KNOPPIX then mount your Slack partition and run lilo on it. Something like this:
mount /dev/hda2 /mnt/hda2 /sbin/lilo -r /mnt/hda2 That may work, or this: mount /dev/hda2 /mnt/hda2 chroot /mnt/hda2 /sbin/lilo exit Of course I don't think you can mount it to / because KNOPPIX probably already has a ramdisk device mounted there. |
Thanks, it worked! I just did Chinaman's solution ( I didn't try /bin/bash's suggestion but thank you very much too):
# bare.i root=/dev/hda2 noinitrd ro # lilo and recived message: #Add Windows #Add Linux # and that's all. Now if you want, can you exactly explain me what I have just did (including /bin/bash's suggestion)? |
"# bare.i root=/dev/hda2 noinitrd ro" - This line is telling LILO (LInux LOader) to boot using bare.i kernel (which is on the CD) and as root disk use /dev/hda2 which is your harddisk. noinitrd tells it to not load a special ramdisk used to load modules which are not compiled into the kernel (this can and sometimes must be ommited) and finally you're telling to mount that root disk as read-only.
"#lilo" - Runs lilo (LILO) using the file /etc/lilo.conf (this is all from your hard-disk since you used it as root) and installs it, this is the default behaviour, to read /etc/lilo.conf and install lilo using that config file. |
All times are GMT -5. The time now is 03:06 PM. |