Jump to content

BL-02: Will LILO boot a second Linux Distribution?


Recommended Posts

Browse: [About the FAQ Forum] [Table of Contents] [FAQs] [Contribute] [BL: Bootloaders]

 

BL-02: Will LILO boot a second Linux Distribution?

 

I would like to install a second Linux distribution in addition to my current distribution. How do I setup the LILO boot manager to boot either distribution?

 

Why do this? Perhaps you want to experiment with a new distribution of Linux? Or perhaps you have Mandrake Linux installed and want to beta-test a new version without replacing your old version.

 

Some rules to consider while reading this FAQ :)

 

1. Regardless of the number of distributions you have installed, only one distribution is pointed to by the Master Boot Record (MBR) and that distribution contains the setup for LILO.

 

2. Each distribution has a /boot directory in its root partition. The /boot directory contains all the resources LILO needs to boot into that distribution.

 

3. LILO requires each distribution's root partition to be mounted from the standpoint of the distribution controlling LILO. It does not matter where it is mounted, it simply must be available so LILO can access each distribution's boot directory.

 

 

Before continuing, decide on which distribution will control LILO. Boot into this distribution and su to root. In the example below, the first distribution is Mandrake 9.0. MDK 9.1 will be controlling LILO.

 

1. Create a mount point for MDK 9.0. E.g. /mnt/MDK90.

 

2. Edit your /etc/fstab file and add an entry that mounts the the partition containing your first distribution's root partition. Save and quit.

 

3. In a command-line console, type

mount -a

This will mount your recent changes to the /etc/fstab file. Go to/mnt/MDK90. You should be able to view your MDK 9.0 root partition files.

 

4. Locate the file /mnt/MDK90/etc/lilo.conf. List or edit the file. Get a copy of the entry related to your MDK 9.0.

 

5. Edit the file /etc/lilo.conf and paste the copied entry into the bottom of the file.

 

6. Modify the entry. You need to update the vmlinuz and initrd.img lines to point to /mnt/MDK90/boot/. In the example below, you will see an entry for MDK 90, MDK 91, and for good measure, Windows.

 

image=/boot/vmlinuz 

       label=Mandrake91

       root=/dev/hdb8 

       initrd=/boot/initrd.img 

       append="devfs=mount hdc=ide-scsi hdd=ide-scsi acpi=off" 

       read-only 

]image=/mnt/MDK90//boot/vmlinuz 

       label=Mandrake90

       root=/dev/hdb5 

       initrd=/mnt/MDK91//boot/initrd.img 

       append="devfs=mount hdc=ide-scsi hdd=ide-scsi" 

       read-only 

other=/dev/hda1 

       label=windows 

       table=/dev/hda

 

Save and quit.

 

7. At the command-line prompt, type

 

lilo

 

Each OS from your lilo.conf file should be listed in the output. Keep an eye out for any errors. Do not reboot if you find errors, figure out the problem first. Remember, in order for this step to work, /mnt/MDK90 must be mounted.

 

8. Reboot and test your new setup.

 

This process may be applied for any number of Linux distributions. Enjoy :)

Link to comment
Share on other sites

 Share

×
×
  • Create New...