LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (http://www.linuxquestions.org/questions/linux-general-1/)
-   -   LILO issues... (http://www.linuxquestions.org/questions/linux-general-1/lilo-issues-120599/)

Scruff 11-27-2003 09:40 PM

LILO issues...
 
I installed Gentoo from stage1 today. Never tried Gentoo, but I always hear good stuff about it. After completing the install, I didn't install LILO, as I already have it installed to the MBR. I just booted to Slack, edited lilo.conf, then ran /sbin/lilo and I keep getting this error:

root@dabasement:/home/scruff# /sbin/lilo
Added Slackware *
Fatal: open /boot/kernel-2.4.20-gentoo-r8: No such file or directory

I know kernel-2.4.20-gentoo-r8 is there. Did mkdir /dev/hda6 /gentoo : ls /gentoo/boot and it's in there. I tried /sbin/lilo while hda6 was mounted and not mounted. Here is disk setup:

hda1 winXP 20gb's-- primary
hda3 / Slackware 13gb's-- primary
hda4 /home (slack) 13gb's-- primary
hda5 swap 512mb's-- logical
hda6 / Gentoo 8gb's-- logical
hda7 /data (vfat) 80gb's-- logical

Here is my lilo.conf:

boot = /dev/hda

prompt

vga = 791

image = /boot/vmlinuz
root = /dev/hda3
label = Slackware
read-only # Non-UMSDOS filesystems should be mounted read-only for checking

image = /boot/kernel-2.4.20-gentoo-r8
label = gentoo
root = /dev/hda6
initrd = /boot/initrd-2.4.20-gentoo-r8
read-only # Non-UMSDOS filesystems should be mounted read-only for checking

other = /dev/hda1
label = WinXP
table = /dev/hda

I also tried like the install manual shows with the 'append="root.......etc" ' but it didn't help. What simple little detail am I missing?

iceman47 11-27-2003 09:51 PM

you say /gentoo/boot is on /dev/hda6, but in lilo.conf you try to load /boot/kernel-2.4.20-gentoo-r8 on /dev/hda6.
lilo just can't find the /gentoo dir IMO.
Structure on the /dev/hda6 partition should be /boot, not /gentoo/boot, no?

Scruff 11-27-2003 09:57 PM

It isn't /gentoo/boot. I just created that dir in slack so I could view the contents of /boot on the gentoo partition. I had this problem before I did that though. After it wouldnt work, I did mkdir /gentoo mount /dev/hda6 /gentoo just so I could list the contents and be sure I was using the correct kernel name. I didn't add it to fstab or anything like that.

/bin/bash 11-27-2003 09:59 PM

There are two or three ways to go about this:
  1. Copy the gentoo kernel and initrd from /gentoo/boot the slackware /boot directory. NOTE: It's not enough to just mount the gento directory because lilo is looking in the slack /boot directory:
    cp /gentoo/boot/kernel-2.4.20-gentoo-r8 /boot
    cp /gentoo/boot/initrd-2.4.20-gentoo-r8 /boot
  2. Change the /etc/lilo.conf entry like this:
    image = /gentoo/boot/kernel-2.4.20-gentoo-r8
    label = gentoo
    root = /dev/hda6
    initrd = /gentoo/boot/initrd-2.4.20-gentoo-r8
    read-only
    NOTE: This way is better than above but you always need to have gentoo mounted at /gento before running lilo.
  3. First fdisk /dev/hda and make /dev/hda6 bootable. Next do a chroot /gentoo and make sure the gentoo /etc/lilo.conf is like this:
    boot = /dev/hda6
    prompt
    vga = 791
    image = /boot/kernel-2.4.20-gentoo-r8
    label = gentoo
    root = /dev/hda6
    initrd = /boot/initrd-2.4.20-gentoo-r8
    read-only

    Then run lilo from gentoo.
    NOTE: This will put lilo on the /dev/hda6 boot partition.

    Now you can exit the chroot and you are back to slackware. You need to change slackware lilo.conf like this:

    other = /dev/hda6
    label = Gentoo
    table = /dev/hda

    And run lilo again in slackware.

I'm sure there are other ways to do it also.

<edit> Also rather than doing chroot /gentoo you could just edit /gentoo/etc/lilo.conf and when you run lilo do it like this:

lilo -r /gentoo

Scruff 11-27-2003 10:11 PM

Damn. I figured your suggestions would DEFINITELY fix me up, but I still get the same error. I tried the #1 suggestion first, nope. HOW the hell can lilo NOT find kernel--- when it's located in the same directory as my slack kernel?! Of course, I edited and saved lilo.conf first, to look for the kernel at /boot/kernel----.

Then, I tried the 2nd suggestion (which I think I already tried while hacking away at it) and it didn't work either. Why won't lilo recognise the image??

root@dabasement:/home/scruff# ls /gentoo/boot/
. .keep System.map-2.4.20-gentoo-r8 initrd-2.4.20-gentoo-r8
.. System.map boot kernel-2.4.20-gentoo-r8

Scruff 11-27-2003 10:21 PM

As for #3, I don't even a lilo.conf in gentoo right now (never emerged it), and am a little leary of installing it from there. The reason being, is right now from slack (completely configured as I need it) I can't get lilo to boot gentoo, so whats to say from gentoo I wont be able to get slack to boot? I have the slack live cd, knoppix, and all that, but I don't want to create any more problems than I already have ;)

/bin/bash 11-27-2003 10:23 PM

Try ls -l /gentoo/boot

And post the results.

Scruff 11-27-2003 10:24 PM

root@dabasement:/home/scruff# ls -l /gentoo/boot
total 3046
drwxr-xr-x 2 root root 256 Nov 27 11:28 .
drwxr-xr-x 18 root root 408 Nov 27 10:45 ..
-rw-r--r-- 1 root root 0 Nov 27 08:10 .keep
lrwxrwxrwx 1 root root 27 Nov 27 11:27 System.map -> System.map-2.4.20-gentoo-r8
-rw-r--r-- 1 root root 564862 Nov 27 11:27 System.map-2.4.20-gentoo-r8
lrwxrwxrwx 1 root root 1 Nov 27 05:43 boot -> .
-rw-r--r-- 1 root root 1456589 Nov 27 11:27 initrd-2.4.20-gentoo-r8
-rw-r--r-- 1 root root 1093304 Nov 27 11:27 kernel-2.4.20-gentoo-r8

Skyline 11-27-2003 10:25 PM

Simply, create a mount point in Slackware for the Gentoo partition which contains Gentoo's kernel - then mount the partition into the mountpoint in Slackware - once youve done this then put an entry for Gentoo in lilo.conf (while inside Slackware) - make sure you take into account the temporary mounted nature of the Gentoo partition inside Slack:

With a mount point of /mnt/gentoo :

image=/mnt/gentoo/boot/kernel-2.4.20-gentoo-r8
label="Gentoo"
root=/dev/hda6
initrd = /mnt/gentoo/boot/initrd-2.4.20-gentoo-r8
read-only

then save lilo.conf

then type

/sbin/lilo

to re-install the bootloader and new map file..

Scruff 11-27-2003 10:28 PM

Also:
root@dabasement:/home/scruff# df
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/hda3 13670888 5260976 8409912 39% /
/dev/hda4 13670888 5798184 7872704 43% /home
/dev/hdb1 38448276 3142252 33352924 9% /root/backup
/dev/hda7 81903392 20110816 61792576 25% /data
/dev/hda6 7815344 1013192 6802152 13% /gentoo

/bin/bash 11-27-2003 10:29 PM

Skyline
Thats #2 in my post. :D

Scruff
Your lilo.conf in slackware looks like this?
image = /gentoo/boot/kernel-2.4.20-gentoo-r8
label = gentoo
root = /dev/hda6
initrd = /gentoo/boot/initrd-2.4.20-gentoo-r8
read-only

Scruff 11-27-2003 10:33 PM

It did. I just copy/pasted Skyline's text into lilo.conf and /sbin/lilo passed. The only thing I did differently was mount /dev/hda6 @ /mnt/gentoo. I suppose it's possible I had a typo, but I have been fooling with this for 2 hours and typed the gentoo entry over 20x during that time. Hard to believe I had a typo each time, especially when I checked each entry over hardcore each time.

Also, the entry you saw above that I posted was copy/pasted directly from lilo.conf...

Let me reboot and see what happens...

/bin/bash 11-27-2003 10:37 PM

Maybe it was the spaces, I just copied your lilo.conf and made changes and I left the spaces there but my lilo.conf doesn't have any spaces.

Anyway glad to hear it is working.

Skyline 11-27-2003 10:40 PM

Quote:

I just copy/pasted Skyline's text into lilo.conf and /sbin/lilo passed.
Nice........

Scruff 11-27-2003 11:41 PM

Yep, thanks guys! Now I have new problems to solve, lol. Getting some kernel errors, haven't got X configured properly yet (have to use ps2 adapter for mouse) and don't have internet yet, WHEEEEE!!!! I'll get it worked out though. I got so used to Slack, I'll have to learn some new stuff for Gentoo. At least I can copy most of my settings for stuff like internet from slack. Going to try using my Slack kernel. It's custom and works perfect on my hardware.

Thanks again!


All times are GMT -5. The time now is 10:26 PM.