LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 06-10-2005, 05:28 PM   #1
hpladd
Member
 
Registered: Feb 2003
Distribution: Kubuntu
Posts: 142

Rep: Reputation: 15
LILO configuration


I'm trying to run a dual boot Debian and Red Hat machine -- without much success. What I have managed to achieve is the following:

On boot -- LILO sees and loads Debian.

I've loaded the Red Hat onto the machine without a boot loader. Instead I created a boot disk.

Booting into Red Hat with the boot disk works great.

I kept the partitioning as simple as I could:

/dev/hda1 is set as bootable and is the Debian / drive
/dev/hda2 is swap
/dev/hda3 is also set as bootable and is the Redhat / drive

I guess the short version of my question is: "Where on the disk do I copy the contents of the Red Hat boot floppy? Once I've done that, I think I can properly configure the lilo.conf file.
 
Old 06-10-2005, 05:40 PM   #2
hussar
Member
 
Registered: Oct 2003
Location: Heidelberg, Germany
Distribution: Slackware 11.0; Kubuntu 6.06; OpenBSD 4.0; OS X 10.4.10
Posts: 345

Rep: Reputation: 30
You may not need to copy the contents of the RedHat boot floppy. You may just need to edit /etc/lilo.conf so that for a RedHat boot it points at /dev/hda3 as its /root.

Post your /etc/lilo.conf file and let us take a look.
 
Old 06-10-2005, 05:40 PM   #3
synaptical
Senior Member
 
Registered: Jun 2003
Distribution: Mint 13/15, CentOS 6.4
Posts: 2,020

Rep: Reputation: 47
Quote:
Originally posted by hpladd
I'm trying to run a dual boot Debian and Red Hat machine -- without much success. What I have managed to achieve is the following:

On boot -- LILO sees and loads Debian.

I've loaded the Red Hat onto the machine without a boot loader. Instead I created a boot disk.

Booting into Red Hat with the boot disk works great.

I kept the partitioning as simple as I could:

/dev/hda1 is set as bootable and is the Debian / drive
/dev/hda2 is swap
/dev/hda3 is also set as bootable and is the Redhat / drive

I guess the short version of my question is: "Where on the disk do I copy the contents of the Red Hat boot floppy? Once I've done that, I think I can properly configure the lilo.conf file.
you don't need to copy the boot disk contents, you just need to add an entry to your debian lilo.conf pointing to red hat and then run lilo.

example:

image = /boot/redhat-linux # (or whatever is the name of the kernel)
label = redhat
root=/dev/hda3
read-only

then run lilo as root (# lilo).


p.s. if red hat has its own boot directory, you may need to mount that somewhere first and point the image there to run lilo, e.g. mount /dev/hda3 /mnt/hda3, then for the image use /mnt/hda3/boot/kernel-name. or you might just be able to use the same /boot directly as debian, as long as your red hat kernel is there and it's a different kernel name. i'm not sure, but that might work.

Last edited by synaptical; 06-10-2005 at 05:44 PM.
 
Old 06-10-2005, 06:39 PM   #4
hpladd
Member
 
Registered: Feb 2003
Distribution: Kubuntu
Posts: 142

Original Poster
Rep: Reputation: 15
Hussar,

Thanks, the lilo.conf file is surprisingly large. Debian places all sorts of comments in there. I'll try and sort the wheat from the chaff and post it.

In the mean time, I think that I've almost got it.

Here's what has been most successful thus far;

Image=/home/preston/boot/vmlinux
label=redhat
root=/dev/hda3
read-only
initrd=/home/preston/boot/initrd-2.4.20-8.img

Then I can lilo w/out errors -- IF I have mounted the /dev/hda3 to the Debian /home/preston directory.

Of course when I reboot the hda3 mount doesn't occurr and lilo doesn't see the Red Hat Kernel.

Thanks you
 
Old 06-10-2005, 06:41 PM   #5
hpladd
Member
 
Registered: Feb 2003
Distribution: Kubuntu
Posts: 142

Original Poster
Rep: Reputation: 15
Synaptical thanks

I think your on track especially -- with your ps. Anymore thoughts? thanks much.


Here's what has been most successful thus far;

Image=/home/preston/boot/vmlinux
label=redhat
root=/dev/hda3
read-only
initrd=/home/preston/boot/initrd-2.4.20-8.img

Then I can lilo w/out errors -- IF I have mounted the /dev/hda3 to the Debian /home/preston directory.

Of course when I reboot the hda3 mount doesn't occurr and lilo doesn't see the Red Hat Kernel.

Thanks you
 
Old 06-10-2005, 09:06 PM   #6
synaptical
Senior Member
 
Registered: Jun 2003
Distribution: Mint 13/15, CentOS 6.4
Posts: 2,020

Rep: Reputation: 47
Quote:
Originally posted by hpladd
Synaptical thanks

I think your on track especially -- with your ps. Anymore thoughts? thanks much.


Here's what has been most successful thus far;

Image=/home/preston/boot/vmlinux
label=redhat
root=/dev/hda3
read-only
initrd=/home/preston/boot/initrd-2.4.20-8.img

Then I can lilo w/out errors -- IF I have mounted the /dev/hda3 to the Debian /home/preston directory.

Of course when I reboot the hda3 mount doesn't occurr and lilo doesn't see the Red Hat Kernel.

Thanks you
hmm, i'll bet it's something to do with the initrd. i never used an initrd, and doing the mount thing always worked for me.

if that is indeed the problem, i guess the best (easiest ) thing to do would be to just make a subdirectory of your hda1 /boot directory and put your redhat boot files in there. then just point lilo there in the image and initrd lines. although i don't see why that should work and not the other partition.

do you use initrd for your debian install?


p.s. again: i would advise against mounting that stuff in your /home directory. who knows what kind of permissions things might also be screwing things up. i would strongly suggest making a directory in /mnt, calling it something like /mnt/hda3 or /mnt/redhat. then point lilo there, and after mounting the partition run lilo. it seems to me that should work.

Last edited by synaptical; 06-10-2005 at 09:16 PM.
 
Old 06-10-2005, 09:15 PM   #7
gbhil
Member
 
Registered: Jan 2005
Location: /dev/input/chair0
Distribution: Slackware, Gentoo, Vector, Roll-your-own-with-GNU binutils
Posts: 174

Rep: Reputation: 30
Sounds like your configuring lilo from Debian and using the /boot partition from debian. (correct me if I'm wrong.)

Boot to Debian, then make this directory: /boot/RH/
Mount the /boot directory from the RH install somewhere, and copy the kernel image and initrd for your Red Hat install into the /boot/RH/ directory in the Debian system.

Add the following entry to /etc/lilo.conf in the Debian system:

# Red Hat boot section
Image=/boot/RH/vmlinux
initrd=/boot/RH/initrd-2.4.20-8.img
label=redhat
root=/dev/hda3
read-only

The rerun /sbin/lilo, reboot, and enjoy.
 
Old 06-10-2005, 10:52 PM   #8
hpladd
Member
 
Registered: Feb 2003
Distribution: Kubuntu
Posts: 142

Original Poster
Rep: Reputation: 15
Thanks all,

Tried all of the suggestions. I even tried copying the RH boot floppy's content to a directory of the debian partition -- no improvement, boots into Debian everytime.

Does lilo use relative addresses? Is it possible that moving the directories around has caused the th RH kernel to be lost , wrongly indexed, uhm dereferenced or whatever the term would be?

Rats, I can't help but think that just a few key strokes is going solve this. Again thanks all.

lilo.conf is below

Note:
/rh/rhb is the directory that contains the RH floppy's contents
/rh contains all of the Red Hat partition's /boot contents

boot=/dev/hda
root=/dev/hda1
delay=20
vga=normal
default=Linux

image=/vmlinuz
label=Linux
read-only
# restricted
# alias=1

initrd=/initrd.img


image=/boot/rh/rhb/vmlinuz
label=redhat
root=/dev/hda3
read-only
initrd=/boot/rh/rhb/initrd.img
 
Old 06-10-2005, 11:15 PM   #9
synaptical
Senior Member
 
Registered: Jun 2003
Distribution: Mint 13/15, CentOS 6.4
Posts: 2,020

Rep: Reputation: 47
it looks like you have a root=/dev/hda1 in the global section, causing it to boot to debian each time.

change this:

boot=/dev/hda
root=/dev/hda1
delay=20
vga=normal
default=Linux

to this:

boot=/dev/hda
delay=20
vga=normal
default=Linux


and keep/add the root=/dev/hdax to each individual section, changing x for what partition you want:

# Debian on /dev/hda1:
image=/vmlinuz
label=Linux
root=/dev/hda1
read-only
# restricted
# alias=1
initrd=/initrd.img


# Red Hat on /dev/hda3:
image=/boot/rh/rhb/vmlinuz
label=redhat
root=/dev/hda3
read-only
initrd=/boot/rh/rhb/initrd.img


if the boot floppy contents are the same as the /boot/rh directory, get rid of the rhb directory and keep it simple with just /boot/rh. i notice the debian kernel and initrd are in /, i think it does that by default, but it's probably better to have those in /boot, imho (don't forget to change lilo if you move them). it doesn't really matter, i just don't like having files in the root (/) filesystem.

Last edited by synaptical; 06-10-2005 at 11:23 PM.
 
Old 06-11-2005, 08:33 PM   #10
hpladd
Member
 
Registered: Feb 2003
Distribution: Kubuntu
Posts: 142

Original Poster
Rep: Reputation: 15
Well I bodged it so badly that I all I could achieve was a kernel panic.

I reinstalled RH (this time with LILO) and then, I configured lilo utilizing the concepts learned here in this forum, and poof! I have a dual boot system.

Thanks again all.

Here's what's wierd -- no matter what inittab setting I use for Debian the machine it will not boot into graphical mode. I always have to "startx."
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
LILO configuration for new OS jmcdonald21 Linux - Software 1 02-21-2005 03:11 PM
lilo configuration yiang Linux - Newbie 4 10-01-2004 06:04 PM
Lilo configuration drisay Slackware 5 09-15-2004 10:21 PM
LILO Configuration jelmerderonde Linux - Newbie 1 10-25-2003 06:24 AM
lilo configuration? sturm375 Linux - Newbie 1 05-08-2002 08:48 PM


All times are GMT -5. The time now is 12:58 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration