Re: Dual boot Win XP / Linux, using grub

From: Douglas Mayne (doug_at_SLACKWARE-2.localnet)
Date: 10/21/03


Date: Tue, 21 Oct 2003 15:34:39 -0600

On Tue, 21 Oct 2003 23:13:06 +0200, Stefan Söffing wrote:

> Hi!
>
> I just installed Win XP on the first (primary) partition, which was
> working fine. Then I set up Linux (Debian) on the second partition using
> a boot floppy, which was still ok.
>
> Then I decided to use grub as boot loader. Since I haven't had any
> experience with it, I must have done something wrong here:
>
> I used 'grub-install /dev/hda' to write grub into the MBR and set up the
> operating systems in /boot/grub/menu.lst as follows:
>
> ---
> title Linux
> root (hd0,1)
> kernel /vmlinuz root=/dev/hda2
>
> title WinXP
> rootnoverify (hd0,0)
> makeactive
> chainloader +1
> ---
>
> Now I can boot to Linux, but I can't start Windows XP any more (it
> simply restarts when selecting the WinXP item).
>
> I wonder where windows XP stores its boot loader. If it was in the MBR
> it is overwritten now. But where should I have installed grub instead?
>
> And how can I restore WinXP's boot loader (ntldr)? The problem is, that
> I can't boot from CD, so I'm not able to start the Recovery Console.
>
> Is there anyone who could tell what I should have done to get things
> working? If someone had a solution to my problem I'd be even more happy,
> of course.
>
> Stefan
>
It should work- if there are no other errors. I think grub-install failed
for some reason.

I prefer setting up from within the "grub shell," as opposed to
grub-install. From the interactive shell, you can see if there are any
problems with the setup.

$grub
        grub>root (hd0,1)
        grub>setup (hd0)
        grub>quit

Watch for error messages after each command.

Notice the command root (hd0,1) specifies where menu.lst and the rest of
grub is located, not the root filesystem.

--Douglas Mayne



Relevant Pages

  • Re: Grub sucks with Error 13!!!
    ... > Fedora at the moment. ... The linux part loads perfectly. ... what makes you think it is a grub problem. ... Unless there is no xp boot loader where grub is transferring control. ...
    (Fedora)
  • Re: GRUB question
    ... My machine has Windows boot loader in the MBR, how can I change it to ... I have only 2 OS, Windows 2K and Linux, so it should be fine by ... using GRUB as the main boot loader. ...
    (comp.os.linux.misc)
  • RE: GRUB failure
    ... GRUB is loading part of the boot loader on the second drive. ... apparently thinks that linux is on the second drive. ... when both are in the same GRUB directory. ...
    (RedHat)
  • linux and xp
    ... Second, I know how to configure LILO, but not grub. ... But I want the system to default boot into Linux. ... smartass at the office pops the disk out and ... I already read the howto on getting the xp boot loader to go into Linux. ...
    (comp.os.linux.networking)
  • Re: install windows
    ... > i got linux on my second partition and would like to reinstall windows ... > how do i it without loosing my boot-loader? ... You most likely will lose your boot loader. ...
    (comp.os.linux.misc)