Ask Your Question

Windows 7 has disappeared from boot after installing Fedora 20

asked 2014-09-14 06:58:06 -0500

Humanity_93 gravatar image

I know this is kind of a repeated question, but I've been unable to find any solution. After a clean install of windows 7, I shrinked its partition to make some space to install Fedora. After shrinking the partition, Windows 7 continued booting as usual. After installing Fedora 20 on the free space, though, the Windows 7 option does not appear in GRUB. What's more weird, my computer came with a version of FreeDOS, which does appear in GRUB.

My fdisk -l output is as follows:

Disk /dev/sda: 931,5 GiB, 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
Disklabel type: dos
Disk identifier: 0x55f61f79
Partition 1 does not start on physical sector boundary.

Disposit. Inicio     Start      Final    Blocks  Id System
/dev/sda1 *             63    3903794   1951866   b W95 FAT32
/dev/sda2          3905536  208707583 102401024   7 HPFS/NTFS/exFAT
/dev/sda3        208707584  209219583    256000  83 Linux
/dev/sda4        209219584 1953525167 872152792   5 Extended
/dev/sda5        209221632  239941631  15360000  83 Linux
/dev/sda6        239943680  248135679   4096000  83 Linux
/dev/sda7        248137728  254281727   3072000  82 Linux swap / Solaris
/dev/sda8        254283776 1953509375 849612800  83 Linux

Looking for information in Google, I have tried to create a 15_Windows file in /etc/grub.d with the text:

 #! /bin/sh -e
echo "Adding Windows" >&2
cat << EOF
menuentry "Windows" {
set root=(hd0,2)
chainloader +1

where I've been changing 'set root=(hd0,2)' with 'set root=(hd0,msdos2)' and 'set root='hd0,msdos2', because when in GRUB I type ls, that's the syntax used for the partitions.

After doing so, I've runned 'sudo grub2-mkconfig -o /boot/grub2/grub2.cfg' to load the changes.

Nothing has worked.

Windows 7 is being booted in BIOS mode, not in UEFI mode.

Any suggestion would be greatly appreciated.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2014-09-14 12:26:14 -0500

baoboa gravatar image

just to be sure , you did use

grub2-install /dev/sda

to update the grub on the mbr of your hard drive ?

grub2-mkconfig is just generating a new grub.cfg script. You can check on it before real install.

edit flag offensive delete link more


Thanks, there was no guide in which I saw this obvious command (I come from ubuntu where the grub2 management is slightly different). This didn't solve the problem at all, but it helped because the "Windows" option finally showed in the GRUB list, saying that it was missing the bootmgr. Googling about that, I found here that Windows 7, in its infinite wisdom, stores the bootmgr file in a previously existing partition. So I had to point to the FreeDOS partition (!!!) and this solved the problem.

Thank you for your help.

Humanity_93 gravatar imageHumanity_93 ( 2014-09-14 15:06:54 -0500 )edit

Question Tools

1 follower


Asked: 2014-09-14 06:58:06 -0500

Seen: 4,174 times

Last updated: Sep 14 '14