Citation :
For booting different complete Linux installations - each kernel has its own root file system -, the first thing to do is to mount the root partitions of all installations with the Linux version used for starting Lilo. A constellation like the one shown in our illustration below first requires to start the Debian distribution in /dev/sda1 and to mount /dev/sdb1 as well as /dev/sdb2 for example in /mnt/slack and /mnt/deb_alt.
Now, the various kernel images can be added to /etc/lilo.conf:
image = /boot/vmlinuz
root = /dev/sda1
label = Debian
image = /mnt/slack/boot/vmlinuz
root = /dev/sdb1
label = Slackware
image = /mnt/deb_alt/boot/vmlinuz
root = /dev/sdb2
label = Alt
Calling /sbin/lilo now results in a choice of booting one of three Linux installations. However, this solution has a drawback: Every kernel compilation requires Lilo re-installation. Say you have installed a new kernel under Slackware, Debian must be re-booted, the other installations' root directories must be re-mounted and /sbin/lilo.conf must be called again. Only then can Slackware be started with the new kernel.
In the Debian distribution, Lilo is installed on /dev/sda1 but is meant to be able to boot all three Linux versions.
(Click on thumbnail for enlarged view)
As one central Lilo in MBR can start additional Lilos in the boot sectors of other partitions, there is a more comfortable option: A 'master' installation puts its Lilo in MBR, the remaining Linux installations boot with their own Lilos in the boot sectors of their own partitions. Only the 'local' Lilo must be re-written in case of alterations, the Lilo in MBR remains unchanged. It is not necessary to re-boot the 'master' installation.
/sbin/lilo of the Slackware installation in our example can then be started using this /etc/lilo.conf:
boot=/dev/sdb1
image = /vmlinuz
root = /dev/sdb1
/sbin/lilo will complain that an installation onto the second disk does not make sense. In principle, this warning is justified since a BIOS cannot detect the boot code in /dev/sdb1 - the Lilo in MBR installed under Debian, however, can. For this purpose,
other = /dev/sdb1
label = Slackware
must be added to /etc/lilo.conf under Debian. If the choice is Slackware, the Lilo in MBR will start the boot sector of /dev/sdb1; the Lilo installed there will then boot the Slackware kernel.
|