2

I just installed Ubuntu alongside to Windows 7, and now Windows 7 will not boot.

When the system starts, it shows me entry for Windows 7 in the boot menu, when I click on the Windows 7 option in the boot menu, after few seconds it will show me the boot menu again and Windows will not boot. It shows me no error message. Windows 7 option is available in the boot menu but it just does not boot.

Here are my boot info results http://pastebin.com/ga9xjQYh

update - 30/01/2012 I tried windows recovery - fix startup issues - that showed no problems but issues were not resolved

Then I tried the widnows recovery console and run following commands

bootrec /fixboot
bootrec/ fixmbr
bootrec /RebuildBCD

But that does not help, Now neither ubuntu nor windows will boot. When I boot from windows CD it shows me a valid windows installation in c:\ drive.

update After a lot of help I got from #ubuntu channel and trying out different things, ultimately I can now boot both windows and ubuntu, still, the issue is not completely resolved though.

Here's what made it work

Boot using ubuntu live CD and then run the testdisk utility as steps mentioned here Restart system and I was able to see the boot menu and boot into Ubuntu, then put the following code in boot/grub/custom.cfg. Restart and now I can see one more entry to boot win7, clicking on it boots windows.

menuentry "Windows 7 (loader) with grub ntldr workaround" --class windows --class os  
{
    insmod part_msdos
    insmod ntfs
    set root='(hd0,msdos1)'
    search --no-floppy --fs-uuid --set=root FAF0F57DF0F54085
    ntldr /bootmgr
}

It will make windows boot probably but now windows have a dependency on Ubuntu and I can not remove Ubuntu or else windows will stop working.

Credit goes to 'Jordan_U' on #ubuntu channel.

update Here are the win7 boot details I got from EasyBCD

Windows Boot Manager
--------------------
identifier              {9dea862c-5cdd-4e70-acc1-f32b344d4795}
device                  partition=C:
path                    \bootmgr
description             Windows Boot Manager
locale                  en-US
default                 {04fe8f95-4b17-11e1-a45c-909d3d25f938}
displayorder            {04fe8f95-4b17-11e1-a45c-909d3d25f938}
timeout                 30

Windows Boot Loader
-------------------
identifier              {04fe8f95-4b17-11e1-a45c-909d3d25f938}
device                  partition=C:
path                    \Windows\system32\winload.exe
description             Windows 7 Home Premium
locale                  en-US
osdevice                partition=C:
systemroot              \Windows
resumeobject            {8d25a443-4b0a-11e1-a835-806e6f6e6963}

Note Still, I am looking for how can I have everything clean and how can I boot windows without having a dependency on Ubuntu. so that if ever I have to remove ubuntu, windows will keep booting file without ubuntu.

8
  • can you access windows7 drive from ubuntu?
    – shantanu
    Jan 29, 2012 at 15:31
  • try this in terminal: sudo update-grub
    – shantanu
    Jan 29, 2012 at 15:31
  • see askubuntu.com/questions/10410/… for possible solution to similar problem. I think you have the same problem, grub is installed on sda1, which has hosed your windows boot. You'll need to fix windows boot and then reinstall grub
    – duffydack
    Jan 29, 2012 at 15:43
  • @shantanu I can see and access windows 7 drive from ubuntu #duffydack - I have tried windows recovery and choose "fix start up issues" but no luck, windows says startup issue fixed but still behavior remains same as earlier. And why grub would be installed on sda1, I choose the default settings when installing ubuntu, how would ubuntu do this mistake ?
    – Sudhir N
    Jan 29, 2012 at 16:15
  • I tried bootrec /fixboot and bootrec /FixMbr and now neither windows nor ubuntu will start
    – Sudhir N
    Jan 29, 2012 at 17:37

3 Answers 3

3

Install the Boot-Repair application and choose the defaults. I've used it before, but not for the exact issue your having. If the defaults don't work, it has configurable options.

1
  • 1
    it did not solve my issue
    – Sudhir N
    Jan 30, 2012 at 7:54
2

Easy solution:

menuentry "Windows 7 (loader) with grub ntldr workaround" --class windows --class os  
{
    insmod part_msdos
    insmod ntfs
    set root='(hd0,msdos1)'
    # search --no-floppy --fs-uuid --set=root FAF0F57DF0F54085
    chainloader +1
}

ubuntu, in terminal:

> sudo gedit

enter your password and open the file grub.cfg in /boot/grub/ and change it like the example.

You also can try to change it in the grub menu typing "e" above Windows.

2
+50

If you want to use the Windows boot loader to dual boot instead of using grub2 you can do so using EasyBCD (its free for private use).

* Step 1 *

Open EasyBCD and on the BCD Deployment tab press the button after selecting the correct option for your operative system (WindowsXP / Windows7)

enter image description here

* Step 2 *

On the Add New Entry tab select Linux/BSD, from the dropbox select Grub2 type and give the new entry a nice name (Ubuntu will suffice). Press Add Entry.

enter image description here


If all went well on your View Settings tab you can check if the new Ubuntu entry is there.

Reboot and you will be greeted with Windows boot menu and it should now have an option to boot to Windows and one to boot in to Ubuntu.

If later on you want to remove Ubuntu you can simply remove the Ubuntu partitions using the Windows disk manager and use EasyBCD remove the Ubuntu entry from the MBR.

3
  • Thanks for the reply, But my problem is, why I am not able to boot into windows when using grub for dual boot, although the windows entry is there in grub menu, clicking on it does nothing. I want to fix the whatever it takes, so that I can boot into windows from grubmenu
    – Sudhir N
    Mar 9, 2012 at 13:15
  • 1
    Then I am a bit confused, you sai in your question: Restart and now I can see one more entry to boot win7, clicking on it boots windows. So dual booting is working with Grub2 now, then you say: Still I am looking for how can I have every thing clean and how can I boot windows without having dependency on ubuntu.. This is the solution since your /boot mount is inside the Ubuntu /, if you want you can mount /boot on a different partition other than /, is that what you are looking for? The BCD solution is also valid. Mar 9, 2012 at 13:24
  • The problem is, Windows boots only with the custom grub entry I added, it does not boot from the default windows 7 entry in grub menu
    – Sudhir N
    Mar 10, 2012 at 5:01

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .