Ask Your Question
3

Can't boot into windows after installing fedora

asked 2013-12-23 02:39:28 -0500

monkeystrudel gravatar image

updated 2013-12-24 06:47:32 -0500

FranciscoD_ gravatar image

I recently installed fedora to my second hard drive, and now I am unable to boot windows (installed on a different harddrive). The option isn not presented when I turn the machine on, it just asks if I want to boot into fedota or rescue mode fedora. Even when I select the hard drive with the windows install as the boot medium, it boots fedora. I know for a fact the windows install is still there, but I just can't access it for some reason.

How can I get windows to boot on my machine again?

EDIT: Ok, I tried all the methods provided, and it still does not even list windows as an option in grub. Additionally I've noticed now that if I select the Hard drive with windows as the boot medium Grub enters rescue mode and won't boot anything.

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
3

answered 2013-12-23 07:21:58 -0500

Marc lml gravatar image

updated 2013-12-23 07:23:22 -0500

If the automatic detection of your Windows installation fails with grub2-mkconfig, then you can also create a manual entry.

First find your Windows boot partition with fdisk -l. This is a 350MB partition, so it is safe to assume it is the smallest HPFS/NTFS/exFAT partition available.

The next step is to create a manual entry in /etc/grub.d/40_custom.

menuentry "Windows 8.1" {
insmod ntfs
set root='hd0,msdos1'
chainloader +1
}

The set root entry needs to be changed accordingly to your setup. You can use this small table to select the correct values.

/dev/sda1 = 'hd0,msdos1'
/dev/sda2 = 'hd0,msdos2'
/dev/sda3 = 'hd0,msdos3'

/dev/sdb1 = 'hd1,msdos1'
/dev/sdb2 = 'hd1,msdos2'
/dev/sdb3 = 'hd1,msdos3'

/dev/sdc1 = 'hd2,msdos1'
/dev/sdc2 = 'hd2,msdos2'
/dev/sdc3 = 'hd2,msdos3'

The last step is to create a new grub.cfg.

grub2-mkconfig -o /boot/grub2/grub.cfg
edit flag offensive delete link more
1

answered 2013-12-23 05:46:46 -0500

Rabin gravatar image

You can try and run grub2-mkconfig which will rebuild grub menu for you and will probe for other OS on your drives to include in the menu.

cp /boot/grub2/grub.cfg /boot/grub2/grub.cfg-backup
grub2-mkconfig -o /boot/grub2/grub.cfg

--- OR ---

You can manually edit the grub menu file @ /boot/grub2/grub.cfg and add the need lines to Win7. (just make sure to change the drive/partition number)

### BEGIN /etc/grub.d/30_os-prober ###
Found Windows 7 (loader) on /dev/sda1
menuentry 'Windows 7 (loader) (on /dev/sda1)' --class windows --class os $menuentry_id_option 'osprober-chain-786E0CD46E0C8CD6' {
    insmod part_msdos
    insmod ntfs
    set root='hd0,msdos1'
    if [ x$feature_platform_search_hint = xy ]; then
      search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1  786E0CD46E0C8CD6
    else
      search --no-floppy --fs-uuid --set=root 786E0CD46E0C8CD6
    fi
    chainloader +1
}
Found Windows 7 (loader) on /dev/sda2
menuentry 'Windows 7 (loader) (on /dev/sda2)' --class windows --class os $menuentry_id_option 'osprober-chain-E43210B732109122' {
    insmod part_msdos
    insmod ntfs
    set root='hd0,msdos2'
    if [ x$feature_platform_search_hint = xy ]; then
      search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos2 --hint-efi=hd0,msdos2 --hint-baremetal=ahci0,msdos2  E43210B732109122
    else
      search --no-floppy --fs-uuid --set=root E43210B732109122
    fi
    chainloader +1
}
### END /etc/grub.d/30_os-prober ###
edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2013-12-23 02:39:28 -0500

Seen: 9,968 times

Last updated: Dec 24 '13