Dual boot problem (windows 10 + centos 7)

General support questions
Post Reply
pratshar_1
Posts: 2
Joined: 2017/12/26 13:46:14

Dual boot problem (windows 10 + centos 7)

Post by pratshar_1 » 2018/01/02 18:03:29

Hello,

I had windows 10 installed on my HP laptop and then I installed Centos 7. The windows installation is on legacy bios. The Centos installation is also on bios mode. But I cant boot into Windows.
I have tried to:
a) config the grub.
b) Install NTFS-3g, mount the windows partition and then config grub,
c) manually add the windows 10 into grub
but none of it worked.

I believe the problem is that the grub identifies the (pre made) recovery boot partiion and gives a boot option to load dos, but it doesn't find the windows partition.

The result of fdisk are as below:
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: 0x8dcb84d1

DeviceBoot Start End Blocks Id System
/dev/sda1 2048 16351231 8174592 b W95 FAT32
/dev/sda2 * 16351232 32704511 8176640 c W95 FAT32 (LBA)
/dev/sda3 32704512 452132863 209714176 7 HPFS/NTFS/exFAT
/dev/sda4 452136897 1953521663 750692383+ f W95 Ext'd (LBA)
Partition 4 does not start on physical sector boundary.
/dev/sda5 452136960 1890607103 719235072 7 HPFS/NTFS/exFAT
/dev/sda6 1890609152 1892706303 1048576 83 Linux
/dev/sda7 1892708352 1927679999 17485824 83 Linux
/dev/sda8 1927682048 1947211775 9764864 83 Linux
/dev/sda9 1947213824 1953521663 3153920 8e Linux LVM

Disk /dev/mapper/centos-swap: 3225 MB, 3225419776 bytes, 6299648 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

Can someone please help me and help me solve this problem?

pratshar_1
Posts: 2
Joined: 2017/12/26 13:46:14

Re: Dual boot problem (windows 10 + centos 7)

Post by pratshar_1 » 2018/01/17 18:27:39

After lot of googling and hair tearing, I found out that the bootmgr in from windows was damaged. So, I did the following
1. booted from windows disk
2. clicked on repair/startup repair. Saw that it cannot diagnose and repair my bootmgr
3. opened command prompt and then tried running the commands
a) bootrec.exe /rebuildbcd
b) bootrec.exe /fixmbr
c) bootrec.exe /fixboot
4. Executed the command rebuildbcd and fixmbr succesfully but got the error 'element not found'
5. in command prompt opened diskpart and then the following command
a) list disk
b) select disk = 0 (here select your hard disk on which windows is installed. In my case I had only 1 hard disk attached to my system).
c) list partition
d) select partition = 3 (here the partition that has your windows partition)
e) active (sets the boot partition as active)
f) exit (exits diskpart)
6. executed bootrec.exe /fixboot. Got error message 'access is denied'.
7. but re executed bootrec.exe /rebuildbcd and found that this time the operation found the operating system and then run the operation. so re-executed bootrec.exe /fixmbr

And finally I booted into my windows.

Now the question is how to add centos 7 to windows bootmgr. As I see it, it may not be possible.
viewtopic.php?t=61856

Post Reply