I am looking for a flexiable or clean method to handle multiple operating systems installed on multiple disks on my machine. I find myself having to regenerate grub quite often.

Here is my disk layout:

[root@centos-host grub2]# lsblk
sda               8:0    0 238.5G  0 disk 
├─sda1            8:1    0   450M  0 part 
├─sda2            8:2    0    99M  0 part 
├─sda3            8:3    0    16M  0 part 
└─sda4            8:4    0 237.9G  0 part 
sdb               8:16   0 111.8G  0 disk 
├─sdb1            8:17   0   512M  0 part 
└─sdb2            8:18   0 111.3G  0 part 
sdc               8:32   0 111.8G  0 disk 
├─sdc1            8:33   0   200M  0 part /boot/efi
├─sdc2            8:34   0   500M  0 part /boot
└─sdc3            8:35   0   110G  0 part 
  ├─centos-root 253:0    0   108G  0 lvm  /
  └─centos-swap 253:1    0     2G  0 lvm  [SWAP]
sdd               8:48   0 111.8G  0 disk 
sde               8:64   0   1.8T  0 disk 
├─sde1            8:65   0   128M  0 part 
└─sde2            8:66   0   1.8T  0 part /mnt/Share
sr0              11:0    1  1024M  0 rom  

sda = windows

sdb = arch linux

sdc = centos

sdd = empty for now

sde = storage

As of now I primarily use windows, arch and centos. I would like to install another linux distro in the sdd disk but I already run into situations where grub breaks and I cant boot into my arch system. I dont want to bog the post with too much specifics but if someone can propose a solution or point me in the right direction that would be greatly appreciated.

  • 1
    As you have a separate HD for each system why not to use the BIOS provided boot device selection menu (most modern BIOSes allow to activate it by a key press during POST like F8, F12, e.t.c.) and not configure multi-boot in any on-disk boot loaders? – Serge Jul 4 '16 at 4:18
  • When i boot into BIOS/UEFI for whatever reason i only see the windows disk and grub entry for centos. Both the centos and arch installation were done using efi. Windows was installed using efi as well. – jes516 Jul 4 '16 at 4:23
  • If you don't need fast 3D graphics (e.g. games) on the linux distros, you could pick one as your "primary" distro and run the others with KVM or VirtualBox. That way you'd only have one of the systems changing the grub config (the issue is that your two distros both control the grub.cfg and either don't detect the other distro or are creating configs incompatible with the other distro). One advantage would be that you wouldn't have to reboot to run the other distro(s). Disadvantage would be you might have to buy more RAM. – cas Jul 4 '16 at 6:54
  • BTW, I don't know how Centos or Arch do it but on debian and derivatives, there's a package called os-prober, which grub can use to detect other operating systems and create entries for them in grub.cfg. Some quick googling reveals that os-prober is also packaged for Arch and Centos - have you installed it on both? – cas Jul 4 '16 at 7:00
  • @cas - arch has grub-probe which basically does the same as debian derivs: it installs os-prober and then calls it from grub-mkcinfig. – grochmal Jul 4 '16 at 23:35

You can keep the bootloader for each os on their respective drives and use the BIOS to choose which disk to boot. Every computer I have ever seen has a key you can press during the BOIS POST screen to take you to a menu of which device you want to boot from. Sometimes you need to enable it in the BIOS first. Generally the key is F8 on desktops but I have also seen it be F12 or F2 or ESC it depends on your motherboard (some tell you which key it is on the POST screen).

This method has the advantage of you can mess as much as you want with one distro without the risk of breaking the bootloader of another. It also allows you to wipe, replace, remove or add disks without worrying about disrupting the other distros. Also, you can reinstall windows without wiping/breaking your linux distros (though you may need to unplug the drives first).

Since the drives are all self contained you can also do some interesting stuff, like booting the other drives as in a vm but still maintain the option of booting it physically.

  • I see what your saying. I should create an efi partition on the disk itsself then use the bios/uefi menu to select the disk. Thats probably why the bios/efi menu does not recognize the other linux disks because i normally mount the efi system partition to the windows efi system partition. – jes516 Jul 5 '16 at 11:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.