Linux - GeneralThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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...
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"
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.
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...
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.
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??
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....
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.