LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 08-19-2008, 03:19 PM   #1
theory_prof
Member
 
Registered: Sep 2004
Location: Nevada
Distribution: Fedora, Knoppix , Ubuntu
Posts: 34

Rep: Reputation: 15
Angry windows seems to disable grub


I have installed many Windows/Linux dual boot machines,
but what happened today floored me.

So I have this Windows Machine (XP) and I create free space
with GParted and then I install Ubuntu 8.04 in the free space.
After everything is said and done I get my nice Grub screen with
my usual choices to boot into Linux or Windows. I boot numerous times
into Linux -- no problem.

Now here is the kicker: I boot into Windows. Works fine. Next
time I boot again, the machine does not boot at all: Only the BIOS
screen comes on, "Loading Grubs" is displayed for a microsecond
and then
it... reboots... "Loading Grubs"...reboots..."Loading Grubs"...
reboots...

I reinstalled everything; same behavior: As long as you boot into Linux
no problem, but Winodes once (!), and the machine is dead!

Does anyone know of a new issue where Windows wipes out the boot record?
I am clueless...
 
Old 08-19-2008, 08:27 PM   #2
paulsm4
LQ Guru
 
Registered: Mar 2004
Distribution: SusE 8.2
Posts: 5,863
Blog Entries: 1

Rep: Reputation: Disabled
Hi -

You're correct - Windows replaces the Linux boot record with it's own bootstap (which knows nothing about Linux).

But Grub and Linux are still there. All you have to do is this:

http://www.increa.com/articles/GRUB-...dows/index.htm
http://users.bigpond.net.au/hermanzone/
http://linuxhelp.blogspot.com/2005/1...-and-boot.html

Quote:
1. Boot from your Linux install CD (e.g. "Rescue" option)
<= This will probably run Linux in a RAM disk

2. Mount your Linux hard disk
mkdir /oldroot
mount /dev/hda4 /oldroot
<= substitute your actual Linux boot partition for "/dev/hda4"

3. Run "grub-install":
cd /oldroot/usr/sbin
./grub-install --root-directory=/oldroot --force-lba /dev/hda
<= substitute your actual hard disk for "/dev/hda"

4. Remove the CD and reboot
 
Old 08-19-2008, 09:58 PM   #3
tungvs
Member
 
Registered: May 2008
Distribution: Centos; Ubuntu; Fedora
Posts: 98

Rep: Reputation: 15
But Paul, how can windows replace GRUB with its bootloader ? According to the OP, I know he installed ubuntu after seting up windows, so the windows bootloader was replaced by the GRUB. He could boot into ubuntu, so the GRUB worked fine. But once he boot into windows, (as you said) windows replaced the GRUB with its bootloader. It must be an unusual behavior, and I don't get it, because windows doesn't replace bootloader automatically. Please provide some more details.

Thank you .
 
Old 08-19-2008, 10:23 PM   #4
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,124

Rep: Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120
Some form of MBR/virus protection in the BIOS probably. Just turn it off.
 
Old 08-19-2008, 10:29 PM   #5
theory_prof
Member
 
Registered: Sep 2004
Location: Nevada
Distribution: Fedora, Knoppix , Ubuntu
Posts: 34

Original Poster
Rep: Reputation: 15
Thanks for the two swift replies.
Here is one more detail I had forgotten to mention:
This is a University machine.
Indeed, the Machine came with Windows, XP to be precise.
More precisely, they must have used their own XP image,
as the machine has a Vista sticker prominently displayed on the case.

As mentioned before, I simply installed Ubuntu by shrinking the
Windows partition. And the everything worked perfectly as long as
one boots into Linux (using Grub). But once I log into Windows
(no problem the first time) then it does not boot into grub properly.

Some other details: There are actually two Windows partitions
on the disk with some tiny free space between, but the second
Windows partition simply holds data...
 
Old 08-19-2008, 10:31 PM   #6
theory_prof
Member
 
Registered: Sep 2004
Location: Nevada
Distribution: Fedora, Knoppix , Ubuntu
Posts: 34

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by syg00 View Post
Some form of MBR/virus protection in the BIOS probably. Just turn it off.
I checked the BIOS, could not find anything. But why can I boot into
Linux then?
 
Old 08-20-2008, 12:41 AM   #7
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,124

Rep: Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120
No idea - thought I'd seen a similar thread with that solution recently. Quick search should find it.
 
Old 08-20-2008, 10:02 AM   #8
theory_prof
Member
 
Registered: Sep 2004
Location: Nevada
Distribution: Fedora, Knoppix , Ubuntu
Posts: 34

Original Poster
Rep: Reputation: 15
I guess is is needed if one installs Windows AFTER Linux, as WIndows
will reset the MBR. Right?

Quote:
Originally Posted by paulsm4 View Post
 
Old 08-20-2008, 10:04 AM   #9
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 10,657
Blog Entries: 4

Rep: Reputation: 3938Reputation: 3938Reputation: 3938Reputation: 3938Reputation: 3938Reputation: 3938Reputation: 3938Reputation: 3938Reputation: 3938Reputation: 3938Reputation: 3938
Each operating-system installer typically rewrites the MBR to point to its installer, as indeed you would expect it to do.

You simply need to reboot from a CD-ROM and run the grub-install process to rewrite the MBR to point back to grub. Then, adjust the grub control-files so that either Windows or Linux can be started.

Windows boot-loaders must be started by Grub in such a way that Grub hands-over control to the Windows BL as though the Windows BL were actually the first one to load. The exact procedure varies but is well-documented in the grub docs.
 
Old 08-20-2008, 03:43 PM   #10
theory_prof
Member
 
Registered: Sep 2004
Location: Nevada
Distribution: Fedora, Knoppix , Ubuntu
Posts: 34

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by sundialsvcs View Post
Each operating-system installer typically rewrites the MBR to point to its installer, as indeed you would expect it to do.
But look, I installed grub after windows was already present. Grub worked fine, it booted numerous times (into my beloved Linux). Only then once I did I fire up windows (from grub), i.e. only then after one boot of
windows (not install, right!!) did grub no longer work. (And I reproduced this behavior by reinstalling everything.)

-- I know booting up windows should be outlawed ---

Booting(!) windows should not mess with the MBR (or grub), or does it?


Side remark: (Primal Fear)

Let me also repeat that the machine ran Vista at some time when it was
delivered. Does Vista and the BIOS somehow conspire now to mess up the BIOS
so that the the machine is forever useless??
 
Old 08-21-2008, 03:22 PM   #11
mostlyharmless
Senior Member
 
Registered: Jan 2008
Distribution: Arch/Manjaro, might try Slackware again
Posts: 1,851
Blog Entries: 14

Rep: Reputation: 284Reputation: 284Reputation: 284
vista sticker

Quote:
This is a University machine.
Indeed, the Machine came with Windows, XP to be precise.
More precisely, they must have used their own XP image,
as the machine has a Vista sticker prominently displayed on the case.
Vista sticker probably means nothing - remember the whole "Vista Capable/Vista Ready" lawsuit? Just marketing. But it made me think, you're not booting a machine on a University network, are you? Because if you are, and you're not running on the "local machine" but on a "roaming profile" on a Windows Server, then it would make sense that the server is causing the problem....
 
Old 08-22-2008, 07:04 PM   #12
theory_prof
Member
 
Registered: Sep 2004
Location: Nevada
Distribution: Fedora, Knoppix , Ubuntu
Posts: 34

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by mostlyharmless View Post
But it made me think, you're not booting a machine on a University network, are you? Because if you are, and you're not running on the "local machine" but on a "roaming profile" on a Windows Server, then it would make sense that the server is causing the problem....
That could it. Unfortunately, I have left that University Lab now, so
I cannot play with the machine any longer. In the end they gave my colleague a second machine, which now runs only Linux.

Thanks everyone for their input.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Disable GRUB Jose Rivas Ubuntu 2 09-25-2007 02:58 PM
Disable GRUB to rewrite MBR subhranath Linux - Newbie 7 01-12-2006 04:08 PM
disable lilo(grub) laurentwahl Linux - Newbie 5 05-01-2005 09:44 AM
Can I temporarily disable GRUB?? Tiyogi Linux - General 4 04-15-2005 07:15 AM
Disable GRUB willis3000 Linux - Newbie 4 08-20-2004 01:58 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 06:24 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration