Dual Boot not working using Rocky 9 and windows 10

I have 2 ssds on my desktop, one with Win10 and another I installed Rocky Linux 9.
The installation seems to be in legacy mode and not UEFI for rocky but Win10 is UEFI.
With Rocky Linux 8, I used to have dual boot with no problem, but since I installed Rocky Linux 9, it was booting straigth to Win10 and no Linux option.

I did swap the boot mode:
1-Rocky Linux
2-Win 10

That was the setup I used to have before with Rocky Linux 8.

Also as per some guides, I have run **grub2-mkconfig -o /boot/grub2/grub.cfg** and grub did work with no Windows 10 option.

I do not know what else I can do. Also, the system is in LVM partition type in XFS file system execpt the boot.

What have I done wrong? Why grub no longer works as it used to work with Centos and Rocky Linux 8?

Do I need to install my Rocky Linux 9 as UEFI the same as my windows 10 OS?

I really need some help, as I cannot move and to boot to Windows I need to go to BIOS and choose the WIndows disk.

Could someone help me please?

I don’t have an answer for you. I do multi boot fedora / win10 OS’s but they are all on the same device. In the case where windows and fedora are on separate devices dual booting has been notoriously unreliable even if both are UEFI booting. If I understand it correctly you can use the firmware boot menu to select either rocky or windows, if that is the case I would leave it at that. It is actually the method I use for switching between the multiple OS’s on this machine.
As a possibility of getting windows to appear in your grub menu you might try mounting the windows esp partition to /mnt/vfat and then running the grub2-mkconfig command again as you did previously to see if this might help getting win10 on the menu, but other than that I am skeptical.

I too do use that. One starts by default, and the other can be selected via the firmware boot menu. No need for either to be known by the bootloader of the other.

That said, I have set some dual boots, both “both OS UEFI” and “both OS legacy”, where GRUB is the only used bootloader. The os-prober of grub2 either detects the Windows and creates an entry for it, or not. Either way, I’d create file custom.cfg into dir, where the grub.cfg is. The latter sources the former, if the former exists.

What is the proper incantantion to load Windows, the stuff in that file? I don’t know.

It does not help and it does not make sense to go to boot and then choose the OS.
I really need to have it as I used to have in centos and rocky 8 but thank you anyway

One more observation:
The os-prober (grub2-mkconfig) of legacy boot CentOS 7 did not autodetect legacy Windows by default, because there was no NTFS-support. Once NTFS-support was installed, the Windows was detected and boot menu entry could be created.

The UEFI ESP content is easier, because ESP has FAT32, but does the os-prober of legacy install probe ESP?


An entry generated by os-prober on UEFI install (UUID of ESP, nvme0n1p2, is 70D9-B082):

### BEGIN /etc/grub.d/30_os-prober ###
menuentry 'Windows Boot Manager (on /dev/nvme0n1p2)' --class windows --class os $menuentry_id_option 'osprober-efi-70D9-B082' {
        insmod part_gpt
        insmod fat
        search --no-floppy --fs-uuid --set=root 70D9-B082
        chainloader /EFI/Microsoft/Boot/bootmgfw.efi
}
# Other OS found, undo autohiding of menu unless menu_auto_hide=2
if [ "${orig_timeout_style}" -a "${menu_auto_hide}" != "2" ]; then
  set timeout_style=${orig_timeout_style}
  set timeout=${orig_timeout}
fi
### END /etc/grub.d/30_os-prober ###

Disclaimer: I’ve used the firmware boot menu to select secondary OS with el7, el8, and el9.

It seems that the issue was fixed after installing the Rocky 9 UEFI instead of Legacy mode.
That solve the problem.
What I did not understand is that why the /root partition was not able to be in lvm instead it said it needed to have a standard partition. I really want the /root file system to be lvm and not standard partition.
I was think if I have to add the both /boot/efi and /boot but /boot is only for legacy mode right?
During the UEFI installation /root needs to be in standard partition

That does not sound right.

  • In legacy the “BIOS” reads first bit of bootloader from sector 0 of a disk and the rest of the bootloader from the /boot/grub2/
  • In UEFI the “BIOS” reads the bootloader from the ESP (filesystem) – the UEFI “understands” GPT

Either way, the bootloader loads (linux) kernel and initramfs from /boot/, and the kernel mounts
/ (with instructions in initramfs) and loads the rest of OS from / (etc).

What is important is that the bootloader must be able to read the kernel. That rules out some filesystems and LVM for the /boot. The bootloader does not assemble VGs and LVs.

  • You can have directory /boot in filesystem /, but then that can’t be on LV (or have, say btrfs)
  • You can have / on LV (in fact that is the default), if the /boot is on a different filesystem
  • You can have /boot in filesystem / in legacy too

Glad to see that converting the disk to gpt and installing rocky in UEFI mode worked and windows showed up in the grub menu.
One other issue I faced in installing earlier versions of Rocky and Fedora in legacy mode on msdos disks was that the grub2-install command would fail saying that the image was larger than the allotted space in the mbr. I would have to force it to install. I know this because I always install new distro versions on a separate partition and test them before allowing them to become the default. If you install grub to the mbr via the graphical install process you may not know if this step was successful or not and may be the reason your first go around did not show a grub menu in legacy mode. All my systems are now UEFI because of those issues.

Well when I setup all my file systems,I did like this:

/boot/efi standard partition and XFS
/root LVM - XFS
/swap LVM - SWAP
/home LVM - XFS

When completed to move the installation, it gave an error saying that boot cannot be in LVM.
I did update the /root to standard partition and that worked straigth away.
So I wonder if the correct setup would be as bellow:

/boot/efi standard partition and XFS or another file system
/boot standard partition
/root LVM - XFS
/swap LVM - SWAP
/home LVM - XFS

I have set my firmware setting to UEFI only so I do not what would cause that error.
It only allowed to install Rocky when /root file system was setup as standard partition.

If I want just this setup

/boot/efi standard partition and XFS or another file system
/root LVM - XFS
/swap LVM - SWAP
/home LVM - XFS

what file system for /boot/efi should it be?

If you do run the (graphical) installer, choose the “Customized” (and which drives to consider)
in storage, and click the “create defaults” in the partitioning view, then those are
the five volumes that you will get. That is, three partitions: for ESP, /boot, and PV.
The PV will have /, /home, and swap as three LVs.

If you change partition default from “LVM” to “standard”, then the “create defaults” does not
create PV and LV’s, but standard partitions.

Even if you do use the “create defaults”, you can still modify everything before you actually
commit changes.


The default filesystem for /, /boot, and /home is XFS. XFS cannot shrink, which can become
a restriction later.

The filesystem mounted to /boot/efi is the ESP (EFI System Partition) and its filesystem is
FAT32 (shows as vfat), because that is what the UEFI knows to read.

As bellow:

/boot/efi standard partition and fat32/vfat
/boot standard partition and fat32/vat
/ LVM - XFS
/swap LVM - SWAP
/home LVM - XFS

or

/boot/efi standard partition and fat32/vfat
/ LVM - XFS
/swap LVM - SWAP
/home LVM - XFS

Neither of those look ok. The first has FAT in /boot, which might work, but thu second is not possible.

One could have (with UEFI):

partition fstype mountpoint
standard fat32 /boot/efi
standard XFS (or ext4) /boot
LVM XFS (or ext4) /

partition fstype mountpoint
standard fat32 /boot/efi
standard XFS (or ext4) / (contains /boot)

partition fstype mountpoint
standard fat32 /boot/efi
standard XFS (or ext4) /boot
standard XFS (or ext4) /

The /home and swap have no limitations due to how the system boots.

My current setup is as bellow:

partition fstype mountpoint
standard fat32 /boot/efi
standard XFS (or ext4) / (contains /boot)

And I will re-install to have it as bellow:

partition fstype mountpoint
standard fat32 /boot/efi
standard XFS (or ext4) /boot
LVM XFS (or ext4) /

As I want to keep / separate from /boot

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.