LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 05-26-2003, 10:04 AM   #1
Lai
LQ Newbie
 
Registered: May 2003
Posts: 4

Rep: Reputation: 0
Restoring LILO


I had reinstalled Windows XP on my C: drive after reformating that partition only. Mandrake 9.1 is still untouched. It's just that LILO doesn't show up anymore and the computer goes straight to windows.

I've been trying to figure out how to fix LILO and I've been looking at this webpage.

http://www.yolinux.com/TUTORIALS/Lin...dBootDisk.html

I was able to boot from the Mandrake CD and go to rescue. There was an option to re-install Boot Loader. I picked this option. It tried to go through and remount everything automatically and then gave me an error.
The output was something like this:
"About to re-install boot loader....
Added linux *
Added linux-nonfb
Added windows
Fatal: open /dev/hdb1: No such device or address
<Return to Rescue GUI...>"

Because this didn't work, I went to the console and typed in "lsparts" which shows the different partitions which are:
hda1: 20GB NTFS
hda5: 40GB NTFS
hda6: 6GB Ext2
hda7: 500MB Linux Swap
hda8: 11GB Ext2

The website is too confusing for a newbie. Do I still need a floppy if I can boot from the CD and go to linux rescue? What files do I edit to fix LILO?
I can't use http://www.toms.net/rb/ because I use Windows XP and I can't go to dos mode.
 
Old 05-26-2003, 10:11 AM   #2
manthram
Member
 
Registered: Feb 2002
Location: Fairfax, VA
Distribution: RedHat 8, Mandrake9.1, Slack9
Posts: 456

Rep: Reputation: 31
just goto rescue mode and edit '/etc/lilo.conf'

you have installed lilo in the mbr and when you install xp it overwrites the mbr thus removing lilo.

from the partition info you have i see that you have only one drive, but lilo was saying it couldnt find /dev/dhb1 which points to a second drive.

your lilo conf should look like this.


______________________________________________


boot=/dev/hda
map=/boot/map
vga=normal
default="windows"
keytable=/boot/us.klt
prompt
nowarn
timeout=100
message=/boot/message
menu-scheme=wb:bw:wb:bw
image=/boot/vmlinuz
label="linux"
root=/dev/hda6
initrd=/boot/initrd.img
read-only
image=/boot/vmlinuz
label="linux-nonfb"
root=/dev/hda6
initrd=/boot/initrd.img
read-only
mage=/boot/vmlinuz
label="failsafe"
root=/dev/hda6
initrd=/boot/initrd.img
append="failsafe"
read-only
other=/dev/hda1
label="windows"
table=/dev/hda
other=/dev/fd0
label="floppy"
unsafe
________________________________________________

place these lines in the lilo.conf and then execute 'lilo' in the command line and you should be set
 
Old 05-26-2003, 12:16 PM   #3
Lai
LQ Newbie
 
Registered: May 2003
Posts: 4

Original Poster
Rep: Reputation: 0
Thanks for the help. The reason it gave me that error was because I had an extra hard drive plugged in when I was installing Linux. I later removed the hard drive. I put the hard drive back and the error went away and LILO is re installed.

I tried to edit lilo.conf first but lilo.conf wasn't in the /etc folder. I tried doing "updatedb && locate lilo.conf" but this command didn't work. Where could lilo.conf be? It's still not there after LILO was installed. Also how do I edit the file because emacs doesn't seem to work either.
 
Old 05-26-2003, 12:35 PM   #4
manthram
Member
 
Registered: Feb 2002
Location: Fairfax, VA
Distribution: RedHat 8, Mandrake9.1, Slack9
Posts: 456

Rep: Reputation: 31
are you sure you are using lilo. maybe you are using frub. if you are using lilo then the lilo.conf file should be in /etc directory.
 
  


Reply



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
Removing Lilo, restoring to windows boot loader seeker131 Linux - Newbie 7 03-01-2005 05:26 PM
Restoring /boot, lilo problems. Duo Slackware 5 02-07-2005 11:16 AM
Restoring LILO DOA SUSE / openSUSE 3 12-26-2004 09:04 PM
help. . .restoring win2k mark001 Linux - Newbie 7 11-23-2004 07:07 PM
restoring tty0 rock_sg Linux - General 1 05-04-2003 09:16 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 12:14 PM.

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