2

After installing dual boot Windows 10 and CentOS7. I cannot see the option for Windows booting.

I tried suggestion from this link THIS but I found something different.

In my case, I cannot find Windows on it

[xhdinh@localhost ~]$ sudo grub2-mkconfig > /dev/null 
[sudo] password for xhdinh: 
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-3.10.0-514.el7.x86_64
Found initrd image: /boot/initramfs-3.10.0-514.el7.x86_64.img
Found linux image: /boot/vmlinuz-0-rescue-89b13d92e70f4ca09e4c4127a3ec37f5
Found initrd image: /boot/initramfs-0-rescue-89b13d92e70f4ca09e4c4127a3ec37f5.img
done

The lsblk -l

[xhdinh@localhost ~]$ lsblk -f
NAME    FSTYPE LABEL         UUID                                   MOUNTPOINT
sda                                                               
├─sda1  vfat   ESP           C0EE-5982                            
├─sda2                                                            
├─sda3  ntfs   OS            842245042244FD24                     
├─sda4  ntfs   Research      78700D2A700CF0A4                     
├─sda5  ntfs   Entertainment A48E8BD38E8B9C84                     
├─sda6  ntfs   WINRETOOLS    0ACC48ABCC48933D                     
├─sda7  ntfs   Image         6CF24A03F249D24E                     
├─sda8  ntfs   DELLSUPPORT   F8DACC77DACC3422                     
├─sda9                                                            
├─sda10 ext4                 d6e0e44c-ad34-464c-b4ca-333e3d393e54 /
├─sda11 ext4                 f612727f-5662-496f-82fb-5f8cb216ee1f /home
└─sda12 swap                 bbb04bda-9934-4b06-b72a-8b8832be58a0 [SWAP]
sdb                                                               
└─sdb1  ntfs                 36D44A09D449CC35                        /run/media/xhd

When I run [root@localhost ~]# cat /etc/default/grub

GRUB_TIMEOUT=5

GRUB_DISTRIBUTOR="$(sed 's, release .*$,,g' /etc/system-release)"

GRUB_DEFAULT=saved

GRUB_DISABLE_SUBMENU=true

GRUB_TERMINAL_OUTPUT="console"

GRUB_CMDLINE_LINUX="rhgb quiet"

GRUB_DISABLE_RECOVERY="true"
  • OK, so you still have your windows partitions - not deleted. that's good. I guess OS is the Win10 boot drive (C:), right? – cas Aug 09 '17 at 10:53
  • Yes. I installed CentOS on another one. – Hiep Xuan Dinh Aug 09 '17 at 10:54
  • did you install the ntfs-3g and epel-release packages as mentioned to the other answers in the linked question? the ntfs-3g package allows centos to mount and examine an ntfs filesystem, and it seems that ntfs-3g requires the epel-release package to be installed first. – cas Aug 09 '17 at 11:01
  • Yes. I already installed them. I can access to ntfs partitions and see the files although it requires password. – Hiep Xuan Dinh Aug 09 '17 at 11:07
  • have you got efibootmgr installed? if so, what is the output of running that? (paste into your question, not into a comment). also, is there any line like DISABLE_OS_PROBER="true" in your /etc/default/grub? – cas Aug 09 '17 at 11:15
  • and if efibootmgr says that there's a windows bootloader in the EFI partition (labelled ESP above), have you tried telling your system's UEFI BIOS to boot from that rather than from grub? If you have, and it doesn't boot, you may have to boot from the Win 10 install media (cd or dvd or usb or whatever it comes on these days) and tell it to "repair" the windows system. – cas Aug 09 '17 at 11:19
  • Sorry for that comment. I tried to run efibootmgr but it said: EFI variables are not supported on this system.

    Could you tell me what it means?

    – Hiep Xuan Dinh Aug 09 '17 at 11:28
  • it means you're not booting in EFI mode. Did you have to change that in the bios to get centos installed? or was it already set to do that? (i.e. does windows 10 expect EFI or plain old BIOS boot)? – cas Aug 09 '17 at 11:31
  • It is Windows 10 EFI boot. I had to change that to install centos? Is it the reason ? – Hiep Xuan Dinh Aug 09 '17 at 11:33
  • could be. sorry, but i have to go get some sleep now (hospital appt very early in the morning). maybe someone else can help you figure it out. – cas Aug 09 '17 at 11:52
  • Ops. I am so sorry. Thank you so much for your help. – Hiep Xuan Dinh Aug 09 '17 at 11:55

1 Answers1

1

You need to install the os-prober package and then run grub2-mkconfig again.

This will detect all other bootable operating systems on the disk and create grub boot menu entries for them.

cas
  • 78,579
  • Thanks for your comment ! I already installed that package and tried again. However, I still cannot find Windows partition. Could you help more? – Hiep Xuan Dinh Aug 09 '17 at 10:39
  • it's possible you may have deleted your windows partition, so there's nothing there for os-prober to find. can you edit your question and add the output of lsblk -f to it? – cas Aug 09 '17 at 10:47
  • I already edited the question. /sda3 is Windows OS partition. Thanks ! – Hiep Xuan Dinh Aug 09 '17 at 10:52
  • cat /etc/fstab and [ -d /sys/firmware/efi ] && echo UEFI || echo BIOS please. If you made changes in Efi, than it could be the reason, why windows is not accessible by grub. –  Aug 09 '17 at 13:06