[Techtalk] Booting multiple distros on one machine

Pierre Fortin pfortin at pfortin.com
Sat May 11 09:40:51 EST 2002


On Fri, 10 May 2002 10:35:53 -0700 Akkana <akkana at shallowsky.com> wrote:

> Mandi writes:
> > The initial lilo screen is a lilo.conf option.  The way mandrake has
> > been putting this together is the link you see in /boot.  Change the
> > link for/boot/lilo to point to /boot/lilo-menu and rerun /sbin/lilo. 
> > That should
> [other useful information]
> 
> That reminds me of a problem I've been wanting to solve.  I like to be
> able to check out other distros now and then -- drop in the latest when
> they come out and see how well they work.  It's easy to make a bunch of
> root partitions on my disk, and install different distros in each.  But
> what's the best way to make them share lilo information?  And what do
> you do about /boot -- separate partition, or part of root?  And can lilo
> and grub coexist?  I'm sure I'm not the only person who multi-boots;
> I'd be interested to hear what strategies other people are using.
> 
> I've found that lilo versions from different distros don't play together
> very well.  I tried having one /boot partition for the multiple roots,
> but when I ran Mandrake's lilo on a /boot that had been created by
> Redhat, lilo complained (problems with initrd version, I think it was).
> 
> What I'm doing right now: multiple roots, /boot is just a directory in
> each root filesystem.  One distro (currently Redhat 7.2) is the "master
> distro", the one I use most of the time, and its lilo.conf knows about
> kernels that exist on the /boot directories of the other distros.
> So if I run lilo from Redhat, I first have to mount /suse and /mandrake
> so that lilo can see all of the kernels.  In theory I could have the
> other two be equally omniscient, but in practice that's a hassle so
> I just make sure their lilo.conf files include an entry for the master
> distro so I can go back and fix lilo later, and I try not to run lilo
> from the other distros any more than I have to.
> 
> Obviously I'm not too happy with the arrangement.  What's a better way?
> Is there a way to make lots of different distros share one /boot?
> If I ever want to switch to grub for one distro, can I do that without
> losing access to all the lilo-using distros?  Would using grub for all
> the distros make this easier, or harder?

Akkana,

Everyone has an opinion on multi-boot...  :^)  So here's mine...

I prefer to setup multiple "/" and "/usr" partitions; but no "/boot". 
This way, I don't have to worry about cleaning up /boot when I overwrite
an old distro....  You seem to be doing the same thing.

I'd like to add some detail which you allude to...  to create a valid MBR,
using whichever distro is currently running, mount _all_ the distros:

In this example, all partitions are on the same drive; but can be
anywhere, and the mount points can be anywhere in the current
filesystem...  [Don't forget to keep good records as to what is on each
partition...]  Mounting the other distros' "/" (containing each one's
/boot) partitions :
  current:  /        on hda5  /usr        on hda6
  distroB:  /distroB on hda7  /distroBusr on hda8
  distroC:  /distroC on hda9  /distroCusr on hda10

The other distros' /usr are not necessary; the above table is just
intended to show the partitions used.

Then, in lilo.conf (note underlined stuff -- extra stuff removed):

image=/boot/vmlinuz
        label=linux
        root=/dev/hda5
                    ^^
image=/distroB/boot/vmlinuz
      ^^^^^^^^
        label=distroB  # label does not need to match
              ^^^^^^^
root=/dev/hda7
            ^^
initrd=/distroB/boot/initrd.img
       ^^^^^^^^
image=/distroC/boot/vmlinuz
      ^^^^^^^^
        label=distroC  # label does not need to match
              ^^^^^^^
root=/dev/hda9
            ^^
initrd=/distroC/boot/initrd.img
       ^^^^^^^^

The point being that lilo.conf must include the exact path as _seen_ from
the currently running distro in order to know setup the pointers in the
MBR.  If you forget to specify the proper paths in lilo.conf, you will
either get complaints from lilo, or it will appear to be fine -- until you
try to boot the other distros when you will then find that they all point
to the same (current) distro...  :^P

Note that this only needs to be done from _one_ distro...  there is only
_one_ MBR after all, and doing this from every distro would just overwrite
all the previous one.  So don't waste your time trying to setup every
distro just right...  in oder to keep everything straight and avoid a
future disaster, I use only the most recent install to setup the MBR.  It
has to be done anyway to include the latest install which is usually the
one I'm running when I decide to setup the lilo for the other distros.

Pierre



More information about the Techtalk mailing list