Click to See Complete Forum and Search --> : How could 3 linux dists coexist?


lazyboy
08-09-2001, 08:06 AM
Dear LNO people,
Is it possible for Mandrake 8.0, Redhat 7.1 and Slackware 8.0 coexist on the same machine and on the same disk (/dev/hdc)? How would the boot process using LILO go about?

danrees
08-09-2001, 01:20 PM
In a word, no. Because they all use different startup files (e.g. SuSE uses /etc/init.d/, but RedHat uses /etc/rc.d/init.d AFAIR).

The only way to do this would be to partition your drive so that you have three partitions for each distro, and sharing others. E.g.
/dev/hda1 / (Dist. 1)
/dev/hda2 / (Dist. 2)
/dev/hda3 / (Dist. 3)

You can then share partitions:
/dev/hda4 /usr/local
/dev/hda5 /home
/dev/hda6 /var

(for example)

LILO would then be able to boot from the root partition for each distribution, and you could share your user settings with each.

optech
08-09-2001, 02:59 PM
i think that's what he meant...
one hard disk, but several partitions...

you may want to create some extra partitions though...
such as /home and /boot...
keep your kernels in /boot and keep your user files in /home.

but yeah, i've had windows 2k, slackware, mandrake 8.0, freebsd and debian on the same machine at the same time...
mind you, 2 hard drives, but that's only a disk space issue

lilrabbit129
08-09-2001, 04:52 PM
Well i know you can do it using bootdisks...

right now i got RH 7.1 and Slack 8.0 multi-booting with WinMe.

using 2 bootdisks

DMR
08-10-2001, 01:24 AM
Yes, it definitely can be done, and without boot floppies. I'm dual-booting Redhat and Drake now (was triple booting with Win98), and have set aside partitions for Slack and Deb, which I'll install shortly.

As suggested by optech, you do it by allocating partitions to each distro. My setup is similar to his, in that I'm booting mutiple OSs across 2 drives, so it should be even easier for you since you're only dealing with one drive.

I've created separate /boot, /, /home, /usr, etc. partitions for each distro, but you don't even need to go that far (partition mangement gets kind of hairy if you do).
I think at least a / partition per distro is mandatory, but 1 swap partition can be shared by all of your distros, as can perhaps /var and /tmp, although I'm not sure about those.

I originally created a /boot partition for each, but afterwards I found it easier in terms of configuring LILO, which I use as my boot-loader, to put my different distro's kernels in one /boot partition. Here's my lilo.conf as an example: boot=/dev/hda <-- I installed lilo to the MBR of hda
map=/boot/map
install=/boot/boot.b
vga=normal
default=MD8
keytable=/boot/us.klt
lba32
prompt
#message=/boot/message
menu-scheme=wb:bw:wb:bw
image=/boot/vmlinuz-2.4.3-20mdk <-- this kernel, and my RH kernel, reside in the same /boot dir
label=MD8
root=/dev/hdb6
append=" quiet"
vga=788
read-only
image=/boot/vmlinuz-2.4.3-20mdk
label=MD8-failsafe
root=/dev/hdb6
append=" failsafe"
read-only
image=/boot/vmlinuz-2.2.14-5.0
label=RH6.2
root=/dev/hda8
vga=788
read-only
Sorry, not sure why the font inside the CODE tag looks so crappy- perhaps it won't in your browser...

[ 10 August 2001: Message edited by: DMR ]

bdl
08-10-2001, 02:09 AM
You can absolutely dual/triple/quad boot whatever you want on your system, but as the other posts mentioned, it takes a bit of juggling to do so in some cases. Personally I had Slack, Debian, FreeBSD and yes, the dreaded Windows on one machine, but it's just too much to keep up with. I now only run Debian on this machine and have a dedicated box for BSD. Not that that helps you any. ;)

The trick I found was to just use a big old '/' (root) partition for the multi-distro setup, with maybe a seperate '/boot' and '/var' for the one distro you absolutely run all the time. You pick one to be the controlling distro, i.e. the one that actually installs LILO (or Grub) to the HDD, whether it's to the MBR or to the active partition. You dont really want to fool with having two or three distros sharing a '/boot' partition and it's completely unnecessary. All the installed distros, including BSD, can share the same swap partition. Whatcha do is, you install each OS in its order, with the controlling OS last (or have a bootdisk to get back and forth between distros as you perform the installs). As you install each Linux or BSD distro, have them ONLY install LILO or their bootloader to their OWN partition. The controlling Linux install will either install LILO to the MBR or to it's own active partition, namely '/boot' or '/' (root). You add a stanza to the lilo.conf file like so:



other=/dev/hda2
label=Slackware
table=/dev/hda



So /dev/hda2 has a self-contained Slackware install with its own LILO installed to /dev/hda2, rather than to the MBR as normally would be the case. When the controlling LILO loads up, you choose 'Slackware' and it hands control over to /dev/hda2, which goes through a LILO menu of its own. You do the same thing with any other install, each one controls its own boot, and it can be done across multiple HDD's. Hope this is helpful. Luck!

Sawz
08-10-2001, 02:44 AM
thats easy, you just gotta make alotta partitions,(only 1 swap needed though) - then its just a matter of adding additional image sections in lilo.conf.

lazyboy
08-10-2001, 09:03 PM
Thanks you all for enlightening me. I am very happy that many responded and I already have answers to my questions. Thank you so much! Got my hands on redhat, slackware and drake. Hope to do it tomorrow.

ethereal
08-11-2001, 02:44 AM
You should be able to make one partition and mount it at /home for every distro, then regardless of which distro you use, you'll have the same desktop settings.

However, I'd like someone to say this won't cause problems, because I'm not sure it won't as I haven't tried it.

lazyboy
08-11-2001, 05:01 AM
By the way, here's how I go about it...
I have two IDE drives /dev/hda1 (20GB)and /dev/hdc (17.2 GB).

/dev/hda1 #windoze 7GB
/dev/hda2 # /boot (Red Hat 7.1) 100MB
/dev/hda5 # /usr (RedHat 7.1) 3GB
/dev/hda6 # /home (Redhat 7.1) 2GB
/dev/hda7 # /var (RH 7.1) 700 MB
/dev/hda8 # /tmp (RH 7.1) 150MB
/dev/hda9 # / (RH 7.1) 250MB
/dev/hda10 #swap 512MB
/dev/hda11 # /usr (Slackware) 2GB
/dev/hda12 # /home (Slackware) 2GB
/dev/hda13 # / (Slackware) 1 GB
/dev/hdc1 # /boot (Slackware) 150MB
/dev/hdc2 # /boot (Mandrake) 150MB
/dev/hdc5 #/usr (Mandrake) 3GB
/dev/hdc6 # /home (mandrake) 2GB
/dev/hdc7 # / (Mandrake) 1GB
/dev/hdc8 # windoze (remaining unpartitioned space)

is this configuration ok? RH lilo will be installed in MBR. Slackware LILO will be installed in /dev/hdc1. Mandrake LILO will be installed /dev/hdc2.
My LILO file will be like this:

#/etc/lilo.conf
#This is the file created by Red Hat installation and is installed in the MBR.
boot=/dev/hda
map=/boot/map
install=/boot/boot.b
lba32
prompt
image=/boot/vmlinuz-2.4.2-2 #RH kernel
label=Red Hat Linux
root=/dev/hda9
read-only
other=/dev/hdc1 #slackware kernel
label=Slackware
other=/dev/hdc2 # drake kernel
label=Mandrake

Here is the slackware LILO:

boot=/dev/hdc1
install=/boot/boot.b
map=/boot/map
lba32
prompt
image=/boot/vmlinuz #Slack kernel
label=Slackware
root=/dev/hda13
read-only

Here is drake lilo:

boot=/dev/hdc2
install=/boot/boot.b
map=/boot/map
lba32
prompt
image=/boot/vmlinuz #drake kernel
label=Mandrake
root=/dev/hdc7
read-only


Please check if I got it configured correctly.
[ 11 August 2001: Message edited by: lazyboy ]

[ 13 August 2001: Message edited by: lazyboy ]