Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Trouble with configuring LILO
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
Remillard
Apprentice
Apprentice


Joined: 07 Mar 2003
Posts: 200
Location: Irvine, CA

PostPosted: Sun Dec 07, 2003 9:15 am    Post subject: Trouble with configuring LILO Reply with quote

Howdy,

Well I have the kernel configured, and compiled. I've got a few other odds and ends emerged and compiled. I'm trying to create an entry in an existing lilo.conf file but it doesn't seem to be listening to me. Here's my setup:

/dev/hda1 - Formerly a WinXP partition, erased and setup with the gentoo / filesystem. I do not have a separate /boot for gentoo yet. (If this goes well, I'll probably redo things a bit.)

/dev/hda5 - Mandrake Linux 9.2 root filesystem. This is the existing system I've done everything under so far. It mounts /dev/hda1 as /home/gentoo while I've been getting everything set up.

There are other partitions, but these are the ones with kernel images.

So, my Mandrake LILO entry reads:
image=/boot/vmlinuz
label="linux"
root=/dev/hda5
initrd=/boot/initrd.img
append="quiet devfs=mount hdc=ide-scsi hdd=ide-scsi acpi=ht resume=/dev/hda6 splash=silent"
vga=788
read-only

For my Gentoo LILO entry I put in:
image=/boot/kernel-2.4.20-gentoo-r9
label="gentoo"
root=/dev/hda1
read-only
initrd=/boot/initrd-2.4.20-gentoo-r9

As far as I can tell, this ought to look at /dev/hda1 for the /boot/kernel-2.4.20-gentoo-r9 file.

At /sbin/lilo, I get this error:
Added linux *
Added linux-nonfb
Added floppy
Added old_linux
Added old_linux-nonfb
Added 2421-13
Added failsafe
Fatal: open /boot/kernel-2.4.20-gentoo-r9: No such file or directory

I'd really like to keep the kernel in /dev/hda1 with the rest of Gentoo. It looks like it's looking on /dev/hda5 (with the rest of Mandrake) for this file. Is there a way to bridge this gap?

Thanks for any help a LILO expert can provide...

Regards,
Remillard
_________________
This signature is printed with 100% post-consumer recycled electrons.
Back to top
View user's profile Send private message
dabooty
Guru
Guru


Joined: 15 May 2003
Posts: 482
Location: Belgium

PostPosted: Sun Dec 07, 2003 1:29 pm    Post subject: Reply with quote

don't forget to run lilo as root after making changes. Untill you did that lilo won't listen to the changes you made:
Code:
#lilo

_________________
registered user #284425
get yourself counted
http://counter.li.org
------
#emerge -pv solves a lot of questions beforehand
Back to top
View user's profile Send private message
cyrillic
Watchman
Watchman


Joined: 19 Feb 2003
Posts: 7313
Location: Groton, Massachusetts USA

PostPosted: Sun Dec 07, 2003 3:14 pm    Post subject: Reply with quote

GRUB would be more straightforward to setup. You could just tell GRUB which partition to look in for each kernel you want to boot.
Code:
default 0
timeout 15

title linux
root (hd0,4)
kernel /boot/vmlinuz root=/dev/hda5 quiet devfs=mount hdc=ide-scsi hdd=ide-scsi acpi=ht resume=/dev/hda6 splash=silent vga=788     <--- kernel line ends here
initrd /boot/initrd.img

title gentoo
root (hd0,0)
kernel /boot/kernel-2.4.20-gentoo-r9 root=/dev/hda1
initrd /boot/initrd-2.4.20-gentoo-r9
Back to top
View user's profile Send private message
Remillard
Apprentice
Apprentice


Joined: 07 Mar 2003
Posts: 200
Location: Irvine, CA

PostPosted: Sun Dec 07, 2003 8:37 pm    Post subject: Reply with quote

dabooty wrote:
don't forget to run lilo as root after making changes. Untill you did that lilo won't listen to the changes you made:
Code:
#lilo


Yes, I did run /sbin/lilo after I made the changes. That's when the error of "cannot find kernel image" (or whatever it was) occurred. I haven't rebooted yet to test it as there are still errors.

cyrillic wrote:
GRUB would be more straightforward to setup. You could just tell GRUB which partition to look in for each kernel you want to boot.


This is true. In the past I have used GRUB with Mandrake. At the moment though I'm trying to make the two kernels coexist in a dual boot environment til I get all the Gentoo issues ironed out. It seems like it might be best to make LILO work as it's the current bootloader than switch to grub.

Would making a link from the /dev/hda5/boot directory to the /dev/hda1/boot directory for the simple purpose of getting lilo to find the kernel and initrd file work? Seems like it's sort of fooling it because I want /dev/hda1 to be the root and boot filesystem under gentoo, but lilo doesn't seem to recognize the "root" switch under the image line when it's reading everything.

Regards,
Remillard
_________________
This signature is printed with 100% post-consumer recycled electrons.
Back to top
View user's profile Send private message
cyrillic
Watchman
Watchman


Joined: 19 Feb 2003
Posts: 7313
Location: Groton, Massachusetts USA

PostPosted: Sun Dec 07, 2003 8:49 pm    Post subject: Reply with quote

Remillard wrote:
It seems like it might be best to make LILO work as it's the current bootloader than switch to grub.

In that case, try this in your /etc/lilo.conf
Code:
image=/home/gentoo/boot/kernel-2.4.20-gentoo-r9
label="gentoo"
root=/dev/hda1
read-only
initrd=/home/gentoo/boot/initrd-2.4.20-gentoo-r9

And make sure /home/gentoo is mounted when you run /sbin/lilo so it can find the kernel.
Back to top
View user's profile Send private message
C0deM0nkey
n00b
n00b


Joined: 09 Dec 2003
Posts: 36
Location: Manchester, UK

PostPosted: Wed Dec 10, 2003 11:44 pm    Post subject: Reply with quote

If your making retrospective changes after getting your system working you must mount your root partition.

On my system my hdd is setup as
hda1 (Win XP)
hda2 (boot partition)
hda3 (swap)
hda4 (linux gentoo)

so after making changes to lilo.conf before running /sbin/lilo you have to mount the boot partition since, assuming you've followed the standard gentoo install guide (give-or-take) then your boot partition is not mounted during normal running.

in the example above i would just do a;
Code:
mount /dev/hda2 /boot


then I would run
Code:
/sbin/lilo


and finally
Code:
unmount /boot


Hope That Helps alittle

-Code Monkey
Back to top
View user's profile Send private message
Halanegri
Guru
Guru


Joined: 03 Mar 2003
Posts: 351
Location: Reykjavík, Iceland

PostPosted: Wed Dec 10, 2003 11:53 pm    Post subject: Reply with quote

umount, not unmount. ;)
Back to top
View user's profile Send private message
C0deM0nkey
n00b
n00b


Joined: 09 Dec 2003
Posts: 36
Location: Manchester, UK

PostPosted: Thu Dec 11, 2003 6:53 pm    Post subject: Reply with quote

doh! :roll:
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum