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. |
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. |
Quote:
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. |
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 |
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 |
Quote:
if that is indeed the problem, i guess the best (easiest :D) 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. :cool: although i don't see why that should work and not the other partition. :confused: 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. |
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. |
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 |
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. |
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." |
All times are GMT -5. The time now is 07:35 PM. |