Could you create a Bootinfo Summary report using the boot-repair tool as described below and then post the link to the report?
I know you have already provided some details about your boot configuration. However, the report I am asking for contains more detailed information and might give us a better understanding of why you are unable to boot Windows using GRUB.
How to use boot-repair to provide a "Bootinfo Summary"
Since you can still boot Ubuntu, you can install and run the Boot-Repair tool using the apt-get
command and then use it to Create a Bootinfo summary
.
Run the commands below in a terminal window to install the boot-repair
tool.
sudo add-apt-repository ppa:yannubuntu/boot-repair
sudo apt-get update
sudo apt-get install -y boot-repair
- After that completes, enter the command
boot-repair
to start the tool.
- After a slight delay,
boot-repair
will ask if you want to download its newest version. Since you just installed the newest version, answer No
.
- If
boot-repair
asks to install the pastebinit
package, respond with Yes
.
- The tool will now scan your system and (eventually) display the window shown in the image below. Click on the
Create a Bootinfo summary
box/button. This will collect information about your system's boot configuration, but will not make any changes.
- When the bootinfo summary has been created,
boot-repair
will display a message containing a URL which should look like this: http://paste.ubuntu.com/123456/
.
Please update/edit your question and add this URL. The information in the pastebin this link points to will (I hope) help us diagnose the problem.
I think over-writing the Windows partition's VBR caused this problem.
My understanding is that there are several steps to starting an operating system. In your case, I think something like the steps below happens.
- The BIOS on your computer attempts to run the code in the first sector of the hard drive. This first sector is usually referred to as the MBR (Master Boot Record).
- In addition to the MBR, every partition can also have a boot record. It is often referred to as the Volume Boot Record or VBR. The MBR on your hard drive transfers controls to the VBR of partition 1, your Windows partition.
- Windows expect a partition's VBR to take the next step towards booting an operating system such as Windows 7. So Windows would have originally installed a VBR which would transfer control to the Windows
bootmgr
program in your Windows partition.
However, when you instructed the Ubuntu install a program to install GRUB into the Windows partition, GRUB appears to have replaced the Windows VBR with its own. This GRUB VBR displays the GRUB boot menu.
- The instructions GRUB currently uses to boot Windows are essentially to locate the VBR in the Windows partition and transfer control to it. The VBR in the Windows partition is GRUB's VBR. Transferring control to it just (re)displays the GRUB boot menu.
Unfortunately, I am not sure yet what would be the best way to fix this. We want to be careful that we do not break GRUB and make it impossible to boot anything on your computer when we attempt to fix the problem booting Windows.
Below is a copy of some of the information from your Bootinfo Summary for reference. My comments above are based on this information.
============================= Boot Info Summary: ===========================
=> Grub2 (v1.99) is installed in the MBR of /dev/sda and looks at sector 1
of the same hard drive for core.img. core.img is at this location and
looks for (,msdos2)/boot/grub on this drive.
sda1: ______________________________________________________________________
File system: ntfs
Boot sector type: Grub2 (v1.99)
Boot sector info: Grub2 (v1.99) is installed in the boot sector of sda1
and looks at sector 44090872 of the same hard drive
for core.img. core.img is at this location and looks
for (,msdos2)/boot/grub on this drive. No errors
found in the Boot Parameter Block.
Operating System: Windows 7
Boot files: /bootmgr /Boot/BCD /Windows/System32/winload.exe
sda2: ______________________________________________________________________
File system: ext4
Boot sector type: -
Boot sector info:
Operating System: Ubuntu 12.04 LTS
Boot files: /boot/grub/grub.cfg /etc/fstab /boot/grub/core.img
A possible workaround to boot Windows 7
Below is a suggestion for editing your GRUB boot commands which may allow you to boot Windows 7. I am not sure this will work, but it seems worth trying.
Currently, your grub.cfg
uses the GRUB boot commands below to boot Windows 7.
menuentry "Windows 7 (loader) (on /dev/sda1)" --class windows --class os {
insmod part_msdos
insmod ntfs
set root='(hd0,msdos1)'
search --no-floppy --fs-uuid --set=root 1EA0019AA0017A13
chainloader +1
}
I am suggesting you try changing this and use these commands instead.
menuentry "Windows 7 (loader) (on /dev/sda1)" --class windows --class os {
insmod part_msdos
insmod ntfs
insmod ntldr
set root='(hd0,msdos1)'
search --no-floppy --fs-uuid --set=root 1EA0019AA0017A13
ntldr ($root)/bootmgr
}
Here are the steps to do this.
- Boot your system to the GRUB menu.
- Select (highlight) the GRUB boot menu entry
Windows 7 (loader) (on
/dev/sda1)
.
- Press e to edit the GRUB boot commands for Windows 7.
- Make two changes to this list of commands as illustrated in the
menuentry
above.
- Add the command
insmod ntldr
- Change the command
chainloader +1
to
ntldr ($root)/bootmgr
- Press either Ctrl+X or F10 to boot using
these edited commands.
Note 1:
If the above workaround succeeds in loading the Windows 7 boot menu, then you could make it semi-persistent by
- Using
sudo
to edit the file /etc/grub.d/40_custom
and add the second, modified menuentry
shown above. (If you do this, I'd also suggest you change the title of this "custom" entry.)
- Run the command
sudo update-grub
to update /boot/grub/grub.cfg
to include your customized entry. (It will be on the bottom of the GRUB menu when you boot.)
I would view the suggestion above as only a partly-baked solution. A better solution is to restore the Windows VBR to the Windows partition without also destroying the ability of GRUB to boot.
I think ... but am not 100% sure ... that the Windows recovery command bootsect
can be used to do this. If you want to risk it, one possible way to do this is outlined below.
- When booting Windows, press F8 to bring up the
Advanced Boot Options
menu.
- Select the
Repair Your Computer
entry.
- Walk through the next windows until you reach
System Recovery Options
.
- Select
Command Prompt
- Run the command
bootsect /nt60 C:
But you might also want to wait a bit and see what other answers you get to your
the question before you take the risk of trying the above.
Note 2:
While searching for other things, I ran across two other questions on AskUbuntu which are related to your problem.
- Windows 7 won't boot after installing Ubuntu 11
- Windows 7 doesn't boot after Ubuntu install
I'm not sure how much help these questions provide. The answer to the second question was to use the command bootrec /fixboot
to restore the VBR for the Windows partition. My understanding from that question was that using the bootrec /fixboot
command solved the problem.
But the second question insists that bootrec /fixboot
did not solve the problem.
(Beats the heck out of me as to what might be going on there.)
Best Answer
This not really an "answer". The content would be a better match to a comment, but is too long-winded to fit in one. Apologies :-(
Some questions just to make sure I am reading your question correctly. (Please update/edit your question if you any further info to add.)
So you have already booted into the 12.04 installed on partition
sda5
and successfully runsudo grub-install /dev/sda
?Does it make any difference which of the two entries for Windows in your GRUB menu you use to boot into Windows?
There is one for
/dev/sda1
(label "OSDisk") and another for/dev/sda3
(label "BDEDrive").I am wondering if there is some conflict between your two Windows boot configurations. Only one of them would seem to be needed. (Probably the one on the first partition, OSBoot?)
Perhaps you might learn something by installing a Windows boot utility such as EasyBCD and making sure your Windows boot settings are correct?
Another alternative might be to bring up the Windows 7 Advanced startup options boot menu by pressing F8 immediately after starting a Windows boot from the GRUB menu. If the option to
Repair your computer
is available in the advanced options boot menu, you could runStartup repair
to check for and (maybe) correct problems in your Windows boot setup.Note: You have to be quick pressing F8 or Windows will just boot as usual.
I'm not sure exactly what is going wrong, but could there be some corruption in either your Windows or Linux file systems?
The excerpt below is from your boot-repair log from lines 616 to 641. The repeated failures of
getcwd()
(get current working directory) and the GRUB warning about ZISD (ZENworks Image Safe Data ?) might mean something. Do you use ZENworks?