Dual Boot - Windows is Gone

General support questions
8675309-jim
Posts: 19
Joined: 2018/07/11 01:57:42

Dual Boot - Windows is Gone

Post by 8675309-jim » 2018/07/11 02:58:05

I need some real help here. I have tried just about everything and cannot get my computer to boot back into Windows.

I have had Windows on my pc for years, first windows 7 then windows 10. I followed all of the instructions for doing a dual boot with CentOS 7 and now I have not been able to get to my windows OS for 3 days.


Someone please help!!!

tunk
Posts: 376
Joined: 2017/02/22 15:08:17

Re: Dual Boot - Windows is Gone

Post by tunk » 2018/07/11 10:41:57

What did you try?
Log in as root; what's the output of fdisk -l

8675309-jim
Posts: 19
Joined: 2018/07/11 01:57:42

Re: Dual Boot - Windows is Gone

Post by 8675309-jim » 2018/07/11 20:11:00

I tried anything and everything that I found online

the output of fdisk -l
[root@host1 ~]# fdisk -l

Disk /dev/sda: 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: dos
Disk identifier: 0x71791884

Device Boot Start End Blocks Id System
/dev/sda1 2048 36866047 18432000 27 Hidden NTFS WinRE
/dev/sda2 * 36866048 37070847 102400 7 HPFS/NTFS/exFAT
/dev/sda3 37070848 1691379119 827154136 7 HPFS/NTFS/exFAT
/dev/sda4 1691379712 1953523711 131072000 5 Extended
/dev/sda5 1691381760 1692405759 512000 83 Linux
/dev/sda6 1692407808 1735399423 21495808 8e Linux LVM

Disk /dev/mapper/vg00-root: 20.0 GB, 20002635776 bytes, 39067648 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 /dev/mapper/vg00-swap: 1002 MB, 1002438656 bytes, 1957888 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 /dev/mapper/vg00-home: 1002 MB, 1002438656 bytes, 1957888 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
tunk wrote:
2018/07/11 10:41:57
What did you try?
Log in as root; what's the output of fdisk -l

8675309-jim
Posts: 19
Joined: 2018/07/11 01:57:42

Re: Dual Boot - Windows is Gone

Post by 8675309-jim » 2018/07/11 20:13:08

On my main screen while the computer is booting after the bios I now have 5 or 6 different OS's to choose from. 2 Windows 10's, a Windows environment, and 2 CentOS's

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

Re: Dual Boot - Windows is Gone

Post by hunter86_bg » 2018/07/11 20:21:29

Usually, you need the 'ntfs-3g' package to mount NTFS.
So, get the package from the epel repo

Code: Select all

 yum install epel && yum install ntfs-3g
And then try to mount one by one the partitions - for example /dev/sda1 /mnt/sda1 and so on.
Then try to regenerate grub. For non-UEFI:

Code: Select all

grub2-mkconfig -o /boot/grub2/grub.cfg
For UEFI , find the grub menu in /boot/efi ...

Then check if grub has detected your Windows install.

8675309-jim
Posts: 19
Joined: 2018/07/11 01:57:42

Re: Dual Boot - Windows is Gone

Post by 8675309-jim » 2018/07/11 21:01:04

Can you be a little more specific when you say mount the partitions?

I have already tried running those commands to install epel and ntfs-3g.
I will try again.

8675309-jim
Posts: 19
Joined: 2018/07/11 01:57:42

Re: Dual Boot - Windows is Gone

Post by 8675309-jim » 2018/07/11 21:20:38

[root@host1 ~]# yum install epel
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
* base: centos.servint.com
* epel: fedora-epel.mirrors.tds.net
* extras: bay.uchicago.edu
* updates: mirrors.gigenet.com
base | 3.6 kB 00:00
extras | 3.4 kB 00:00
updates | 3.4 kB 00:00
No package epel available.
Error: Nothing to do
[root@host1 ~]# yum install ntfs-3g
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
* base: mirrors.tripadvisor.com
* epel: mirror.team-cymru.com
* extras: mirror.wdc1.us.leaseweb.net
* updates: mirrors.gigenet.com
Package 2:ntfs-3g-2017.3.23-6.el7.x86_64 already installed and latest version
Nothing to do


yum install epel
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
epel/x86_64/metalink | 8.4 kB 00:00
* base: mirrors.gigenet.com
* epel: mirror.steadfast.net
* extras: mirror.clarkson.edu
* updates: mirrors.gigenet.com
epel | 3.2 kB 00:00
epel/x86_64/updateinfo FAILED
http://mirror.math.princeton.edu/pub/ep ... fo.xml.bz2: [Errno 14] HTTP Error 404 - Not Found
Trying other mirror.
To address this issue please refer to the below wiki article

https://wiki.centos.org/yum-errors

If above article doesn't help to resolve this issue please use https://bugs.centos.org/.

(1/3): epel/x86_64/group_gz | 88 kB 00:00
(2/3): epel/x86_64/primary | 3.5 MB 00:01
(3/3): epel/x86_64/updateinfo | 929 kB 00:01
epel 12604/12604
No package epel available.
Error: Nothing to do

8675309-jim
Posts: 19
Joined: 2018/07/11 01:57:42

Re: Dual Boot - Windows is Gone

Post by 8675309-jim » 2018/07/11 21:27:39

[root@host1 ~]# grub2-mkconfig -o /boot/grub2/grub.cfg
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-3.10.0-862.6.3.el7.x86_64
Found initrd image: /boot/initramfs-3.10.0-862.6.3.el7.x86_64.img
Found linux image: /boot/vmlinuz-3.10.0-862.el7.x86_64
Found initrd image: /boot/initramfs-3.10.0-862.el7.x86_64.img
Found linux image: /boot/vmlinuz-0-rescue-43234573075840038f8e1069cd864b44
Found initrd image: /boot/initramfs-0-rescue-43234573075840038f8e1069cd864b44.img
Found Windows Recovery Environment (loader) on /dev/sda1
done

8675309-jim
Posts: 19
Joined: 2018/07/11 01:57:42

Re: Dual Boot - Windows is Gone

Post by 8675309-jim » 2018/07/11 23:49:22

I am able to mount the Windows file system, but I would still like to be able to boot into Windows.

desertcat
Posts: 433
Joined: 2014/08/07 02:17:29
Location: Tucson, AZ

Re: Dual Boot - Windows is Gone

Post by desertcat » 2018/07/12 00:06:32

8675309-jim wrote:
2018/07/11 21:27:39
[root@host1 ~]# grub2-mkconfig -o /boot/grub2/grub.cfg
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-3.10.0-862.6.3.el7.x86_64
Found initrd image: /boot/initramfs-3.10.0-862.6.3.el7.x86_64.img
Found linux image: /boot/vmlinuz-3.10.0-862.el7.x86_64
Found initrd image: /boot/initramfs-3.10.0-862.el7.x86_64.img
Found linux image: /boot/vmlinuz-0-rescue-43234573075840038f8e1069cd864b44
Found initrd image: /boot/initramfs-0-rescue-43234573075840038f8e1069cd864b44.img
Found Windows Recovery Environment (loader) on /dev/sda1
done
Very Good!!! "Found Windows Recovery Environment (loader) on /dev/sda1" . Windows is there. The trick is getting the Windows partition to be added to the grub2 menu. I suspect if you rebooted the machine now the Windows partition will show up and all you need to do is select it and be on your merry way. If NOT... There is a very good utility that everyone IMHO should download and install called Grub Customizer To install run: yum install grub-customizer. It helps you recover from a grub2 menu that has gone out in the weeds. You run Grub Customizer and you get a preview of the menu that will come up when you reboot the machine. You should get something like this:

CentOS Linux Kernel 1
CentOS Linux Kernel 2
CentOS Linux Kernel 3
CentOS Linux Rescue
Windows 7 (8, 10, etc.)

This will come up during the boot and you then select "Windows" to boot into Windows or any other OS. What happens if during the boot Windows is NOT found?? OK this is where it may get a bit hairy but it is not big thing:

Under /etc/grub.d you should find a file called 40_custom this is where you would create a custom menu entry such as this:

#!/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.


### BEGIN /etc/grub.d/40_custom ###

if [ -f ${config_directory}/custom.cfg ]; then
source ${config_directory}/custom.cfg
elif [ -z "${config_directory}" -a -f $prefix/custom.cfg ]; then
source $prefix/custom.cfg;
fi
menuentry "Fedora 20 (3.19.8-100.fc20.x86_64)(Heisenbug)"{
# --class fedora --class gnulinux --class gnu --class os --unrestricted $menuentry_id_option 'gnulinux-3.15.10-200.fc20.x86_64-advanced-6f9e3ccb-4afc-bb29-7fa6ba2d9dbd'
set gfxpayload=text
insmod gzio
insmod part_msdos
insmod ext2
set root='hd1,msdos2'

linux /vmlinuz-3.19.8-100.fc20.x86_64 root=UUID=6f9e3ccb-c6e9-4afc-bb29-7fa6ba2d9dbd ro vconsole.font=latarcyrheb-sun16 rhgb quiet nouveau.modset=0 rd.driver.blacklist=nouveau video=vesa:off LANG=en_US.UTF-8
initrd /initramfs-3.19.8-100.fc20.x86_64.img
# chainloader +1
}

EOF

You would substitute Windows 7,8,10 or whatever for "Fedora 20". You would then save the file. After you saved the file run Grub Customizer Windows 7,8,10 should show up in the menu. Reboot the machine and select Windows from the menu.

I hate Grub2. Grub Customizer is just one of those utilities that can save your bacon.

Post Reply