LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Need help fixing my GRUB user error. (https://www.linuxquestions.org/questions/linux-software-2/need-help-fixing-my-grub-user-error-137894/)

Mediocre_Driver 01-23-2004 03:24 PM

Need help fixing my GRUB user error.
 
Hello,

Recently while setting up GRUB I made the very silly mistake of installing GRUB in the boot sector(?) of my Windows XP partition. GRUB is now set-up properly in the MBR of my only hard drive, but unfortunately I broke Windows and it will not boot. ( Linux works just fine though, and the Windows partition is still intact )

At first, when trying to load Windows, GRUB would load GRUB, because it would just point to itself etc. It was an infinite loop of GRUB loading itself. So I tried booting from the Windows install CD to the recovery console, and then using fixboot.

fixboot /rebuild

Now the instance of GRUB on the Windows partition seems to be gone but Windows refuses to boot and gives an error like:

Disk Error.
Press any key to restart the system.

I'm out of ideas now, short of repartitioning and reinstalling everything ( which is not an option, really ). Please help me fix Windows so it boots.

P.S. - Strictly speaking this is a Windows issue, but I was hoping that GRUB users could she a little light on the problem.

nafsnipe685 01-23-2004 04:16 PM

Well if i was you i would personally start by making shure i have nothing of inportance on the windows drive by mounting it in linux and then storing it on an seperate disk, then i would remove everything important on linux the same way, then i would repartition and reinstall windows first. leaving room for linux and then install linux one last time. come down to it just start over by scratch!!! may be time comsuming but will be worth it!!!

Mediocre_Driver 01-23-2004 04:31 PM

Howdy again,

I'd rather as not. As I've mentioned the Windows partition is intact: I can access all the files etc. No data loss has occured. If possible I'd rather just fix the Windows boot loader.

On a side note: the disk is physically fine. This problem is not due hardware failure.

nafsnipe685 01-23-2004 05:07 PM

well what windows are you using?

Mediocre_Driver 01-23-2004 05:18 PM

Good point. I should've mentioned that:

I'm using Windows XP Pro. The Windows partition is FAT32.

homey 01-23-2004 06:06 PM

From the Windows cdrom try the command:fixmbr
Make sure you have a linux boot floppy handy.

Mediocre_Driver 01-23-2004 06:15 PM

Quote:

Originally posted by homey
From the Windows cdrom try the command:fixmbr
Make sure you have a linux boot floppy handy.

Already tried that. It spits out the same error. :-/

homey 01-23-2004 06:37 PM

Ok, I was able to dupicate the problem on an XP / Linux dual boot system. I ran the command: dd if=/dev/zero of=/dev/hda1 bs=512 count=1
This zaps the boot sector of hda1 same as if you had installed the grub onto hda1 instead of hda.

To fix it, I booted up with the XP cdrom and selected R which is the repair option.

At the prompt c:> I typed the commands:
fixboot
fixmbr


Then of course, the grub was gone so I used the quicky grub boot disk to restore that with the commands:
Note: It would be good to know where the root partition is, so type rdev and write it down.
root (hd0,1)
setup (hd0)


Note: to make a quicky grub boot disk from Linux, type these commands:
fdformat /dev/fd0
mke2fs -m 0 /dev/fd0

dd if=/boot/grub/stage1 of=/dev/fd0 bs=512 count=1
dd if=/boot/grub/stage2 of=/dev/fd0 bs=512 seek=1

Mediocre_Driver 01-23-2004 08:00 PM

Thank you very much. I will try the process out when I take down my box tonight. :-D

Mediocre_Driver 01-24-2004 12:52 PM

Well, wiping the boot sector didn't do the trick. I repartitioned and reinstalled in the end anyway. :-/

Thanks for the help though, I appreciate it.


All times are GMT -5. The time now is 06:47 PM.