GRUB (GRand Unified Bootloader) that is the default bootloader for Enterprise Linux. All system when installed with the EL distribution to respective dual boot with Microsoft windows 11. The add Windows 11 Boot menu to respective GRUB based bootloader. You need to follow every steps of given tutorial below.
Step-1 (Check the Windows 11 Bootable NTFS partitions)
fdisk -l
Sample Output
Disk /dev/sda: 250.1 GB, 250059350016 bytes, 488397168 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk label type: dos Disk identifier: 0x6b07969f Device Boot Start End Blocks Id System /dev/sda1 * 2048 206847 102400 7 HPFS/NTFS/exFAT /dev/sda2 206848 143566847 71680000 7 HPFS/NTFS/exFAT /dev/sda3 426172416 488393119 31110352 7 HPFS/NTFS/exFAT /dev/sda4 143566910 426172319 141302705 f W95 Ext'd (LBA) /dev/sda5 143566912 365514751 110973920 7 HPFS/NTFS/exFAT /dev/sda6 365527008 426172319 30322656 7 HPFS/NTFS/exFAT Partition table entries are not in disk order
Here you see that *
in the front of /dev/sda1
bootable drive
Note : Here you need to note the bootable drive for Windows 11. In this tutorial bootable drive of windows 11 is /dev/sda1 .
Step-2 (Add a Windows 11 boot entry to Alma / Rocky / Amazon Linux)
vim /etc/grub.d/40_custom
Add a following lines to the files and replace the /dev/sda1
with your mount point.
!/bin/sh exec tail -n +3 0 This file provides an easy way to add custom menu entries. Simply type the menu entries you want to add after this comment. Be careful not to change the 'exec tail' line above. menuentry "Windows 11 (loader) (on /dev/sda1)" { insmod part_msdos insmod ntfs set root='(hd0,msdos1)' chainloader +1 } menuentry 'Windows 11 (loader) (on /dev/sda1)' --class windows --class os menuentry_id_option 'osprober-chain-8EC01928C0191853' { insmod part_msdos insmod ntfs set root='hd0,msdos1' if [ xfeature_platform_search_hint = xy ]; then search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1 8EC01928C0191853 else search --no-floppy --fs-uuid --set=root 8EC01928C0191853 fi parttool {root} hidden- chainloader +1 }
to save and exit :wq!
Step-3 (Update the GRUB2 boot loader)
grub2-mkconfig --output=/boot/grub2/grub.cfg
Sample Output
Generating grub configuration file ... Found linux image: /boot/vmlinuz-3.10.0-229.el7.x86_64 Found initrd image: /boot/initramfs-3.10.0-229.el7.x86_64.img Found linux image: /boot/vmlinuz-0-rescue-b292a5b69a2343149ed86f7e6fe782c8 Found initrd image: /boot/initramfs-0-rescue-b292a5b69a2343149ed86f7e6fe782c8.img Found Windows 11 (loader) on /dev/sda1 done
Step-4 (Restart the system to check status)
systemctl reboot
Congratulations now you have successfully added the Window s10 boot entry to the GRUB boot manager on Enterprise Linux.