LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 11-02-2004, 05:13 PM   #1
pirgos_madden
LQ Newbie
 
Registered: Nov 2004
Location: Pirot, Serbia
Distribution: Slackware 10.0
Posts: 6

Rep: Reputation: 0
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.
 
Old 11-02-2004, 05:49 PM   #2
Bruce Hill
HCL Maintainer
 
Registered: Jun 2003
Location: McCalla, AL, USA
Distribution: Arch, Gentoo
Posts: 6,940

Rep: Reputation: 129Reputation: 129
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...

Last edited by Bruce Hill; 11-02-2004 at 05:52 PM.
 
Old 11-02-2004, 10:11 PM   #3
/bin/bash
Senior Member
 
Registered: Jul 2003
Location: Indiana
Distribution: Mandrake Slackware-current QNX4.25
Posts: 1,802

Rep: Reputation: 47
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.
 
Old 11-03-2004, 09:49 AM   #4
pirgos_madden
LQ Newbie
 
Registered: Nov 2004
Location: Pirot, Serbia
Distribution: Slackware 10.0
Posts: 6

Original Poster
Rep: Reputation: 0
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)?
 
Old 11-03-2004, 12:02 PM   #5
gbonvehi
Senior Member
 
Registered: Jun 2004
Location: Argentina (SR, LP)
Distribution: Slackware
Posts: 3,145

Rep: Reputation: 53
"# 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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LILO problem - is my MBR corrupt? mattbenton Linux - Newbie 1 10-31-2005 05:41 PM
problem with lilo and mbr ajk48n Slackware 11 07-13-2005 10:11 PM
Lilo MBR (?) problem powadha Linux - Software 3 12-13-2003 06:47 AM
lilo mbr problem heathpitts Linux - Newbie 3 06-10-2003 11:29 AM
mbr had over write so lilo is gone how to rewrite lilo to mbr mch Linux - Software 4 10-25-2002 02:55 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 07:39 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration