Triple booting Linux distros with a mix of GRUB2 and GRUB legacy, Part 2

Instructions on how to multi-boot with a mix of legacy and 2.

DISCLAIMER: this method erases your entire hard drive and repartitions it. If you are uncomfortable mucking about with partition tables, go look at some beginner resources and tutorials on fdisk, gparted, and disk partitioning in general. This is not a method or tutorial intended for n00bs; there are some advanced concepts here. Be prepared to start from the beginning a few times if you mess up; since you’re wiping and repartitioning from the start, you won’t have lost anything but time. I restarted this a couple of times before I got it right.

THEN I wrote it down so I could look all smart and stuff.


    (1) Determine in advance which distros use legacy and 2.

    (2) Pick the legacy distro which has the easiest, most
    attractive boot screen. In my case, it was openSUSE.

    (3) Get ready to use that one first.

    (4) Use an Ubuntu LiveCD (even if you’re not planning on installing this distro, since the Ubuntu LiveCD is the most intuitive and useful) to boot from CD. Do not install anything at this time.

    (5) Using your favorite disk partitioning tool (gdisk, fdisk, gparted, etc), partition your hard drive into: (1) a teeny boot partition; (2) swap area; (3) root partitions for each of your distros that are at least 10GB in size; (4) home partitions for each of your distros that are at least 10GB in size; (5) a mega big data partition.

    (5a) To install and use gdisk from the Ubuntu LiveCD, open a browser, go here:, download it to any folder (the default will be /Desktop), open a terminal shell, navigate to that folder, and use this command: sudo dpkg -i gdisk_0.6.10-1_i386.deb.

    Instructions on using gdisk (with thanks to srs5694 from the Ubuntu Forums) if necessary:

    (5c) Boot an Ubuntu installer or an emergency disc, like Parted Magic or System Rescue CD. If using an Ubuntu installer, boot it into a recovery mode so that you can get a shell rather than booting straight into the installer.

    (5d) Launch a text-mode shell. If you’re using an Ubuntu installer, type “sudo apt-get install gdisk” to obtain and install GPT fdisk (gdisk). If this doesn’t work, use the method I described above to get gdisk.

    (5e) Type “sudo gdisk /dev/sda” (you can omit “sudo” on some emergency disks).

    (5f) Type “o” and answer “y” to the verification prompt to create a fresh partition table. Note that this will wipe out all your existing partitions.

    (5g) Type “n” to create a new partition. Give values of: partition #1, start sector 2048, end sector +1M, hex code of EF02. This creates the BIOS Boot Partition.

    (5h) Type “n” to create another new
    partition. Give values of: partition #2, hit enter for the default start sector, end sector +20G (or however big you want the Ubuntu main installation to be, minus space for your user files), hex code of 0700 (the default). This creates what will be the Linux root (/) partition.

    (5i) Type “n” to create another new partition. Give values of: partition #3, hit enter for the default start sector, end sector +2G (or however big you want to make your swap space), hex code of 8200. This creates a Linux swap partition.

    (5j) Type “n” to create another new partition. Give values of: partition #4, hit enter for the default start sector, hit enter for the default end sector (to use the whole disk), hex code 0700 (the default). This creates what will be the Linux /home partition. If you want other partitions, you should set some other end value and create additional partitions at this point.

    (5k) Type “p” to review your partition table. It should have an EF02 BIOS Boot Partition, two
    Linux/Windows data partitions, and a Linux swap partition. If it doesn’t, correct the problems or quit by typing “q” and start again.

    (5l) Type “w” to save the partition table.

    (5m) If necessary, reboot into the Ubuntu installer; or just launch the installation process. When you get to the disk partitioning section, tell the system to do custom partitioning, but do not start from scratch. Instead, tell it to use /dev/sda2 as root (/), /dev/sda3 as swap, and /dev/sda4 as /home. (Adjust these partition IDs as necessary, if you deviated from the numbers I specified earlier.) The installer will create new filesystems or swap space on these partitions. You should not tell the installer to do anything with /dev/sda1; when the system installs GRUB, the GRUB installer should use /dev/sda1 automatically.

    (6) Now, install your chosen legacy distro to the first root partition you want, with its data at its own home. Mount the big data partition as /data or whatever you want. Do not mount
    the other partitions; those are for your other distros.

    (6a) When installing the bootloader, specify that it’s to be installed to the hard disk. Grub legacy will find the mini partition and do its thing.

    (7) Check to find out if the BIOS partition has its boot flag flying.

    (7a) Boot a live disk of some kind; Ubuntu LiveCD works.

    (7b) Launch a shell.

    (7c) Type “sudo fdisk /dev/sda”.

    (7d) Type “p” to view the MBR partition table. It should show one partition, with “ee” in the “Id” column. This is normal, even though you created several GPT partitions. Is there a ” * ” under the Boot column? If not, proceed with steps 7e-7h.

    (7e) Type “a” and enter “1” (or whatever the partition number is) when prompted.

    (7f) Type “p” again. You should now see an “*” under the “Boot” column.

    (7g) Type “w” to save the changes.

    (7h) Remove the emergency CD and reboot. You should not need to re-install.

    (8) Install the other
    distros to their own root partitions; the legacy ones first. You may need to reflag the BIOS boot partition after each install; you DEFINITELY need to specify that each distro’s bootloader is to be installed to its own root partition. IF YOU DO NOT DO THIS, YOU MAY OVERWRITE THE BIOS BOOT PARTITION AND NEED TO START FROM THE BEGINNING.

    (9) Install any Grub 2 distros, also specifying the bootloader installation to their own root partitions.

    (10) Run sudo update-grub from your first distro. After booting, check to make sure that you have boot options for each of your other distros. If not, you may need to add chainloading boot entries.

    (10a) For further discussion on chainloading (dead simple and requires minimal editing of your /boot/grub/menu.lst file), see here:

After each install, I checked, updated grub, added the relevant entries, reflagged the boot partition,
and by the time I was done, I was triple booting.

Any questions?

Triple booting Linux distros with a mix of GRUB2 and GRUB legacy, Part 1

I’ve been experimenting with other distros. I just got a 2TB internal Western Digital Caviar Black, and there’s just too much room there NOT to create nine partitions and get my distro freak on.

I know, Kubuntu baybee, but it’s not you, it’s me. I just can’t stay faithful to one distro, and you KNEW that when you seduced me with your ease of installation, friendly user community, and sexy Compiz+KDE desktop. Let’s still be friends, and you’ll always be my main squeeze.

As with so many other things, as long as you know how to do it, it’s easy. If you don’t, it will be the little things that trip you up. In my case, it is a buggy BIOS version. I have to reflag the BIOS boot partition each time I install another OS.

Should you want to be Crazy In Love with many different distros, you are likely to run across the issue of a mix of GRUB legacy and GRUB2. These are bootloaders–the things that make your hardware know what
software to run. There’s a leetle tiny bit of code at the beginning of each bootable hard drive that tells your machine that there’s an operating system available to run the machine. That’s the MBR–the master boot record.

I had a hellacious time figuring out why my BIOS wouldn’t find a working OS any time I installed a grub legacy OS to another partition (since grub2 was loading my Kubuntu installation). I still don’t know why chainloading grub through grub2 will NOT work with my BIOS, and chainloading grub2 through grub legacy works like a dream, but it seems like the sort of arcane knowledge only possessed by Elminster or Gandalf.

So, the recommendation from yours truly? Use a grub legacy distro to write to the MBR and use that to chainload grub2. Instructions to follow in the next post 😉