Multi-boot

Is it possible to multi-boot between openSUSE, CentOS and Fedora all on the same machine. How would I do that, I’ve currently got CentOS installed and am currently installing openSUSE but overwriting the CentOS /boot partition. I guess when complete I will have access to the new openSUSE installl but not to CentOS. Can I run Grub or Grub2 or something which can detect all Linux installations on the disk and write an apopropriate boot menu?

Thanks,
Nick

On 2012-05-15 16:06, Nick C wrote:
>
> Is it possible to multi-boot between openSUSE, CentOS and Fedora all on
> the same machine. How would I do that, I’ve currently got CentOS
> installed and am currently installing openSUSE but overwriting the
> CentOS /boot partition.

So, you destroyed CentOS. No multibooting.


Cheers / Saludos,

Carlos E. R.
(from 11.4 x86_64 “Celadon” at Telcontar)

Yes, it is possible. Even a Windows system may be there. But you must install the different OSs on different partitions. Though you may share one Swap partition between several Linux systems. And you could share a eventual seperate /home partition between Linux systems, but that may have unexpected effects. And you may share pure data partitions (e.g. where you have a database or the like), even when they contain a Windows type file system (which some restrictions).

But overwriting such a basic thing like a /boot partition will prevent any multi-booting.

This is just a test machine so I can soon reinstall CentOS, the bigger issue is how I can multi-boot between the two of them. Guess one way would be to put both on separate disk drives and change the drive order in the BIOS. Can Grub or Grub 2 not be installed to allow multi-booting.

Ok so if I install both openSUSE and CentOS each with their own separate /boot partition how do I then get to multi-boot between them.

I added openSUSE 12.1 to two different machines, both having other distros on various partitions. In both cases, the installer overwrote the MBR, even though I thought I set things up correctly to have grub installed to openSUSE’s /. Anyway, it was just a matter of reinstalling grub. In my case, I was using grub-legacy from Mepis 11 to boot the other distros, so I just booted into Mepis: Mepis System System Assistant > Repair System Boot. Then reinstalled grub on the MBR. It’s a different procedure if you need to reinstall grub2 – haven’t tried it myself, but apparently it’s no big deal to do so.

  1. A separate /boot partition is not needed with openSUSE (I do not know about CentOS).

  2. See that you have enough unpartitioned space and the openSUSE installer will think that that is the space to be used. It will then offer you a partitioninhg schema on that space (most probably using the extended partition) for three partitions, one for Swap, one for / and one for /home, or it even may see your existing (CentOS) Swap and propose to use that (which is fine).

  3. The installer will probably see your CentOS /boot place and offer you to include that in a multi-boot. When not, forget it for the moment, you can allways add that in the openSUSE GRUB menu.lst later.

In any case, I advise you to insert the instal DVD, and folllow the procedure until it shows you the proposal for the partitioning. Then study that in detail, change it when you need (you can go there in expert mode or what it is called). When in doubt, come back here, people are glad to help you. In that case, please add the output of

fdisk  -l

copied/pasted between CODE tags: http://forums.opensuse.org/english/information-new-users/advanced-how-faq-read-only/451526-posting-code-tags-guide.html

I would say that it is as simple as installing updategrub from my repo, then run udpateLegacyGrub to add boot entries to menu.lst (or grub.conf on Fedora) or updateGrub2 to refresh Grub2’s boot menu. It works on openSUSE and Fedora (there is a package for Fedora in my Fedora repo). You would need to add two lines of code to make updateLegacyGrub wrok on Centos (I don’t have Centos on multi boot machines). updateGrub2 might work on Centos, provided it is using Grub2 (I don’t know).

updategrub for openSUSE Legacy Grub (not update-grub!)

Installing Grub2 with updateGrub2

  • for Centos, you need to install os-prober. For openSUSE (and Fedora) it is installed by dependencies. AFAIK only my version of os-prober is able to detect openSUSE and Fedora kernels correctly. (Bug report is here: Access Denied).

  • This post is just about writing boot menus, not about installing the OSes … wherever you like.

So if I were to have three seperate /boot partitions and write the bootloaders into each /boot partition rather than to the MBR would that work:

CentOS - bootloader to /boot1 partition
openSUSE - bootloader to /boot2 partition
Fedora - bootloader to /boot3 partition

  1. You don’t need separate /boot partitions (meaning /boot located on another partition than / for each distro).
  2. Install Grub boot loader in the boot sector of the root partition for each distro (whether it is primary or logical).
  3. prevent openSUSE setup from writting a generic boot code into MBR: Uncheck write generic boot code to MBR
  4. Install The Grub of your choice into the MBR.

You can install Grub stage1 in several locations. If you’re unsure, install openSUSE first, then Centos, then Fedora and let Fedora install its Grub2 into MBR.

I only want to strengthen the answer of @please_try_again: Why are you still talking about seperate* /boot partitions for all those installations. One seldom needs a sepearate /boot* partition (maybe on some older systems where the BIOS can not boot from higher disk addresses). Forget them!

And I am still supporting the idea that you post the output of

fdisk -l

So all here can see for themselves what you have and are not dependant on what you tell.
(I will stop posting here as long as there is no* fdisk -l* output posted).

Hmm… I recall for some reason that I needed separate /boot partitions. Is that if the /root is in an extended partition or perhaps that was only if I used LVM that I needed separate /boot partitions. Would it be better to not use LVM volume groups and just have one simple primary partition for each distro?

Yes.

I woud say yes, but others might have different opinion. I personally use LVM + RAID on servers but not on desktops. You should use separate /home partitions though - either 3 different partitions or a single partition but with a different home base directory for each distro. This is something you have to set up (because the default home base directory is /home for all Linux). If you don’t know, use 3 different /home. You should share swap. You can share /tmp (but not /var/tmp). I suggest mounting by UUID under openSUSE* and not reformating the partitions you want to share, such as swap and /tmp - because reformating would change the partition UUID.

On 2012-05-16 17:56, Nick C wrote:
>
> So if I were to have three seperate /boot partitions and write the
> bootloaders into each /boot partition rather than to the MBR would that
> work:
>
> CentOS - bootloader to /boot1 partition
> openSUSE - bootloader to /boot2 partition
> Fedora - bootloader to /boot3 partition

Yes, but you would still need something to select which one to boot. If you
use a generic MBR, then you select which to boot by marking it “bootable”
with the partitioner.

Another scheme for multibooting:

  1. One small primary partition with one, text only, linux install. It has grub.
  2. Several Linux systems, each having grub in their respective root
    partitions, or boot partitions. They can be logical partitions.

When you boot, you get grub menu from system (1). This one has one entry
for each other Linux, booting their grub menus (not the kernels).


title Bombadil -- (via configfile in /dev/sda1)
root (hd0,0)
configfile /boot/grub/menu.lst

or

title Bombadil -- (via chainload)
rootnoverify (hd0,0)
chainloader +1

That is, you use one grub (installed in (1)) to choose which system to
boot, then you get the menu of that system.


Cheers / Saludos,

Carlos E. R.
(from 11.4 x86_64 “Celadon” at Telcontar)