Need help fixing my GRUB user error.

Discussion in 'Windows & Other OS Discussion & Support' started by Oblivious, Jan 23, 2004.

  1. Oblivious

    Oblivious DivrerHaeven Seinor Mebmer

    Joined:
    Mar 11, 2003
    Messages:
    236
    Likes Received:
    0
    Trophy Points:
    0
    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.

    Edited for spelling
     
    Last edited: Jan 23, 2004
  2. JustaGuy

    JustaGuy New Member

    Joined:
    Dec 19, 2002
    Messages:
    44
    Likes Received:
    0
    Trophy Points:
    0
    Is there any bootloader in your master boot record? That's what the error sounds like. You should put GRUB there, so that it can load Windows and Linux.

    But if you can load Linux now, than that must not be the problem, although I did not understand very well if you can still load linux, after removing the GRUB instance. Can you?
     
  3. UberLord

    UberLord A Legend in Underwear

    Joined:
    May 8, 2002
    Messages:
    5,255
    Likes Received:
    4
    Trophy Points:
    0
    You can install GRUB ok to the MBR and still get Windows to boot.
    You just need a new extra lines in grub.conf

    Here's mine
    Code:
    title=Windows XP
            root (hd0,0)
            chainloader +1
    This assumes that XP is installed into partition 1
     
  4. Oblivious

    Oblivious DivrerHaeven Seinor Mebmer

    Joined:
    Mar 11, 2003
    Messages:
    236
    Likes Received:
    0
    Trophy Points:
    0
    Hello, thanks for the input. I guess I was a bit short on info. Let me try to answer your questions:

    My MBR contains GRUB. For reference here is the grub.conf file:
    Code:
    default=0
    timeout=10
    splashimage=(hd0,1)/boot/grub/splash.xpm.gz
    title Fedora Core (2.4.22-1.2115.nptl)
    	root (hd0,1)
    	kernel /boot/vmlinuz-2.4.22-1.2115.nptl ro root=LABEL=/ rhgb
    	initrd /boot/initrd-2.4.22-1.2115.nptl.img
    title DOS
    	rootnoverify (hd0,0)
    	chainloader +1
    
    My hard drive has 3 partitions:
    1.-Windows XP Pro
    2.-Linux Root
    3.-Linux Swap

    GRUB works fine. Linux works fine. Windows fails to boot. All partitions are accessible and readable.

    The error occurs when the Windows boot loader starts. So GRUB runs fine-> GRUB chainloads the Windows boot loader-> Windows boot loader spits out error.

    -------------------------------------
    Edit: P.S.

    The mistake I made was an oversight when setting up GRUB. Instead of typing

    Code:
    grub> setup (hd0) [etc...]
    
    I typed:
    Code:
    grub> setup (hd0,0) [etc...]
    
    I quickly corrected my mistake, but the damage was done. So at that point in time I had 2 versions of GRUB installed. One in the MBR and one at the beginning of the first partition ( the Windows partition ) . At this point the MBR GRUB would load the 1st partition GRUB which would load the 1st partition GRUB etc... .
    I booted the Windows CD and started the Recovery console where I tried:
    Code:
    c:>fixboot /rebuild
    
    This removed the second installation of GRUB, but on the downside the aforementioned error began. Since then I've tried installing the Windows boot loader into the MBR to no avail.
    As of right now my computer has the configuration listed at the top of this post: GRUB in the MBR etc...

    Hope that helps.
     
    Last edited: Jan 24, 2004
  5. UberLord

    UberLord A Legend in Underwear

    Joined:
    May 8, 2002
    Messages:
    5,255
    Likes Received:
    4
    Trophy Points:
    0
    Well, it sounds like you've got GRUB sorted and the problem in now with Windows.

    Erm - Try asking in the Windows forum? I'm sure panging can help you out :)
     
  6. JustaGuy

    JustaGuy New Member

    Joined:
    Dec 19, 2002
    Messages:
    44
    Likes Received:
    0
    Trophy Points:
    0
    Maybe if you indicate the partition explicitly in the Windows section it'll work, that is, "chainloader (hd0,0)+1" instead of "chainloader +1".

    Here's my grub.conf (I've got Windows on hda1 and Linux on hda5):

    Code:
    default 0
    timeout 3
    splashimage=(hd0,4)/boot/grub/splash.xpm.gz
    
    title=Gentoo Linux
    root (hd0,4)
    kernel (hd0,4)/boot/bzImage root=/dev/hda5 video=radeonfb:1024x768-32@85
    
    title=Windows XP
    root (hd0,0)
    chainloader (hd0,0)+1
    Maybe this will help. If not, then redo "fixboot" and "fixmbr" and reinstall grub and hopefully it will work.
     
  7. Oblivious

    Oblivious DivrerHaeven Seinor Mebmer

    Joined:
    Mar 11, 2003
    Messages:
    236
    Likes Received:
    0
    Trophy Points:
    0
    Howdy again,

    No the Chainloader manipulation still gives the same error. I'm gonna wipe the first sector of hda1 using 'dd', as per a suggestion from 'homey' on LinuxQuestions.org. Hope it works :).

    Appended info
    Nope. Well nothing I've tried worked, so I repartitioned & reinstalled. :-/

    Thank you all for the help, I appreciate it.
     
    Last edited: Jan 24, 2004

Share This Page

visited