Dual boot with RHEL 7.6 beta

Latest response

I'm trying to do dual boot with CentOS 7.5 and RHEL 7.6 beta. I know there is a solution available[1], but it seems that the beta software is not working. I tried the procedure wit CentOS 7.5 and Fedora 28, and works fine. With Red Hat, it presents the CentOS prompt, but it tries to boot the Red Hat instead, and fails. I see that progress bar at the bottom of the screen. My /boot/grub2/grub.cfg is intact, that is, CentOS only.

The question is if this is because it's a beta version or is this really the way Red Hat is going to work?

Thanks for your attention.

Regards.

Marcelo
[1]
https://access.redhat.com/solutions/45409

Responses

Hi Marcelo,

You seem to have the systems installed on a machine which has a Legacy BIOS, because on modern machines with UEFI based
BIOS each system has its own boot loader located in a separate directory on the efi partition. Now to your problem : What you
describe can happen after a new kernel on one of the systems gets installed. The solution is to update the GRUB configuration
first on the system where the new kernel got installed and then boot into the other system and update the configuration there.
So, this means that you have to execute sudo grub2-mkconfig -o /boot/grub2/grub.cfg manually on both systems. :)

Regards,
Christian

Hi Christian

I repeated the test, this time taking into account your suggestion to run grub2-mkconfig. The result was very confusing to me.

After installing RHEL beta, and run the grub "mkconfig" command, but all entries from CentOS were "renamed" to "Red Hat...". Before "mkconfig":

menuentry 'CentOS Linux (3.10.0-862.11.6.el7.x86_64) 7 (Core)'...
(...)
linux16 /vmlinuz-3.10.0-862.11.6.el7.x86_64 root=/dev/mapper/centos-root

After:

menuentry 'Red Hat Enterprise Linux Server (3.10.0-933.el7.x86_64) 7.6 (Maipo)'
(...)
linux16 /vmlinuz-3.10.0-933.el7.x86_64 root=/dev/mapper/rhel-root
(...)
menuentry 'Red Hat Enterprise Linux Server (3.10.0-862.11.6.el7.x86_64) 7.6 (Maipo)' <-- CentOS!!
(...)
linux16 /vmlinuz-3.10.0-862.11.6.el7.x86_64 root=/dev/mapper/rhel-root

Towards the end of grub.cfg, there is a valid entry for CentOS:

menuentry 'CentOS Linux release 7.5.1804 (Core)...

Booting with this option, and running "mkconfig" again, create a situation that is the opposite: everything is CentOS, and in the end of the grub.cfg, there is an entry for Red Hat. Which creates the following situation:

[mgarcia@localhost ~]$ uname -r
3.10.0-862.el7.x86_64  <-- definitely centos
[mgarcia@localhost ~]$ cat /etc/os-release 
NAME="Red Hat Enterprise Linux Server"
VERSION="7.6 (Maipo)"
(...)

and

Booting with CentOS:
[mgarcia@localhost ~]$ uname -r
3.10.0-933.el7.x86_64  <-- definitely RHEL
[mgarcia@localhost ~]$ cat /etc/os-release 
NAME="CentOS Linux"
VERSION="7 (Core)"

I restarted the test, this time following the procedure to install dual-boot. Paying special attention to step "7", to dont't install the boot loader. It's here that I think there is a problem with Anaconda, although it didn't touch the grug.cfg file, something was installed that it tries to boot Red Hat. I see the progress bar loading Red Hat.

Fedora works as expected, that is, no changes to grub.cfg, but the files where copied to boot partition, so I can boot into CentOS, edit the grub.cfg by hand, and add the Fedora entry. Then I have a perfectly running dual-boot system.

Hi Marcelo,

The main problem is that CentOS and RHEL are basically the same thing, especially when it comes
to the boot loader here. What you can try is to boot into CentOS rescue mode and reinstall GRUB.
If that also doesn't lead to the desired results, the only thing left would be to add RHEL manually.

I don't know if it works, but give it a try ... execute sudo vi /etc/grub.d/40_custom, add the boot menu entry and then sudo grub2-mkconfig -o /boot/grub2/grub.cfg afterwards. :)

Regards,
Christian

Hi Christian

What puzzles me is that I unticked the option to install the boot loader, so I should get a pure CentOS boot. I understand that RHEL and CentOS are very similar, but Anaconda should respect the request to not mess with boot loader.

When the boot fails, I see in the rd.shell, that Plymouth was started: "Started Plymouth Boot Screen"... but then it seems that Plymount(?) can't find my disk:

dracut-initqueue[273]: Warning: dracut-initqueue timeout - starting timeout scripts,
dracut-initqueue[273]: Warning: Could not boot.
dracut-initqueue[273]: Warning: /dev/centos/root does not exist
dracut-initqueue[273]: Warning: /dev/centos/swap does not exist
dracut-initqueue[273]: Warning: /dev/mapper/centos-root does not exist
Starting Dracut Emergency shell

I was able to boot with USB, and edit the grub.cfg to add the RHEL menuentry. Now I can boot Red Hat, but not CentOS.

In my opinion the Red Hat installer (Anaconda?) has a bug because it ignores the request to don't install boot loader.

Hi Marcello,

Well, in this case you should consider to report that Anaconda bug -> https://bugzilla.redhat.com/

Regards,
Christian

Hi Christian,

We solved the problem. It only happens when you install CentOS 7.5 and Red Hat 7.6. Somehow the CentOS initramfs is broken during the Red Hat installation. The solution is boot into the rescue mode (I used the CentOS media), and inside the chroot /mnt/sysimage issue the command dracut -f to regenerate the CentOS initramfs. I used the rescue mode because I was thinking that the problem was with grub in the MBR. Thanks for your help.

Hi Marcelo,

That's great news, I'm glad you appreciate the assistance and that you could figure it out.
I think that this will be fixed and work as expected when the final version gets released. :)
Although it makes me wonder how a RHEL install can affect the initramfs of CentOS.

Regards,
Christian

Hello everybody ! I have a windows 7 on a SSD disk and RedHat 7.6 Beta on an other one. Windows was installed first. I have installed the RH system, but my computer boot only on Windows. grub2 is installed on the RH system but Windows does not appears in the grub.cfg file. How can I update the grub.cfg file ? What line for windows, can I write in the config file ? Thank you so much for your answers. Alain

Hi Alan,

Assuming you have a Legacy BIOS ... there can be only one boot loader installed in the Master Boot Record. On
machines with UEFI BIOS you can manage the boot loaders with the efibootmgr tool. As you have installed the
systems on different disks, I suggest to use the Windows boot loader and add RHEL there. Here's what you need
to do : First copy and export the Linux boot sector by booting from a Linux "Live" medium like GParted ... open
a terminal there and execute the following two commands :

sudo mount /dev/sdYY /mnt
dd if=/dev/sdXX of=/mnt/linux.bin bs=512 count=1

Note : sdXX = the RHEL system partition | sdYY = the Windows system partition

Shutdown the PC - remove the Linux Live medium - start the PC - boot Windows - open command prompt as administrator and execute the following three commands :

bcdedit /create /d <name> /application bootsector
bcdedit /set {***} device partition=c:
bcdedit /set {***} path \linux.bin

Note : *** = the identifier of the new entry in the BCD store | <name> = the name of the system (e.g. RHEL)

Reboot the computer and now you will see the RHEL entry in the Windows boot menu ... boot into RHEL ... :)

Regards,
Christian

Thank you so much Christian. I not hope to read a so good and complete answer, but it's magic to read you. Many many thanks Christian. Alan

You're welcome, Alan ! I'm glad that you find the instructions to be useful and that they could help you a bit. :)

Regards,
Christian

Hi everybody :-) is there an option existing to install and config grub in the same time of the RedHat Installation ? I don't find any thing like this to perform this way while installing RedHat on my second PC. Is there only the possibility to update the boot sector ? Nothing in the RedHat parameters to configurate grub ? Thank you all for your answers

Hi Alan,

When you install the system, GRUB gets installed and configured automatically. If you want to change something,
you have to do this after the installation is finished. By the way, this question would have better been posted as a
new question - right because more members can find it ... this thread is specifically about dual booting with RHEL Beta. :)

Regards,
Christian

I can only think in a Kickstart file.

root@host# cp -r /media/rhel5/isolinux /tmp/
root@host# cd /tmp
root@host# cp /path/to/ks.cfg isolinux/
root@host# chmod u+w isolinux/*
root@host# mkisofs -o file.iso -b isolinux.bin -c boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table -R -J -v -T isolinux/

And to start the installation after booting from the CD:

[root@esdm001 isolinux]# more isolinux.cfg
(...)
label esdm002
  menu label ^Install esdm002
  menu default
  kernel vmlinuz
  append initrd=initrd.img ks=cdrom:/esdm002-ks.cfg
(...)

I hope this helps.

Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.