Cannnot boot into windows - keep coming back to grub menu selection

Asked by Elijah

Cannnot boot into windows -
QUick rundown
1. Decided to try Ubuntu
2. Used the Wubi installer for windows 7- no matter what I did couldn't get internet access (livecd connected just fine but not when I was using the Wubi install)
3. Decided to install into a partition to get the full effect
4. Used windows to create a partition for Ubuntu to live
5. Booted from USB into Ubuntu and installed from the livecd (following a tutorial)
6 Successfully installed and am running Ubuntu (what I am typing on now)
7, Checked to make sure I could still run windows
8 Restarted computer, selected the Windows 7 loader from the menu
9 Screen flashes and goes back to grub menu

Tried the typical repair from Windows install disk (including trying to run repairs from command prompt) it says it repairs but nothing works.

Some Notes
I am able to access the windows drive from Ubuntu perfectly fine and have mounted it as a regular drive for use and it works fine.

Theory:
I don't think GRUB is looking in the right place. In the Grub.cnf file i see its look for dev/sda which leads me to believe that its just not looking in the right spot. When I looked at gparted it shows the OS on the partition labelled sda2

Any help would be great.
Finally.
This is Day one with having a full working install of ubuntu - Be gentle

Question information

Language:
English Edit question
Status:
Solved
For:
Wubi Edit question
Assignee:
No assignee Edit question
Solved by:
Elijah
Solved:
Last query:
Last reply:
Revision history for this message
delance (olivier-delance) said :
#1

sda2 is disk partition. sda is disk itself.
The first stage of Grub is installed at start of disk, so sda place is OK.
Could you repair WIndows ( http://ubuntuforums.org/showthread.php?t=1014708 ),
bootrec.exe /fixboot (don't try to restore MBR).
If it fails, please run following procedure:
---------------------
There is a standard script provided to analyse boot configuration. Could you download script at:

   http://sourceforge.net/projects/bootinfoscript/

Then in a terminal (Ctrl+Alt+T) run command:

    sudo bash [path/to/the/download_folder]/boot_info_script.sh

This will produce a file named: RESULTS.txt. Paste content of this file in http://paste.ubuntu.com/ and provide in this thread the link to Web page. Please don't post file directly in thread, else it will make thread difficult to read.

Revision history for this message
Elijah (elijah-carder) said :
#2

Thank you.

The link was one I had tried before without success.

The results of the script are here.
http://paste.ubuntu.com/681173/

Revision history for this message
delance (olivier-delance) said :
#3

 => Windows is installed in the MBR of /dev/sda.
 => Windows is installed in the MBR of /dev/sdb.
Grub2 (v1.99) is installed in the boot sector of sda2
sda2/Wubi

You have a Wubi configuration, with a separate partition. A strange configuration. I need to link question to "Wubi" to get some help of ~bcbc (except if you decide to wipe out Wubi and reinstall Ubuntu alongside Windows).

Revision history for this message
Elijah (elijah-carder) said :
#4

So then am I running on the Wubi install or the install I did to the other partition?

Revision history for this message
bcbc (bcbc) said :
#5

You've installed grub to the boot sector of /dev/sda2 (your windows partition).
sda2: __________________________________________________________________________

    File system: ntfs
    Boot sector type: Grub2 (v1.99)
    Boot sector info: Grub2 (v1.99) is installed in the boot sector of sda2
                       and looks at sector 1192536162 of the same hard drive
                       for core.img. core.img is at this location and looks
                       for (,msdos5)/boot/grub on this drive. No errors found
                       in the Boot Parameter Block.
    Operating System: Windows 7

You can't boot windows until you repair that. Delance's advice to run bootrec.exe /fixboot is correct

An alternative method using testdisk is discussed here http://sourceforge.net/apps/mediawiki/bootinfoscript/index.php?title=Boot_Problems:Boot_Sector

PS you're not running your wubi install - it requires windows to boot and you cannot boot windows with that boot sector.

Revision history for this message
Elijah (elijah-carder) said :
#6

Ok.
So. I've tried the running bootrec.exe /fixboot it tells me element not found.

I will try the alternative method then.

Revision history for this message
Elijah (elijah-carder) said :
#7

Oh yeah. Forgot to say thank you. I will let you know how this goes this afternoon. BUT thank you for your help

Revision history for this message
bcbc (bcbc) said :
#8

PS once you fix the windows boot sector it will only boot Windows (and Wubi). So, you can avoid this problem by installing grub to the MBR before you fix the windows boot sector. Boot Ubuntu and run from terminal (Ctrl+Alt+t):

sudo grub-install /dev/sda

That should have been the place you installed it earlier unless you intend to boot Ubuntu using e.g. easyBCD (this leaves the windows boot manager in charge).

Revision history for this message
bcbc (bcbc) said :
#9

PS grub isn't supposed to allow you to install it to a windows boot partition, so this is a bug you should file. (It was supposed to be fixed last year to prevent this). If you recall how you did it that will help.

https://bugs.launchpad.net/ubuntu/+source/grub2/+filebug

Revision history for this message
Elijah (elijah-carder) said :
#10

Success!

Windows command line with boot repair did nothing for me.
I followed the alternative method using testdisk.
Which allowed me to get directly into Windows (no options for alternate booting)
I preceded to uninstall Ubuntu Wubi from windows using the uninstaller.

I downloaded easybcd 2.1 and followed the directions for using easybcd to add a option to boot into unbuntu.
Everything loads ok. Though there is one minor thing.

I still get the windows installer asking if I want windows 7 or Unbuntu (its black and white and very basic looking). When I select Unbuntu it loads the grub installer(purple background - offers multiple boot options) - I would like to eliminate one of those if I could.

My suspicion is to use easybcd in Windows to Default to unbuntu start up which then would auto take me to the grubb installer where I could decide which OS to load.
Or is that the wrong way - Any suggestions or links on that?

Thank you again for all your advice.

Revision history for this message
Elijah (elijah-carder) said :
#11

Also, now unable to access the windows drive from linux

Revision history for this message
bcbc (bcbc) said :
#12

If you use easyBCD... this sets up an entry for Ubuntu in the Windows Boot Loader. This takes you to Ubuntu's grub menu. You cannot avoid the dual menus unless you suppress the grub menu: http://ubuntuforums.org/showthread.php?t=1664134

If you have already set Ubuntu as the default using easyBCD and set the timeout to zero, then you'll see that Windows will pass you directly to Ubuntu - and you cannot boot windows anymore.

The other way would have been to install grub to the MBR - then you'd only have one menu (grub) and booting Windows would work.

So... it seems like you may have already set the Windows boot manager to boot directly to Ubuntu. The only fix I can think of is to boot to a windows repair prompt and try changing the timeout using bcdedit, or rebuild the bcd store. Maybe you can run easyBCD from a windows repair prompt, but not sure about that. I'll see if I can find a link to help.

Revision history for this message
bcbc (bcbc) said :
#13

Assuming you do have the problem I mentioned in my previous post, here are some potential fixes.

The suggested fix is to boot from a windows repair cd to a repair command prompt and modify the bcd timeout:
bcdedit /timeout 10

But that reportedly doesn't always work. Someone reported that hitting the 'up' key repeatedly during the boot brings back the windows boot manager (I guess the Up Arrow): http://ubuntuforums.org/showthread.php?t=1734405
I'd try this first as it's the easiest.

Other people have completely rebuilt the BCD:
bootrec /RebuildBcd

Let me know what works.

Revision history for this message
Elijah (elijah-carder) said :
#14

After a long night of fighting I'm ready to ask for help again.
I did as was suggested and it changed the bootloader order - got the purple screen first then the windows version - if I chose windows.

Booted into windows and using easybcd went in and changed the timeout to 0 to avoid that screen. Restarted and got this
windows failed to start. "A recent hardware or software change might be
the cause.
if you do not have this disc, contact your system administrator or
computer manufacturer for assistance.

File: \NST\AutoNeoGrub0.mbr
Status: 0xc000000f
Info: The selected entry could not be loaded because the application
is missing or corrupt."

Tried all the methods above we had previously gone over to get it back. Nothing worked.
Went to the Ubuntu site and used this
https://help.ubuntu.com/community/Boot-Repair
I told it to make a log file which can be found here.
http://paste.ubuntu.com/682375/

- Also, weird thing. Its now telling me at the start of Ubuntu "The disk drive for /media/sdb1 is not ready yet or not present
Continue to wait, press S to skip or M for manual recovery." - which it never told me that before.

Revision history for this message
bcbc (bcbc) said :
#15

I've noticed that boot-repair recently on ubuntuforums.org. I don't know what it does or anything about the author except that he is promoting the tools. None of the documentation indicates exactly what the program does except that it "fixes all boot problems".

Anyway - that does't mean it's bad - just I have no idea what it does. Is it possible it's modified your /etc/fstab because you now have entries for /media/sdb1 and /media/sdc1? So just press "S" when it prompts you and then edit your /etc/fstab (gksu gedit /etc/fstab) and remove those lines if they're not needed.

As far as the windows issue goes - boot to a windows repair prompt (use the installation DVD or a repair CD) and get the output of:
bcdedit

Post it back here. e.g.
bcdedit > C:\bcdresults.txt

Then you can boot Ubuntu, mount your windows drive and find the output (easier than writing it down).

PS you could also try the neosmart forums regarding the easyBCD error.

Revision history for this message
Elijah (elijah-carder) said :
#16

No go.
I recieved the message
"The Boot config data store could not be opened. The requested system devices cannot be found"

The tip for the fstab worked.

Revision history for this message
bcbc (bcbc) said :
#17

Check out this link http://support.microsoft.com/kb/927392

See if that helps.

Revision history for this message
Elijah (elijah-carder) said :
#18

Thanks for all your help.
I couldn't get anywhere. Nothing we did worked. Then I couldn't even get into either OS ('cept through the thumb drive)
Finally, I said screw it. Since everything was backed up and it was almost time for a Windows re-Install I went ahead and formatted the damn thing.

I did the format and did re-install everything without a hassle.
Duel boot works (and I suppressed the grub menu) and everything is shiny.

Thanks again for all your help.

Revision history for this message
bcbc (bcbc) said :
#19

Hey! Glad you got it sorted.

Yeah pity things didn't go completely smooth, but a reinstall never hurts when you have backups (probably speeds things up a bit). And you've gained a lot of experience along the way. Good luck!