Sometimes when you
install Centos 7, your Windlows installation may fil to siaplay in
GRUB. To resolve this, you need to run a script to detect operating
systems installed then generate the grub configuartion file a new.
1. Check if Windows
is detected. This is done by running grub2-mkconfig but discard it’s
output
$ sudo grub2-mkconfig > /dev/null[sudo] password for wm:Generating grub configuration file ...Found linux image: /boot/vmlinuz-3.10.0-862.el7.x86_64Found initrd image: /boot/initramfs-3.10.0-862.el7.x86_64.imgFound linux image: /boot/vmlinuz-0-rescue-ae7675c335964b24b4eef02de916ece2Found initrd image: /boot/initramfs-0-rescue-ae7675c335964b24b4eef02de916ece2.imgFound Windows 7 (loader) on /dev/sda1done
2. If Windows is
listed as above, now run the command again and save the configuration
file. It’s good to first make a backup of current configuration
file.
$ sudo cp /boot/grub2/grub.cfg /boot/grub2/grub.cfg.bak$sudo grub2-mkconfig -o /boot/grub2/grub.cfg3. Now if all went well, you should boot into Windows.ExtraIf you would like to edit the names of operating systems displayed by grub, simply access the grub config file and make the edits.$sudovim /boot/grub2/grub.cfg
No comments:
Post a Comment