2

I am currently dual-booting Windows 8 and Ubuntu 14.04, and would like to get some familiarity with linux server admin. I plan to install CentOS and maybe host a small website or something. What will happen to grub after installing CentOS?

3 Answers 3

1

You'll need to reinstall/update grub. I had the same issue after installing CentOS 6.4 on top of my Ubuntu 14.04. Following this post fix my problem:

http://muthusaravananmca.wordpress.com/2010/09/29/ubuntu-grub-recover-after-installing-centos-or-windows/

(Just to clarify that in Step 4: use "--root-directory ...") Hope it helps.

0

If everything is using EFI, it won't have much effect.

  1. CentOS will make itself first in the boot order. You can change that back to Ubuntu by using your EFI system menu.
  2. Once you have set Ubuntu back to first in the boot order, run sudo update-grub to add CentOS to your grub menu.
  3. If you have any trouble getting into the EFI system menu, you can also boot into Ubuntu from the CentOS grub menu, reinstall grub with sudo grub-install /dev/sda, and follow that with sudo update-grub. Re-installing grub will set Ubuntu first in the boot order and updating will add the new OS to the boot menu.

If everything is in legacy mode using MBR, things will work out much the same; but it's just a little more cumbersome to keep things set the way you want.

  1. When you install CentOS or any new OS, if there is an option to not install a bootloader, use it. (CentOS using the new Anaconda installer should have that option, although it may be a little tricky to find.)
  2. If you can't avoid installing a bootloader, try to install it to the same partition where you are installing the new OS. This will prevent it from overwriting the MBR.
  3. In either case, after installing boot into Ubuntu and run sudo update-grub to add the new OS to the boot menu.
  4. If you cannot use either of the above options or simply forget and overwrite the MBR, use the new OS's boot menu to boot into Ubuntu then reinstall grub with sudo grub-install /dev/sda, and follow that with sudo update-grub.
3
  • I have an EFI system but the installation took place with a Live USB that wasn't created for EFI systems, I am booting Legacy. What does that change?
    – Joe
    Aug 4, 2014 at 14:37
  • Is Win8 in EFI mode while Ubuntu and addtional OS's are in legacy?
    – chaskes
    Aug 4, 2014 at 14:59
  • Nope, both are legacy. I installed Win8 from a USB created using Win7 USB/DVD download tool.
    – Joe
    Aug 4, 2014 at 15:01
0

I had a corrupted boot configuration for Centos 7 and installed Ubuntu 18 in an effort to get grub up & running. Windows 10 was found but not Centos by either update-grub or the boot repair package/utility under Ubuntu.

On the other hand, when I used the Centos 7 rescue utility to get their version of grub running & Centos back up (https://www.tecmint.com/recover-or-rescue-corrupted-grub-boot-loader-in-centos-7/),

the following command found Ubuntu w/ no problem (https://unix.stackexchange.com/questions/152222/equivalent-of-update-grub-for-rhel-fedora-centos-systems) :

grub2-mkconfig -o "$(readlink /etc/grub2.conf)"

And so I now have a tri-boot system : Windows 10, Centos 7 & Ubuntu 18 :)

Conclusion : when in doubt, user Centos' grub2-mkconfig to pick up your bootable systems.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .