TRENDING
  • Linux
  • Shell Script
  • Cloud
  • DevOps
  • About US
SUBSCRIBE
  • CLOUD
  • DEVOPS
  • LINUX
  • SHELL SCRIPT
Reading: How to add Windows 10 Boot Entry to GRUB on AlmaLinux / Rocky Linux
Share
TechBrownTechBrown
Aa
  • CLOUD
  • DEVOPS
  • LINUX
  • SHELL SCRIPT
Search
  • CLOUD
  • DEVOPS
  • LINUX
  • SHELL SCRIPT
Follow US
© 2014 - 2022 TechBrown. All Rights Reserved.
Linux

How to add Windows 10 Boot Entry to GRUB on AlmaLinux / Rocky Linux

December 24, 2015
Share
3 Min Read
SHARE
Contents
Step-1 (Check the Windows 10 Bootable NTFS partitions)Step-2 (Add a Windows 10 boot entry to Alma / Rocky / Amazon Linux)Step-3 (Update the GRUB2 boot loader)Step-4 (Restart the system to check status)

GRUB  (GRand Unified Bootloader) that is the default bootloader for AlmaLinux / Rocky Linux / Amazon Linux. All system when installed with the EL distribution to respective dual boot with Microsoft windows 10. The add Windows 10 Boot menu to respective GRUB  based bootloader. You need to follow every steps of given tutorial below.

Step-1 (Check the Windows 10 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 10. In this tutorial bootable drive of windows 10 is /dev/sda1 .

Step-2 (Add a Windows 10 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 10 (loader) (on /dev/sda1)" {
insmod part_msdos
insmod ntfs
set root='(hd0,msdos1)'
chainloader +1
}
menuentry 'Windows 10 (loader) (on /dev/sda1)' --class windows --class os $menuentry_id_option 'osprober-chain-8EC01928C0191853' {
insmod part_msdos
insmod ntfs
set root='hd0,msdos1'
if [ x$feature_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 10 (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 AlmaLinux / Rocky Linux / Amazon Linux.

You Might Also Like

How to Optimize MySQL Performance on AlmaLinux / Rocky Linux

How to Enable TLS 1.3 on Apache and Nginx

5 Security Tips to Protect your WordPress Website from Hackers

How to Enable AES-128 Bit SSL Cipher with TLS 1.3 on Nginx Web Server

How to Set Up NGINX Web Server on AlmaLinux / Rocky Linux

Sign Up For Newsletter

Be keep up! Get the latest articles delivered straight to your inbox.

TechBrown Solutions December 24, 2015
Share this Article
Facebook TwitterEmail Print
Share
Leave a comment Leave a comment

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

TRENDING

Linux

How to Configure Awstats on AlmaLinux / Rocky Linux

Linux

How to Monitor Remote Linux Machine using SNMP with Nagios on Ubuntu / AlmaLinux / Rocky Linux

Linux

How to Mount NTFS File System on AlmaLinux / Rocky Linux

Linux

How to Fix cannot connect to local MySQL server through socket error on AlmaLinux / Rocky Linux

You Might Also Like

Linux

How to Optimize MySQL Performance on AlmaLinux / Rocky Linux

October 19, 2021
Linux

How to Enable TLS 1.3 on Apache and Nginx

March 14, 2021
Linux

5 Security Tips to Protect your WordPress Website from Hackers

November 8, 2020
Linux

How to Enable AES-128 Bit SSL Cipher with TLS 1.3 on Nginx Web Server

November 7, 2020

Always Stay Up to Date

Subscribe to our newsletter to get our newest articles instantly!

Follow US on Social Media

Facebook Twitter Youtube Rss

© 2014 - 2022 Techbrown. All Rights Reserved.

  • About Us
  • Terms of Service
  • Cookie Policy
  • Privacy Policy
By using this site, you agree to the Privacy Policy, Cookie Policy and Terms of Service.
Accept

Removed from reading list

Undo
AdBlock Detected
Our site is an advertising supported site. Please whitelist to support our site.
Okay, I'll Whitelist
Welcome Back!

Sign in to your account

Lost your password?