LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 01-23-2004, 04:24 PM   #1
Mediocre_Driver
LQ Newbie
 
Registered: Nov 2003
Posts: 11

Rep: Reputation: 0
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.

Last edited by Mediocre_Driver; 01-23-2004 at 04:28 PM.
 
Old 01-23-2004, 05:16 PM   #2
nafsnipe685
LQ Newbie
 
Registered: Jan 2004
Location: Texas, USA
Distribution: Slackware 9
Posts: 19

Rep: Reputation: 0
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!!!
 
Old 01-23-2004, 05:31 PM   #3
Mediocre_Driver
LQ Newbie
 
Registered: Nov 2003
Posts: 11

Original Poster
Rep: Reputation: 0
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.
 
Old 01-23-2004, 06:07 PM   #4
nafsnipe685
LQ Newbie
 
Registered: Jan 2004
Location: Texas, USA
Distribution: Slackware 9
Posts: 19

Rep: Reputation: 0
well what windows are you using?
 
Old 01-23-2004, 06:18 PM   #5
Mediocre_Driver
LQ Newbie
 
Registered: Nov 2003
Posts: 11

Original Poster
Rep: Reputation: 0
Good point. I should've mentioned that:

I'm using Windows XP Pro. The Windows partition is FAT32.
 
Old 01-23-2004, 07:06 PM   #6
homey
Senior Member
 
Registered: Oct 2003
Posts: 3,057

Rep: Reputation: 61
From the Windows cdrom try the command:fixmbr
Make sure you have a linux boot floppy handy.
 
Old 01-23-2004, 07:15 PM   #7
Mediocre_Driver
LQ Newbie
 
Registered: Nov 2003
Posts: 11

Original Poster
Rep: Reputation: 0
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. :-/
 
Old 01-23-2004, 07:37 PM   #8
homey
Senior Member
 
Registered: Oct 2003
Posts: 3,057

Rep: Reputation: 61
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
 
Old 01-23-2004, 09:00 PM   #9
Mediocre_Driver
LQ Newbie
 
Registered: Nov 2003
Posts: 11

Original Poster
Rep: Reputation: 0
Thank you very much. I will try the process out when I take down my box tonight. :-D
 
Old 01-24-2004, 01:52 PM   #10
Mediocre_Driver
LQ Newbie
 
Registered: Nov 2003
Posts: 11

Original Poster
Rep: Reputation: 0
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
fixing an error in LQ Tutorials. xushi LQ Suggestions & Feedback 3 04-30-2005 10:20 AM
Fixing GRUB 60cents Fedora - Installation 17 04-17-2005 11:52 PM
PLEASE HELP. I ruined windows booter while fixing GRUB Frelov Linux - Newbie 3 03-12-2005 10:05 AM
Fixing frozen GRUB after I reloaded a ghost image to a drive linlu LinuxQuestions.org Member Success Stories 4 08-25-2004 10:47 AM
fixing partitions in GRUB aryth Linux - Newbie 12 08-23-2004 01:18 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 10:58 PM.

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