Problem with lilo.

Discussion regarding the installation and configuration of Linux distributions.

Problem with lilo.

Postby barlas » Sat Aug 30, 2003 5:52 pm

AOA!
I was using win98 with redhat 9, with grub as a boot loader. I didn't installed swap memmory, so i reinstalled linux with formatting my linux partition, this time choosed lilo as a boot loader. Now when my computer starts it boots directly to win98 and there is no option to go to linux. Due to problem with floppy drive i was not able to make boot floppy. Plz tell me what should i do now?
The summary is:

1.Choosed lilo as boot loader.
2.Installed it on Master Boot Record.
3.Choosed win98 as default OS.
4.Didn't made boot floppy.
5.Now it boots directly to win98, and no option to choose from win98 and redhat.
Aqeel Zafar
barlas
Naib Subedar
 
Posts: 315
Joined: Mon Jun 30, 2003 11:07 am
Website: http://aqeeliz.com
Location: Lahore, Pakistan

Postby Faraz.Fazil » Sun Aug 31, 2003 4:26 am

It appears as though you didnot specify the correct bootloader options in linux.

You should have made sure that Two Tab Entries, one for windows and one for linux was listed with the corresponding /dev/hda devices

Anywaz, now boot from the linux cdrom, and start in rescue mode by typing linux rescue

After the system has beem mounted do a

chroot /mnt/sysimage

then edit the /etc/lilo.conf file using any editor like joe,vim or emacs

There will be the config for the OS's

Make sure there is one for linux with the correct kernel and /dev/hda device specification.


here is a sample /etc/lilo.conf file for you:
========================
boot=/dev/hda
map=/boot/map
install=/boot/boot.b
prompt
timeout=50
default=Linux

image=/boot/vmlinuz-2.2.14-5.0
label=Linux
read-only
root=/dev/hda9

other=/dev/hda8
Label=Windows 98

============================

Note that your /dev/hda Numbers will be different.Just use the above as a reference.Use your own hda numbers and other related stuff.Use the fdisk -l command to get the hda location of the desired partitions.

Once u have edited and saved lilo.conf, run a /sbin/lilo and reboot.
If all goes well, u will be able to boot any OS of your choice from the lilo menu on startup.

If nothing works, you may have to reinstall linux and chose a grub configuration that was known to work with your box.

Also if u would like to give installing grub a try in the existing scenarios, read my article on installing grub on the wiki.
Last edited by Faraz.Fazil on Sun Aug 31, 2003 11:14 am, edited 1 time in total.
Faraz.Fazil
Major General
 
Posts: 1024
Joined: Thu Jul 04, 2002 5:31 pm
WLM: faraz7476@hotmail.com
Location: Karachi/Pakistan/Earth/Universe

Postby newbie » Sun Aug 31, 2003 5:13 am

after the procedure of faraz fazil

one last thing

type /sbin/lilo

to write it to mbr.
newbie
Company Havaldaar Major
 
Posts: 156
Joined: Thu Aug 08, 2002 4:18 am
WLM: usman_fool@hotmail.com
Location: lahore

Postby Faraz.Fazil » Sun Aug 31, 2003 11:12 am

Thanx for pointing that.
In a hurry, i forgot to mention that.

newbie wrote:after the procedure of faraz fazil

one last thing

type /sbin/lilo

to write it to mbr.
Faraz.Fazil
Major General
 
Posts: 1024
Joined: Thu Jul 04, 2002 5:31 pm
WLM: faraz7476@hotmail.com
Location: Karachi/Pakistan/Earth/Universe

Postby barlas » Sun Aug 31, 2003 5:55 pm

the file /etc/lilo.conf was empty, i entered all the details you posted by changing all hdax(x is a number) to my hard disk's number. then i used type /sbin/lilo but the message appeared file not found.
Now what should i do. reinstall it or anything can else can be done. waiting for your reply
Aqeel Zafar
barlas
Naib Subedar
 
Posts: 315
Joined: Mon Jun 30, 2003 11:07 am
Website: http://aqeeliz.com
Location: Lahore, Pakistan

u may had used grub last time

Postby farhanksa » Sun Aug 31, 2003 8:45 pm

try vi /etc/grub.conf


u may have used grub last time :)
farhanksa
Subedar
 
Posts: 359
Joined: Sun Nov 03, 2002 6:40 am
ICQ: 116765501
WLM: farhan12@msn.com
Yahoo Messenger: commdsl@yahoo.com
Location: Lahore

Re: u may had used grub last time

Postby Faraz.Fazil » Sun Aug 31, 2003 9:19 pm

well,/etc/grub.conf that is the config file for grub.

He clearly stated that he installed lilo and not grub.

Therefore he should edit the /etc/lilo.conf file as i stated before.

Also as i said before, even at this point he can give installing grub a try as explained in my article at the wiki:

http://www.linuxpakistan.net/wiki/index ... lling-Grub

So he now has two options:

1.To repair his lilo.conf file and run sbin/lilo as explained earlier.

or

2.Install Grub, as explained in my article.
Ofcourse the grub packages need to be present for that.

farhanksa wrote:try vi /etc/grub.conf


u may have used grub last time :)
Faraz.Fazil
Major General
 
Posts: 1024
Joined: Thu Jul 04, 2002 5:31 pm
WLM: faraz7476@hotmail.com
Location: Karachi/Pakistan/Earth/Universe

Postby newbie » Mon Sep 01, 2003 1:43 am

there is another tricky thing

when u install grub as your bootloader then lilo's config file is saved as /etc/lilo.conf.anakonda

rename it to /etc/lilo.conf
make changes in it
then run
/sbin/lilo
newbie
Company Havaldaar Major
 
Posts: 156
Joined: Thu Aug 08, 2002 4:18 am
WLM: usman_fool@hotmail.com
Location: lahore

Postby Faraz.Fazil » Mon Sep 01, 2003 8:53 am

Thats strange.
Looks like your system's settings are messed up or u are entering some wrong settings, since u are building lilo.conf from scratch

Does fdisk -l report ur parttions correctly?

Do a locate lilo.conf
Open and check/edit the contents of any lilo.con file it shows.Also check if u have /etc/lilo.conf.anaconda

Try giving lilo different paramaters.

Normally running lilo should show something like:

Added linux
Added Windows *

try /sbin/lilo -v (in case you're interested)

Also note that the image=vmlinuz-XXX should have a correct kernel entry.
image=/boot/vmlinuz-2.2.14-5.0 was just an example.

Do a locate vmlinuz

and enter the appropriate krnl image u have.

I suspect that u are entering some wrong settings, since u are building lilo.conf from scratch

If nothing works, try giving grub a try.

As a last resort, u may have to reinstall linux.
barlas wrote:the file /etc/lilo.conf was empty, i entered all the details you posted by changing all hdax(x is a number) to my hard disk's number. then i used type /sbin/lilo but the message appeared file not found.
Now what should i do. reinstall it or anything can else can be done. waiting for your reply
Faraz.Fazil
Major General
 
Posts: 1024
Joined: Thu Jul 04, 2002 5:31 pm
WLM: faraz7476@hotmail.com
Location: Karachi/Pakistan/Earth/Universe

Postby barlas » Wed Sep 03, 2003 9:13 am

I did locate lilo.conf but some mesasage appeared like "Could not locate...."
Then i tried locate vmlinuz and a long message appeared similiar to previous one. I then tried to edit lilo.conf but i was again empty and New File was wriiten on first row that vanished as soon as I touched the keyboard.
I think I have done something really wrong. If you understand what is wrong then tell me what to do. Or If I reinstall linux what do I choose lilo or grub.
Aqeel Zafar
barlas
Naib Subedar
 
Posts: 315
Joined: Mon Jun 30, 2003 11:07 am
Website: http://aqeeliz.com
Location: Lahore, Pakistan

Postby cwackked » Wed Sep 03, 2003 10:21 am

Youll have to be more specific...could not locate what?..what was the error message?.. what editor were u using? Are u sure the problem doesnt lie somewhere there?
-umer
cwackked
Lance Naik
 
Posts: 33
Joined: Sat Aug 30, 2003 7:23 am
Website: http://desimart.net
WLM: cwackked@hotmail.com

Postby Faraz.Fazil » Wed Sep 03, 2003 1:14 pm

The lilo.conf is normally under /etc/lilo.conf and the grub conf file is under /etc/grub.conf

The kernel images are normally under the /boot directory like

/boot/vmlinuz-2.4.22
and /boot/initrd-2.4.22.img

Since you are not able to locate the problem, i recommend that you save your time and reinstall linux.Choose grub as the bootloader, and make sure you install it on the correct location i.e on the mbr or 1st sector.That depends on case to case and in most cases , the install on mbr works.

Also make sure it detects both your linux and windows locations, and lists them both in the tab during setup, for example:

====================
Win98 /dev/hda5 *default
Redhat Linux /dev/hda2

====================

barlas wrote:I did locate lilo.conf but some mesasage appeared like "Could not locate...."
Then i tried locate vmlinuz and a long message appeared similiar to previous one. I then tried to edit lilo.conf but i was again empty and New File was wriiten on first row that vanished as soon as I touched the keyboard.
I think I have done something really wrong. If you understand what is wrong then tell me what to do. Or If I reinstall linux what do I choose lilo or grub.
Faraz.Fazil
Major General
 
Posts: 1024
Joined: Thu Jul 04, 2002 5:31 pm
WLM: faraz7476@hotmail.com
Location: Karachi/Pakistan/Earth/Universe

becarefull for next time and make atleast 3 bootable floopy

Postby farhanksa » Thu Sep 04, 2003 1:11 am

aoa
becarefull for next time and make atleast 3 bootable floopy. one u can make at the end of instaltaion and other by going into kde
also by using the command mkbootdisk kernel-version.
floopise mut be formated already through out complete
farhanksa
Subedar
 
Posts: 359
Joined: Sun Nov 03, 2002 6:40 am
ICQ: 116765501
WLM: farhan12@msn.com
Yahoo Messenger: commdsl@yahoo.com
Location: Lahore

Postby Faraz.Fazil » Thu Sep 04, 2003 8:34 am

Yup, making boot disks is indeed a good thing to do.
For example in your case, where the system only booted windows and not linux, you could have used the linux boot disk to boot linux.

Also u can create the boot disks using the dd command and can also make duplicates.
Faraz.Fazil
Major General
 
Posts: 1024
Joined: Thu Jul 04, 2002 5:31 pm
WLM: faraz7476@hotmail.com
Location: Karachi/Pakistan/Earth/Universe

Postby barlas » Thu Sep 04, 2003 9:45 am

I will just reinstall it now. thnx guys for helping me.
Aqeel Zafar
barlas
Naib Subedar
 
Posts: 315
Joined: Mon Jun 30, 2003 11:07 am
Website: http://aqeeliz.com
Location: Lahore, Pakistan


Return to “%s” Installation

Who is online

Users browsing this forum: No registered users and 1 guest

cron