LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 06-01-2003, 04:36 AM   #1
DaDdY SnEb
Member
 
Registered: Jun 2002
Location: Nice
Distribution: SuSE Linux Pro Version: 8.2
Posts: 159

Rep: Reputation: 30
how does LILO work?


ok that question might be stupid bet HEY! I'm a n00b

I wonder how LILO works coz I'd like to install Red Hat and SuSE on 2 different partitions, but when I modify lilo.conf from SuSE and load lilo it says it can't find the image for Red Hat, which is normal since the partition isn't mounted, and even if I do mount it I mound it in /mnt/redhat so even then the image is in /mnt/redhat/boot and not in /boot.

So I'm just wondering, even if I only have SuSE for example, in lilo.conf it says the image is in /boot, so at boot time it has to mount the the root partition before it finds it right? It doesn't copy the image files into the MBR does it...?

/god i feel stupid

Thx!
 
Old 06-01-2003, 04:46 AM   #2
Mara
Moderator
 
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,696

Rep: Reputation: 232Reputation: 232Reputation: 232
LILO needs to have access to the image when you install it. The easiest solution in your case is to mount RedHat partition (/mnt/redhat/boot) and modify the RedHat entry in SuSE lilo.conf to something like this:
image=/mnt/redhat/boot/imagename.img
Then you can install lilo (it will be able to access both images) and you can unmount RH partition. Both distros should boot fine.
 
Old 06-01-2003, 05:22 AM   #3
DaDdY SnEb
Member
 
Registered: Jun 2002
Location: Nice
Distribution: SuSE Linux Pro Version: 8.2
Posts: 159

Original Poster
Rep: Reputation: 30
so that means it does copy the images somewhere?

i tried that and lilo installs fine, but Red Hat doesn't wanna boot, but I think it'd because of something else... dunno what tho... :'( it does start booting Red Hat but it gives an error (Kernal Panic bla bla bla...)

Thx for the answer
 
Old 06-01-2003, 05:28 AM   #4
whansard
Senior Member
 
Registered: Dec 2002
Location: Mosquitoville
Distribution: RH 6.2, Gen2, Knoppix,arch, bodhi, studio, suse, mint
Posts: 3,304

Rep: Reputation: 65
it doesn't copy the images anywhere. lilo installs
itself where you tell it to, and (probably) has pointers
to the disk locations of the kernel images.
the boot entry is where lilo is to be installed,
the root entry is for where that kernel image is
supposed to mount it's root filesystem.
 
Old 06-01-2003, 05:46 AM   #5
DaDdY SnEb
Member
 
Registered: Jun 2002
Location: Nice
Distribution: SuSE Linux Pro Version: 8.2
Posts: 159

Original Poster
Rep: Reputation: 30
is there any command to force lilo to install itself even if there're errors in lilo.conf?
 
Old 06-01-2003, 05:48 AM   #6
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
why on earth would you want to do that????
 
Old 06-01-2003, 06:23 AM   #7
whansard
Senior Member
 
Registered: Dec 2002
Location: Mosquitoville
Distribution: RH 6.2, Gen2, Knoppix,arch, bodhi, studio, suse, mint
Posts: 3,304

Rep: Reputation: 65
just comment out the part of lilo.conf that's messing
things up.
the way things are going this morning, somebody
is probably writing a messed up lilo.conf to a dvd-r, putting
it in a cdrom, and wanting software to read the dvd in
a cdrom drive so they can force install the lilo.conf that
doesn't work.
 
Old 06-01-2003, 06:41 AM   #8
Mara
Moderator
 
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,696

Rep: Reputation: 232Reputation: 232Reputation: 232
Quote:
Originally posted by DaDdY SnEb
so that means it does copy the images somewhere?
No, it doesn't. In fact, LILO installs itselt in MBR. There's no much space - only less than 512 bytes, so it just can't copy a kernel. It needs pointers to kernels, that's why it must have access to them when you install it. LILO works before the kernel is loaded, it's really low-level work.

Quote:
i tried that and lilo installs fine, but Red Hat doesn't wanna boot, but I think it'd because of something else... dunno what tho... :'( it does start booting Red Hat but it gives an error (Kernal Panic bla bla bla...)
Make sure the RedHat entry is OK. You may copy the one from RedHat lilo.conf (and change pathes). I guess it needs initrd, make sure it's configured.
 
Old 06-01-2003, 08:59 AM   #9
DaDdY SnEb
Member
 
Registered: Jun 2002
Location: Nice
Distribution: SuSE Linux Pro Version: 8.2
Posts: 159

Original Poster
Rep: Reputation: 30
So how does it get to the image since nothing is mounted yet???

ok, let's start from the beginning...

Since I've never seen anything else than SuSE I wanted to try Red Hat, so I installed it and also installed LILO but LILO didn't work, don't ask me why. All that appeared on screen at boot time was 99 99 99 99 99 99 99 99 99 99 99 etc... about 7 - 8 lines of them.

So I thought, why not have SuSE and Red Hat at the same time... Reinstalled Red Hat but without LILO, then installed SuSE and modified lilo.conf from there.

I can actually have any of the 2 running, but SuSE boots with LILO from the MBR and Red Hat boots from a floppy disk. You should also know that I've got a RAID 0 with a HighPoint controller, but I've got the drivers for both versions and they do work, the only weird thing is that Red Hat recognises my hard drive as /dev/sda and SuSE as /dev/ataraid/d0p.

Now, this is what my lilo.conf looks like:

Code:
boot = /dev/ataraid/d0
change-rules
    reset
default = Windows
lba32
menu-scheme = Wg:kw:Wg:Wg
message = /boot/message
prompt
read-only
timeout = 100
                                                                                
other = /dev/ataraid/d0p1
    label = Windows
                                                                                
image = /boot/vmlinuz
    label = "SuSE_Linux"
    append = "hdc=ide-scsi hdclun=0 splash=silent"
    initrd = /boot/initrd
    root = /dev/ataraid/d0p2
    vga = 0x317

image = /mnt/redhat/boot/vmlinuz-2.4.20-8
    append = "hde=noprobe hdf=noprobe hdg=noprobe hdh=noprobe hdi=noprobe hdj=noprobe hdk=noprobe hdl=noprobe"
    initrd = /mnt/redhat/boot/initrd-2.4.20-8.img
    label = "Red_Hat_Linux"
    root = /dev/ataraid/d0p3
                                                                                
image = /boot/vmlinuz.shipped
    label = failsafe
    append = "ide=nodma apm=off acpi=off vga=normal nosmp noapic maxcpus=0 3"
    initrd = /boot/initrd.shipped
    root = /dev/ataraid/d0p2
    vga = 0x317
And this is what my syslinux.cfg looks like on the floppy disk:

Code:
default linux
prompt 1
display boot.msg
timeout 100
label linux
        kernel vmlinuz
        append initrd=initrd.img hdc=ide-scsi hde=noprobe hdf=noprobe hdg=noprobe hdh=noprobe hdi=noprobe hdj=noprobe hdk=noprobe hdl=noprobe root=/dev/sda3
When I try to boot Red Hat without the floppy disk it just says:

Code:
Mounting root filesystem
mount: error 6 mounting ext3
pivotroot: pivot_root (/sysroot, /sysroot/initrd) failed: 2
umount /initrd/proc failed: 2
Freeing unused kernel memory: 128k freed
Kernel panic: No init found. Try passing init= option to kernel
[b]And this is why I wanted to force LILO to have /dev/sda3 instead of /dev/ataraid/d0p3

btw, I still don't really understand how LILO works after all that lol
 
  


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LILO, GRUB, no way to get them work... waiser SUSE / openSUSE 3 09-27-2005 04:38 PM
neither LILO nor GRUB work from HD or FD netcrusher88 Linux - Software 1 07-21-2004 01:31 PM
LILO, I can't get it to work, and I have tried! jupitereye Linux - Newbie 10 10-10-2003 04:06 PM
Can lilo work without the lilo.conf file? TheOneAndOnlySM Linux - Newbie 2 10-01-2003 11:19 PM
If my lilo won't work i will kill.... akz Slackware 6 02-04-2003 01:08 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 01:19 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