Difference between revisions of "CentOS 7.x Add Windows 7 boot option to grub2"

From Notes_Wiki
m
m
Line 1: Line 1:
<yambe:breadcrumb>CentOS_7.x_system_administration|CentOS 7.x system administration</yambe:breadcrumb>
[[Main Page|Home]] > [[CentOS]] > [[CentOS 7.x]] > [[CentOS 7.x system administration|System Administration]] > [[CentOS 7.x Add Windows7 boot option to grub2]]
=CentOS 7.x Add Windows7 boot option to grub2=


# Enable epel-release and install ntfs-3g
# Enable epel-release and install ntfs-3g
Line 33: Line 32:




<yambe:breadcrumb>CentOS_7.x_system_administration|CentOS 7.x system administration</yambe:breadcrumb>
[[Main Page|Home]] > [[CentOS]] > [[CentOS 7.x]] > [[CentOS 7.x system administration|System Administration]] > [[CentOS 7.x Add Windows7 boot option to grub2]]

Revision as of 06:40, 25 August 2022

Home > CentOS > CentOS 7.x > System Administration > CentOS 7.x Add Windows7 boot option to grub2

  1. Enable epel-release and install ntfs-3g
    yum -y install epel-release
    yum -y install ntfs-3g
  2. Generate a new configuration using:
    grub2-mkconfig -o /boot/grub2/grub.cfg
    #grub2-mkconfig -o /etc/grub2.cfg #Note that /etc/grub2.cfg is wrong file
    See if Windows was found as part of output generated by above command.

If Windows option was not found then add an entry manually in =/etc/grub.d/40_custom= as:

   menuentry "Windows 7" {
   set root='hd0,msdos1'
   chainloader +1
   }

Refer: https://www.centos.org/forums/viewtopic.php?t=49200

Avoid older format given below which may not work:

    menuentry "Windows 7" {
         set root=(hd0,1)
         chainloader +1
         }


Home > CentOS > CentOS 7.x > System Administration > CentOS 7.x Add Windows7 boot option to grub2