LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 11-27-2003, 08:40 PM   #1
Scruff
Member
 
Registered: Oct 2002
Location: Stoughton, MA
Distribution: Gentoo x86_64 & PPC
Posts: 949

Rep: Reputation: 30
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?

Last edited by Scruff; 11-27-2003 at 09:28 PM.
 
Old 11-27-2003, 08:51 PM   #2
iceman47
Senior Member
 
Registered: Oct 2002
Location: Belgium
Distribution: Debian, Free/OpenBSD
Posts: 1,123

Rep: Reputation: 47
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?
 
Old 11-27-2003, 08:57 PM   #3
Scruff
Member
 
Registered: Oct 2002
Location: Stoughton, MA
Distribution: Gentoo x86_64 & PPC
Posts: 949

Original Poster
Rep: Reputation: 30
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.
 
Old 11-27-2003, 08:59 PM   #4
/bin/bash
Senior Member
 
Registered: Jul 2003
Location: Indiana
Distribution: Mandrake Slackware-current QNX4.25
Posts: 1,802

Rep: Reputation: 47
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

Last edited by /bin/bash; 11-27-2003 at 09:08 PM.
 
Old 11-27-2003, 09:11 PM   #5
Scruff
Member
 
Registered: Oct 2002
Location: Stoughton, MA
Distribution: Gentoo x86_64 & PPC
Posts: 949

Original Poster
Rep: Reputation: 30
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
 
Old 11-27-2003, 09:21 PM   #6
Scruff
Member
 
Registered: Oct 2002
Location: Stoughton, MA
Distribution: Gentoo x86_64 & PPC
Posts: 949

Original Poster
Rep: Reputation: 30
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
 
Old 11-27-2003, 09:23 PM   #7
/bin/bash
Senior Member
 
Registered: Jul 2003
Location: Indiana
Distribution: Mandrake Slackware-current QNX4.25
Posts: 1,802

Rep: Reputation: 47
Try ls -l /gentoo/boot

And post the results.
 
Old 11-27-2003, 09:24 PM   #8
Scruff
Member
 
Registered: Oct 2002
Location: Stoughton, MA
Distribution: Gentoo x86_64 & PPC
Posts: 949

Original Poster
Rep: Reputation: 30
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
 
Old 11-27-2003, 09:25 PM   #9
Skyline
Senior Member
 
Registered: Jun 2003
Distribution: Debian/other
Posts: 2,104

Rep: Reputation: 45
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..

Last edited by Skyline; 11-27-2003 at 09:27 PM.
 
Old 11-27-2003, 09:28 PM   #10
Scruff
Member
 
Registered: Oct 2002
Location: Stoughton, MA
Distribution: Gentoo x86_64 & PPC
Posts: 949

Original Poster
Rep: Reputation: 30
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
 
Old 11-27-2003, 09:29 PM   #11
/bin/bash
Senior Member
 
Registered: Jul 2003
Location: Indiana
Distribution: Mandrake Slackware-current QNX4.25
Posts: 1,802

Rep: Reputation: 47
Skyline
Thats #2 in my post.

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
 
Old 11-27-2003, 09:33 PM   #12
Scruff
Member
 
Registered: Oct 2002
Location: Stoughton, MA
Distribution: Gentoo x86_64 & PPC
Posts: 949

Original Poster
Rep: Reputation: 30
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...

Last edited by Scruff; 11-27-2003 at 09:34 PM.
 
Old 11-27-2003, 09:37 PM   #13
/bin/bash
Senior Member
 
Registered: Jul 2003
Location: Indiana
Distribution: Mandrake Slackware-current QNX4.25
Posts: 1,802

Rep: Reputation: 47
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.
 
Old 11-27-2003, 09:40 PM   #14
Skyline
Senior Member
 
Registered: Jun 2003
Distribution: Debian/other
Posts: 2,104

Rep: Reputation: 45
Smile

Quote:
I just copy/pasted Skyline's text into lilo.conf and /sbin/lilo passed.
Nice........
 
Old 11-27-2003, 10:41 PM   #15
Scruff
Member
 
Registered: Oct 2002
Location: Stoughton, MA
Distribution: Gentoo x86_64 & PPC
Posts: 949

Original Poster
Rep: Reputation: 30
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!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Boot issues with GRUB and LILO evilregis Linux - General 1 05-16-2004 09:28 PM
Booting issues, Tried Lilo but no help FuzzyLogic269 Slackware - Installation 4 03-29-2004 04:40 PM
Dual Booting LILO issues... [WebCarnage] Linux - Software 6 03-08-2004 05:30 PM
LILO Issues gtxboyracer Red Hat 12 09-19-2003 08:46 PM
Post-install LILO issues underscorebleac Red Hat 9 09-19-2003 11:54 AM

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

All times are GMT -5. The time now is 12:59 AM.

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