Can not boot into Windows after installing CentOS

General support questions
ASCG5000
Posts: 10
Joined: 2017/08/09 12:32:47

Can not boot into Windows after installing CentOS

Post by ASCG5000 » 2017/08/09 13:30:50

Greetings,

Before I start, a few minor details worth mentioning:
  • I have tried all this with safe boot turned off
  • ntsf is installed
  • I have two hard drives, a 100 GB SSD (with windows on it) and a 1TB HDD (with a 100 GB partition containing CentOS).
  • I have previously installed Ubuntu Mate onto the 100 GB partition and it had no issues rebooting into Windows
So I have just dual booted CentOS and Windows 10 onto my Dell Inspiron 7559. While I can access CentOS fine, any time I attempt to boot into Windows via selecting "Windows Boot Manager" in UEFI grubs shows up with only CentOS as an option. I have tried to follow this thread for help, but my issue deviates when I run grub2-mkconfig:

Code: Select all

$ [root@localhost ~]# grub2-mkconfig > /dev/null
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-3.10.0-514.26.2.el7.x86_64
Found initrd image: /boot/initramfs-3.10.0-514.26.2.el7.x86_64.img
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-cf155cf8cdd944b288bd8de21c540c82
Found initrd image: /boot/initramfs-0-rescue-cf155cf8cdd944b288bd8de21c540c82.img
done
[root@localhost ~]# 


As you can see, it does not detect my Windows 10 instillation. GNOME file manager does detect both of my hard drives with all their Windows data intact and I can even successfully mount them. However I am not able to replicate this in the command line and any attempt to boot from them has been in vain.

After failing to get anywhere with this, I tried to run Windows Boot Repair via a USB stick, however when I select it in UEFI, it still boots to grubs with CentOS as the only option.

So at this point I am fairly lost an confused on what to do. From what I read online, I think that I might have overwritten my master boot record when I installed CentOS but fixing it is obviously beyond my realm of knowledge. Does anyone have any ideas on how to fix this?

Thanks Much,
Andrew

owl102
Posts: 413
Joined: 2014/06/10 19:13:41

Re: Can not boot into Windows after installing CentOS

Post by owl102 » 2017/08/09 16:50:42

What is the output of

Code: Select all

os-prober
?
German speaking forum for Fedora and CentOS: https://www.fedoraforum.de/

ASCG5000
Posts: 10
Joined: 2017/08/09 12:32:47

Re: Can not boot into Windows after installing CentOS

Post by ASCG5000 » 2017/08/09 17:02:09

owl102 wrote:What is the output of

Code: Select all

os-prober
?
I am not getting any output for it...

Code: Select all

[root@localhost ~]# os-prober
[root@localhost ~]# 

hunter86_bg
Posts: 2019
Joined: 2015/02/17 15:14:33
Location: Bulgaria
Contact:

Re: Can not boot into Windows after installing CentOS

Post by hunter86_bg » 2017/08/09 17:39:37

What is the output of

Code: Select all

rpm -qa | grep ntfs

User avatar
TrevorH
Site Admin
Posts: 33202
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Can not boot into Windows after installing CentOS

Post by TrevorH » 2017/08/09 18:16:46

And the output of fdisk -lu /dev/sd[a-z] ?
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

ASCG5000
Posts: 10
Joined: 2017/08/09 12:32:47

Re: Can not boot into Windows after installing CentOS

Post by ASCG5000 » 2017/08/09 20:47:35

hunter86_bg wrote:What is the output of

Code: Select all

rpm -qa | grep ntfs
TrevorH wrote:And the output of fdisk -lu /dev/sd[a-z] ?

Code: Select all

[root@localhost ~]# rpm -qa | grep ntfs
ntfs-3g-2017.3.23-1.el7.x86_64
[root@localhost ~]# fdisk lu /dev/sd[a-z]
Usage:
 fdisk [options] <disk>    change partition table
 fdisk [options] -l <disk> list partition table(s)
 fdisk -s <partition>      give partition size(s) in blocks

Options:
 -b <size>             sector size (512, 1024, 2048 or 4096)
 -c[=<mode>]           compatible mode: 'dos' or 'nondos' (default)
 -h                    print this help text
 -u[=<unit>]           display units: 'cylinders' or 'sectors' (default)
 -v                    print program version
 -C <number>           specify the number of cylinders
 -H <number>           specify the number of heads
 -S <number>           specify the number of sectors per track

[root@localhost ~]# 
They seem to be working fine...

User avatar
TrevorH
Site Admin
Posts: 33202
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Can not boot into Windows after installing CentOS

Post by TrevorH » 2017/08/09 21:10:32

Try again and use the command I pasted in.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

ASCG5000
Posts: 10
Joined: 2017/08/09 12:32:47

Re: Can not boot into Windows after installing CentOS

Post by ASCG5000 » 2017/08/09 21:26:25

TrevorH wrote:Try again and use the command I pasted in.

Code: Select all

[root@localhost ~]# fdisk -lu /dev/sd[a-z]
WARNING: fdisk GPT support is currently new, and therefore in an experimental phase. Use at your own discretion.

Disk /dev/sda: 128.0 GB, 128035676160 bytes, 250069680 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: gpt


#         Start          End    Size  Type            Name
 1         2048      1026047    500M  EFI System      EFI System Partition
 2      1026048      1288191    128M  Microsoft reser Microsoft reserved partition
 3      1288192    223416319  105.9G  Microsoft basic Basic data partition
 4    223416320    225191935    867M  Windows recover 
 5    225191936    250068991   11.9G  Windows recover 
WARNING: fdisk GPT support is currently new, and therefore in an experimental phase. Use at your own discretion.

Disk /dev/sdb: 1000.2 GB, 1000204886016 bytes, 1953525168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk label type: gpt


#         Start          End    Size  Type            Name
 1         2048       264191    128M  Microsoft reser Microsoft reserved partition
 2       264192   1758211457  838.3G  Microsoft basic Basic data partition
 3   1758212096   1953523711   93.1G  Microsoft basic 
[root@localhost ~]# 
So that shows where it is; now how do I get grubs to detect it?

User avatar
TrevorH
Site Admin
Posts: 33202
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Can not boot into Windows after installing CentOS

Post by TrevorH » 2017/08/09 21:56:03

From that, without having a Windows system to check with, I think it's most likely that your Windows boot disk is one of /dev/sda2, sda3, sdb1, sdb2 or even sdb3. As root, what does file -s /dev/sda2 say? Repeat for the others above too.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

ASCG5000
Posts: 10
Joined: 2017/08/09 12:32:47

Re: Can not boot into Windows after installing CentOS

Post by ASCG5000 » 2017/08/09 22:10:55

TrevorH wrote:From that, without having a Windows system to check with, I think it's most likely that your Windows boot disk is one of /dev/sda2, sda3, sdb1, sdb2 or even sdb3. As root, what does file -s /dev/sda2 say? Repeat for the others above too.

Code: Select all

[root@localhost ~]# file -s /dev/sda1
/dev/sda1: x86 boot sector, mkdosfs boot message display, code offset 0x3c, OEM-ID "mkfs.fat", sectors/cluster 16, root entries 512, Media descriptor 0xf8, sectors/FAT 256, heads 255, sectors 1024000 (volumes > 32 MB) , reserved 0x1, serial number 0x47236d0e, label: "           ", FAT (16 bit)
You have new mail in /var/spool/mail/root
[root@localhost ~]# file -s /dev/sda2
/dev/sda2: data
[root@localhost ~]# file -s /dev/sda3
/dev/sda3: x86 boot sector; partition 1: ID=0x72, starthead 13, startsector 1920221984, 1816210284 sectors, code offset 0x52, OEM-ID "NTFS    ", sectors/cluster 8, reserved sectors 0, Media descriptor 0xf8, heads 255, hidden sectors 1288192, dos < 4.0 BootSector (0x80)
[root@localhost ~]# file -s /dev/sdb1
/dev/sdb1: data
[root@localhost ~]# file -s /dev/sdb2
/dev/sdb2: x86 boot sector; partition 1: ID=0x72, starthead 13, startsector 1920221984, 1816210284 sectors, code offset 0x52, OEM-ID "NTFS    ", sectors/cluster 8, reserved sectors 0, Media descriptor 0xf8, heads 255, hidden sectors 264192, dos < 4.0 BootSector (0x80)
[root@localhost ~]# file -s /dev/sdb3
/dev/sdb3: BTRFS Filesystem (label "cl", sectorsize 4096, nodesize 16384, leafsize 16384)
[root@localhost ~]# 
Looks like it is in sta2

Post Reply