LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Restoring LILO (https://www.linuxquestions.org/questions/linux-newbie-8/restoring-lilo-61894/)

Lai 05-26-2003 11:04 AM

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.

manthram 05-26-2003 11:11 AM

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

Lai 05-26-2003 01:16 PM

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.

manthram 05-26-2003 01:35 PM

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.


All times are GMT -5. The time now is 11:01 AM.