[Win remove Grub] W7 deletes grub2 after W7 is booted

Asked by Jonathan Litsheim

Dual booting 64 bit W7 and 64 bit Ubuntu 10.04 on a single partitioned HD. If I decide to boot W7 and than do a restart to go back to Ubuntu than I get a "no operating system error" while booting. At this point I use the live CD to reinstall grub and than everything is fine as long as I don't touch W7. I found a bunch of stuff on installing W7 and than it destroys grub but not anything about once everything is set up. I suspect that something like fdisk of some other "stupid" windows program is attempting to restore windows boot manager. Also when booting windows chkdsk starts and I cancel. Thanks

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu grub2 Edit question
Assignee:
No assignee Edit question
Solved by:
Jonathan Litsheim
Solved:
Last query:
Last reply:
Revision history for this message
actionparsnip (andrew-woodhead666) said :
#1

I'd put this on a Windows forum. Ubuntu is not at fault here. I'd maybe log a bug with grub but I personally think that there is a windows OS issue here

Revision history for this message
Jonathan Litsheim (jonlits83) said :
#2

I realize that I need to do something to windows, however I didn't get this problem until after I installed Ubuntu. I am not really sure where I should search for a windows forum about this issue. Is it possible that grub2 needs its own partition like some of these other bugs suggest?

Revision history for this message
Jonathan Litsheim (jonlits83) said :
#3

this is the messages that I get after booting into windows and than restarting.

no module name found
ABORTED. press any key to exit
BROADCOM UNDI PXE-2.1 V11.0.9
COPYRIGHT (c) 2000-2008 BROADCOM CORPORATION
COPYRIGHT (c) 1997-2000 INTEL CORPORATION
ALL RIGHTS RESERVED
PXE-E61: MEDIA TEST FAILURE, CHECK CABLE
PXE-M0F:EXITING BROADCOM PXE ROM
OPERATING SYSTEM NOT FOUND

So after this happens I put in the Ubuntu live CD get in Ubuntu
Mount the partition that Ubuntu is on
Open terminal type the following commands

$mount | tail -1

sudo grub-install --root-directory=/media/8588(TAB) /dev/sda

That installs grub and I Ubuntu will start normally and w7 will start normally one time and than I have to do the process again to get back into an OS.

I am pretty new to these commands and don't really know how to explain this any better. Thank you for your help

Revision history for this message
Jonathan Litsheim (jonlits83) said :
#4

So one way to solve this was to download easy BCD into windows restore the windows 7 boot manager add Ubuntu to easy BCD operating system and than restarted.
Now I get easy BCD to come up first with the option to boot either Ubuntu or Windows 7 Both work if I boot into Ubuntu it will than load grub and go into Ubuntu from there.
I however would prefer just to use grub instead of having to use both easy BCD and grub but hey it works.

Solved with easy BCD

Any suggestions on how to just use grub would be appreciated:)

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

Do you use a Hewlett Packard computer ?

Revision history for this message
Jonathan Litsheim (jonlits83) said :
#6

I have a Dell Studio 1555.

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

This kind of problem is hopefully seldom.
A workaround is to install Grub MBR on a USB key, and to use this key to boot Ubuntu.
Another solution is to have two disks and to move Window disk in 2nd position.
I know any clean solution, as the problem lies in Windows behaviour.

To confirm Windows is overwriting MBR, you need:
1) to reinstall Ubuntu on sda
2) run
       dd if=/dev/sda of=$HOME/previous_MBR bs=512 count=1
3) boot WIndows
4) boot on Ubuntu CD, and run command
       dd if=/dev/sda of=$HOME/new_MBR bs=512 count=1
5) cmp $HOME/previous_MBR $HOME/new_MBR