Windows won’t boot via grub

dual-bootgrubwindows

I had a dual boot system with Kubuntu 14.04 and Windows 7, after a long time of not using the windows I tried to boot it and all I got was a beep sound and a black screen and then the computer froze.
I've tried to use windows 7 repair tools but it didn't work.
afterwords I've tried to re-install windows 7, then windows came up and it worked great but when I've restored the grub so I will be able to boot to ubuntu too it had the same problem.
I've looked online and re-installed grub several times, tried to changed the windows grub setup to ntldr but nothing worked and I always got the same behavior.
Finally I tried to install windows 8.1. After installing it worked just as win7 worked but when I've fixed the grub to boot Ubuntu as well it stopped working.
I've also tried boot-repair and this is the output it gives
http://paste.ubuntu.com/8881166/

I'm trying to tackle this problem for couple of days now and any help will be highly appreciated.

Best Answer

So in the end what I did is to go into grub command prompt and run the start-up commands for windows from /boot/grub/grub.cfg line by line. This is the menu item code in the grub.cfg

menuentry 'Windows 8 (loader) (on /dev/sda3)' --class windows --class os

$menuentry_id_option 'osprober-chain-A6A4F8AFA4F882DB' {
        insmod part_msdos
        insmod ntfs
        set root='hd0,msdos3'
        if [ x$feature_platform_search_hint = xy ]; then
          search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos3 --hint-efi=hd0,msdos3 --hint-baremetal=ahci0,msdos3  A6A4F8AFA4F882DB
        else
          search --no-floppy --fs-uuid --set=root A6A4F8AFA4F882DB
        fi
        parttool ${root} hidden-
        drivemap -s (hd0) ${root}
        chainloader +1
}

and the lines I ran were:

insmod part_msdos
insmod ntfs
set root='hd0,msdos3'
parttool ${root} hidden- # Causes the beep and the computer freeze...
# There are more commands before you can boot

So I decided to skip this command. What is supposed to do is to make modifications to partition table entries (from grub manual) or in this specific case, set the partition "hidden" entry to false. I have no idea why this happens, I haven't checked it out.

What I got was a the following

menuentry 'Windows 8 (loader) (on /dev/sda3)' --class windows --class os $menuentry_id_option 'osprober-chain-A6A4F8AFA4F882DB' {
        insmod part_msdos
        insmod ntfs
        set root='hd0,msdos3'
        if [ x$feature_platform_search_hint = xy ]; then
          search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos3 --hint-efi=hd0,msdos3 --hint-baremetal=ahci0,msdos3  A6A4F8AFA4F882DB
        else
          search --no-floppy --fs-uuid --set=root A6A4F8AFA4F882DB
        fi
        drivemap -s (hd0) ${root}
        chainloader +1
}

and now it runs great!

Related Question