LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   LILO: Two Distros, Separate Drives (https://www.linuxquestions.org/questions/linux-general-1/lilo-two-distros-separate-drives-75288/)

General_Tso 07-23-2003 03:11 PM

LILO: Two Distros, Separate Drives
 
Folks,

Sorry for yet another LILO question. I have lilo installed on my MBR, and RH9 and Debian installed on hda and hdb respectively. Do I need their kernels to be in the same location for LILO to work properly? Right now, I have them in /dev/hda/boot and /dev/hdb/boot.

Thanks,

GT

Proud 07-23-2003 03:13 PM

I have a similar layout. Your lilo.conf for each install simply has to have the correct path to where the relevant files are mounted at the time when you run lilo.

General_Tso 07-23-2003 03:36 PM

Proud,

Do you mind posting your lilo.conf? As is mine looks like the following:

# Security
password=[omitted]
# Support LBA for large hard disks
lba32
#General Section
boot=/dev/hda
timeout=200
default=RedHat9
vga=normal
map=/boot/map
install=/boot/boot-menu.b
# Red Hat Linux 9.0
image=/boot/vmlinuz-2.4.20-8
label=RedHat9
root=/dev/hda2
read-only
append="hdc=ide-scsi hdd=ide-scsi root=LABEL=/"
initrd=initrd-2.4.20-8.img
# Debian GNU/Linux 3.0r1
[I don't know what to stick here.]

Thanks,

GT

Proud 07-23-2003 04:38 PM

Well I have two Mdk9.1 installs on seperate partitions, but the principal is the same.
For the kernels not on the /boot partition (ie on the other mounted partition) I have entries like:
Code:

image=/mnt/hdb1/boot/vmlinuz
        label="Mdk9.1hdb1"
        root=/dev/hdb1
        initrd=/mnt/hdb1/boot/initrd.img

instead of
Code:

image=/boot/vmlinuz
        label="Mdk9.1hdb5"
        root="/dev/hdb5"
        initrd="/boot/initrd.img"

Simply mount the partition of the other harddrive which contains the /boot directory (hdb2?), and then copy in your case Debian's lilo.conf kernel entries but with the /mnt/hdb2/ string in front. :)

Skyline 07-23-2003 05:33 PM

Re-enforcing what PROUD said - the idea is to temporarily mount the partiton that contains the kernel from your 1st distro into a mount point in the 2nd dsitro.

Then simply copy over the relevant LILO settings from your 1st dsitro's mounted partition into your 2nd distro's Lilo.conf file.

Then - you'll have to modify the path to the kernel and possibly initrd.img file in the 2nd dsitro's lilo.conf file - remember your're taking into account the mounted nature of the kernel at that point.

Once youve done this save the lilo.conf file then

SU
Root password

/sbin/lilo

this will run the map installer and re-install LILO.

synecdoche 07-23-2003 05:50 PM

I'm curious-- why do you have two installs of the same distro on one computer? I've heard of having different distros on the same computer, but not two copies of the same one.

Just wondering what the advantage is... Work/play installs, or what?

Thanks,
dave

Proud 07-23-2003 05:55 PM

First it was 9.0, then 9.0 & 9.1. Then 9.0 became 9.1server style, but broke, and now I have 9.1 'stable(r)' and 9.1 'test'. If a new package doesnt cause problems I install it on my stable(r) one too. Plus it's a full backup incase I get hosed via testing apache or something. All helps speed the learning process. ;)

General_Tso 07-24-2003 08:28 PM

I guess I need spoon-fed here. I mounted the temporary "/boot" from the first distro on my second distribution, but I got kernel panics when I rebooted. What do you have to do next? I'm struggling here.

BTW, here's a copy of my lilo.conf:

# Security
password=[omitted]
# Support LBA for large hard disks
lba32
#General Section
boot=/dev/hda
timeout=200
default=RedHat9
vga=normal
map=/boot/map
install=/boot/boot-menu.b
# Red Hat Linux 9.0
image=/rhboot/vmlinuz-2.4.20-8
label=RedHat9
root=/dev/hda2
read-only
append="hdc=ide-scsi hdd=ide-scsi root=LABEL=/"
initrd=/rhboot/initrd-2.4.20-8.img
# Debian GNU/Linux 3.0r1
image=/boot/vmlinuz-2.4.18-bf2.4
label=DebianWoody
root=/dev/hdb2
read-only

Thanks,

GT

Skyline 07-24-2003 09:16 PM

Hi General TSO

Are these 2 Paths correct given that you should have temporarily mounted Red Hat's Root partition to /mnt in Debian

image=/rhboot/vmlinuz-2.4.20-8
initrd=/rhboot/initrd-2.4.20-8.img

I personally would temporarily mount Red Hats Root partition to a directory in Debians /mnt - Red Hats root partition will contain a boot directory inside with the Red Hat kernel image in it


So in Debian - if the mount point is

/mnt/tso

then you should modify the LILO lines to read

image=/mnt/tso/boot/vmlinuz-2.4.20-8
initrd=/mnt/tso/boot/initrd-2.4.20-8.img

General_Tso 07-24-2003 10:27 PM

Hey, Skyline.

Well, I mounted /dev/hda1 (where I mounted /boot of RH9) at /rhboot--hence the /rhboot/vmlinuz-2.4.20-8, etc. Let me give it a try on /mnt. That might make all the difference. But, just to clarify, I have one boot partition for Red Hat on hda1 and one for Debian on hdb1. I'm not sure if that itself is wrong.

Thanks,

GT

Skyline 07-24-2003 10:42 PM

Hi General TSO

Again - I personally would just mount Red Hat's ROOT partition - not its Boot partition - inside Red Hat's Root partition there's a little boot directory containing all the relevant files -

If you create a directory in Debian's /mnt and call it "tso" you'd do

mkdir /mnt/tso

now - if Red Hat's Root partition was on /dev/hda2 then you would just want to mount this partition - youd do

mount -t ext3 -o rw /dev/hda2 /mnt/tso

This would create a temporary mount

Then just copy over Red Hats LILO settings into Debain's LILO.conf file

Then modify the relevant paths until youve got this :

image=/mnt/tso/boot/vmlinuz-2.4.20-8

initrd=/mnt/tso/boot/initrd-2.4.20-8.img

Remember - because of the temporary mount of Red Hats root partition - the paths to the kernel etc have temporarily changed - so you have to modofy the paths in light of this - dont worry - LILO resolves all this behind the scenes.

Once youve succesfully edited lilo.conf in Debian then run the map installer as root

/sbin/lilo

General_Tso 07-25-2003 12:56 PM

Skyline,

When I mount /dev/hda2 at /mnt/redhat, I can see the various directories of my Red Hat including /boot but there are no files contained within them. Still, I tried editting lilo.conf and got a "no such file or directory" message for /mnt/redhat/boot/vmlinuz-2.4.20-8.

What am I missing here?

Thanks,

GT

Skyline 07-25-2003 02:54 PM

Hi General tso

When you've mounted Red Hat's Root partition to /mnt/redhat in Debian are there any files at all in any of the Red Hat directories or is it just the case that there are no files in Red Hat's Boot directory.

When I Multiboot Linux distros - I only use a series of Root partitions and 1 Swap partition - I never use separate Boot partitions as the relevant kernal image is always contained within a little boot directory inside the respective root partition - in your scenario what might have happened is that because youve got a Boot, Root and Swap partition set up for Red Hat, maybe Red Hat has put the kernel etc into the separate boot partition - not into the boot directory of the root partition - this is only a guess.

That specific error message youve got implies that there is no kernel image in /mnt/redhat/boot - this might be explained by what Ive just said?

I would try your original idea again of mounting the entier Red Hat Boot partition to a mount point in Debians /mnt

So if your entire Red Hat boot partition was on /dev/hda1 and youve created /mnt/redhat in Debians /mnt then do

mount -t ext3 -o rw /dev/hda1 /mnt/redhat

Now - because you haven't got Red Hats root partition mounted you can't copy over Red Hats LILO settings so use these - there based on what youve posted before with a modiication or two.


image=/mnt/redhat/vmlinuz-2.4.20-8
label=RedHat9
root=/dev/hda2
initrd=/mnt/redhat/initrd-2.4.20-8.img
append="hdc=ide-scsi hdd=ide-scsi root=LABEL=/
read-only


Rememeber to save lilo.conf when youve put this in then as root user run

/sbin/lilo

re-post if your still having difficulty

General_Tso 07-27-2003 07:55 PM

Skyline,

I mounted hda1 and saw all the files there, so I retried the process. I made the appropriate modifications without any problem, and it adds "RedHat9" and "DebianWoody." There is a little asterix next to RedHat9, however--I'm not sure if that's indicating that its the default or what. When I reboot, the results are the same: kernel panic.

Any ideas?

Thanks,

GT

Skyline 07-27-2003 10:03 PM

Hi General TSO

Yes - in your scenario - you'll need Red Hat's Boot partition mounted - (when multibooting I've got so used to just using a series of Root partitions and one Swap partition - thats why I was looking at the Root partition earlier - in hindsight in this scenario were youve got a Boot, Root and Swap partition for Red Hat - Red Hat has put its kernel image etc in the separate Boot partition /dev/hda1 - not in the boot directory of its Root partition - so yes - its the boot partition that needs to be mounted)

Can you post your lilo.conf file again - we're nearly there.

Just one last thing - did the Kernel Panic refer to a Root filesystem not being found/mounted ? - if so - and if youve got this line

root=/dev/hda2

in your Red Hat LILO entry - then take it out -



All times are GMT -5. The time now is 10:48 AM.