There are easy ways to do things, and there are hard ways. My Dad used to tell me that I spent more time figuring out the easy way, than it would have taken to do it the hard way. Ah, but the next time around, the easy way paid off. When it comes to multi-booting, there are many methods, I like the easy way.
I avoid Microsoft Windows™ like the plague, so I am talking about booting multiple versions of Linux. I have not tried it, but this approach should work with Solaris X86 and FreeBSD, as long as GRUB (Grand Unified Boot loader) is used as the boot loader.
Over the years, I have tried the following approaches:
- A shared boot partition. While this sounds good, it is open to conflicts in kernel names, initrd names, GRUB configuration difference, and upgrading to a new version of one distro create interesting conflicts. While it sounds like a simple solution, it is an administration nightmare.
- Each distribution has it is own boot directory, it own root partition, but share a home directory. This variation works, as long as each distro has a separate account name. Having a shared graphical login is messy, especially with different desktop managers. Upgrading to a new version of a distro or new distro is relatively easy. The real trap in this scenario is that distros have different numbering schemes for user IDs and group IDs.
- No shared directories. This is a breeze. You can even run LVM, as there are no conflicts with other distros. Changing distros is a snap.
So how do I do it? It make no difference whether it is a dual boot or trible boot or …, the process is the same:
- The major rule is the last one installed is the distro that I wish to boot by default. The first one to be installed is the one that has the least flexible disk configuration. If I was going to try and install something like Puppy Linux or Damn Small Linux, they have to be first. Remember, this example depends on using GRUB.
- As it turns out, I normally have to do a “manual” or “custom” layout for the disk. On the first installation, I create the swap partition and the root partition. Creating separate partitions for /var, /tmp. /usr, or other mount points, just makes the install more complicated. For the remaining distros, I just need to create a separate partition for root. I usually try and give each distro 8 gigabytes to avoid any issues with running out of disk space. Make sure you make a note of the partition on which the distro was installed. You will need this later.
- On the second and subsequent installations, I can’t boot the distros previously installed. This is OK, as I fill fix this problem after doing the last install.
Partition identification varies according to who is doing the identification. The BIOS, with whom GRUB communicates, identifies drives as hd(d,p), where d is the drive number, and p is the partition number. Since the BIOS starts number table element swith 0, hd(0,0) is the first drive, and the first partition on the drive. In Linux, PATA (previously known as IDE) drives appear as hdxp, where x is the drive letter (starts with a), and p is the partition (starts with 1). SATA drives use sdxp, with the same meanings as above. If you know the distro was installed on sda5, then the BIOS disk identification is hd(0,4) – partition number is one less.
With this information, I can now edit /boot/grub/menu.lst. This file is owned by root, so you need to use either sudo, or su to root. I have worked on UNIX since 1978, so I use su. However you become and whatever editor you use, you need to modify menu.lst on the distro that boots by default. For example on one laptop, Fedora is the default boot. So I added the following lines to the end of menu.lst:
title Linux Mint (/dev/sda5) root (hd0,4) configfile /boot/grub/menu.lst
You may also want to modify the timeout variable. This variable is the delay before GRUB autoboots the default entry in menu.lst. Fedora 10 set the timeout to 0, which is no delay. I changed to 10.
This approach makes my life easy, because only one menu.lst needs to be modified. If I replace Linux Mint with another version, or another distro, the boot would still work. I learned this trick from openSUSE, which is the only distro I know of that correctly finds and boots other distros.
Now, this is the easy way to multi-boot.


2 comments ↓
I ran through this post of yours while it was newly posted, but I disregarded it.
Yesterday, I was cramming to make my laptop multi boot, and I just couldn’t figure out how (chainload, you know). Eventually I knew, and then I read this post (again!)
I should have read this before preparing my machine for multi boot setup. Keep those great articles coming!
I used to fight with chainload, until I found the solution in the post. It is more flexible, and works.
Leave a Comment