0

I just added CentOS 7 to an existing Ubuntu system (using GRUB 1.99). When I do a grub-mkconfig -o /boot/grub/grub.cfg, it detects the CentOS, and adds two entries (one looks like normal, one like rescue). However, when I try booting them, I get error: you must load the kernel first.

How can I configure grub to boot CentOS? I'd prefer autoconfigure, but, if need be, I'll type in the commands manually.

1 Answer 1

0

CentOS 7 ships with GRUB 2.02. Chances are, 1.99 doesn't have the right stuff to load the CentOS 7 kernels, so you will need to upgrade to 2.02.

You're almost there (running grub-mkconfig) but unfortunately you will need to boot from a CentOS 7 rescue disk (USB or DVD) and re-install GRUB 2.02 over top of 1.99 first. 2.02 will recognize and boot Ubuntu but not the other way around.

I strongly suggest you take an image of your hard drive with a tool like CloneZilla before progressing, just in case, and, if you haven't already, read through:

RHEL 7 System Admin Guide Fedora GRUB 2 Guide

Then

  • Boot from a CentOS rescue disk.
  • Install grub to /dev/sda (or whichever device is your hard drive - it could be /dev/hda if you have an IDE drive)
  • Exit the rescue shell (reboot your machine)

GRUB 2 will start. Hopefully your CentOS entries will be valid (unless 1.99 created erroneous entries).

If not, you will need to boot into CentOS using a GRUB 2 boot disk like Supergrubdisk.org

Once in CentOS 7, run the grub mkcnofig command to correctly set up the CentOS 7 entries (and it will detect the Ubuntu install).

You must log in to answer this question.

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