Linux - GeneralThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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.
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.
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.]
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:
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.
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.
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?
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.
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
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
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.
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
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.
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.
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.
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
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.