Ubuntu – How to dual boot two different Linux distributions


I am looking for a way to multiboot windows, lubuntu (natty), and arch linux.

I know how I could set it up, but I want to know the right way.

Right now each distro has their own grub install, and their own /boot

Is there a way to use the same /boot?
Or maybe I should just uninstall the one from arch and have the lubuntu one do the job.

EDIT: maybe I can chain load one to the other? That might not be the right way, but it's certainly an easy and maintainable solution.

Update: so I did some research, and there are a two ways to do this.
First off, I have grub1 on arch and grub2 on lubuntu (no particular reason, this is default)

  1. Use a single grub install from either distro.
  2. chainload from one install to another by installing the grub bootloader onto a partition.

First, I tried to do 2., but grub-install (grub2) gave me this big warning about installing onto partition, so I decided this was a bad idea.
Then I figured that I could just use the grub1 install on ubuntu and grub-update would auto detect arch linux. So, I resintalled grub2 onto the MBR, but grub-update was not able to auto-detect arch.

#So, my updated question is…
what do I need to add to grub.d to either make it auto-detect arch, or just make a manual entry?

There is nothing wrong with a manual entry, but an example script that does this would be useful..

EDIT: looks like it was a problem with chrooting into lubuntu from arch. I reran update-grub from lubuntu and it works fine now.

Best Answer

From talking to the people in #archlinux, I got quite a few ideas on how to do this

  1. Uninstall grub from arch and simply use lubuntu's grub install. You would use lubuntu's grub install over archlinux's, because lubuntu changes kernel versions alot and has multiple entries in grub.cfg, etc.
  2. Chainlink grub installs. See here. You need to do grub-install /dev/sdaN with grub2. It will complain about installing to a partition and fail, but I am sure there is a way to override this.
  3. Use a single /boot. Arch and lubuntu grub2 installs can coexist. I didn't like this solution because it seems like kernel updates could overwrite one another. Maybe not with an ubuntu and Arch combo.. but certainly with other combos.
  4. uninstall grub2 from lubuntu and use the grub1 install from Arch. And then use a symlink from /boot/kernel > /boot/actual_kernel_name. This requires manual tasks, so I opted against it.

I ended up with 1. This way update-grub will work correctly within lubuntu.
If I ever need to update it in Arch I can always use grub-mkconfig /mnt/lubuntu/boot/grub.cfg (actually, this will use Arch's grub.d and I don't want to have to maintain two of them. hmm.)

Related Question