LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (http://www.linuxquestions.org/questions/linux-general-1/)
-   -   Windows XP + GRUB not playing nice (http://www.linuxquestions.org/questions/linux-general-1/windows-xp-grub-not-playing-nice-751106/)

emuuu 08-29-2009 12:33 PM

Windows XP + GRUB not playing nice
 
Hey there!

I've just installed Arch Linux. After hours of tinkering with my /boot/grub/menu.lst file, I got Linux it to boot properly. :P

But now Windows doesn't want to work. When I choose Windows from the GRUB selection screen, it just opens a GRUB command prompt.

Here's how my hard drive is set up and partitioned and whatnot:

sda1: (supposed to be) Windows
sda2: swap
sda3: /boot
sda4: /

And here's what the Windows section of my /boot/grub/menu.lst looks like:

Code:

# (1) Windows
title Windows
rootnoverify (hd0,0)
makeactive
chainloader +1

Like I said, when I choose the Windows option from the GRUB selection screen, it opens up a GRUB command prompt. I'm really hoping nothing happened to my Windows partition while I was moving it. :P

I don't know how obvious it is, but I know nothing about GRUB.

Anybody know what's wrong? Thanks so much in advance. :)

ronlau9 08-29-2009 02:52 PM

To be sure that windows is on sda1 .
What is the outcome of the command fdisk -l (L lower case)

emuuu 08-29-2009 03:26 PM

Er, I can't copy and paste it, but I'm 98% sure it is. It looks something like this:

Code:

Device                Boot        Start        End        Blocks                Id        System
/dev/sda1        *        128        9308        big number        7        HPFS/NTFS
/dev/sda2                1        127        big number        82        Linux swap / Solaris
/dev/sda3                9309        9320        big number        83        Linux
/dev/sda4                9321        30401        big number        83        Linux

Yeah, it's kind of laid out in a weird way.

And I'm pretty sure I figured out my Windows partition is corrupt. That could have something to do with it. And seeing as I can't find my install disks, that could present a problem. XD

syg00 08-29-2009 06:08 PM

Looks like you installed grub into the XP partition - as well as the MBR.
Using fixboot from the XP install CD might fix it - sometime works, sometimes not. Doesn't need to be your XP CD; if you can find a mate with one, use that.

pixellany 08-29-2009 06:10 PM

I'm guessing you have a 250GB drive (30401 cylinders @ 8.2MB each)

Windows: ~75GB---OK
~1G swap---OK
~ 90MB (for /boot, I assume)---OK
~ 170GB for Linux /root--OK

Out of curiousity, why is it setup this way? Many folks would have left the Windows partition at the front end and just re-sized it down.

If you had grub setup the way you show, and you selected Windows and go a grub prompt, that would suggest the GRUB had been installed to the Windows partition.

One thing that would help would be to tell us the steps you went thru to get where you are.

emuuu 08-29-2009 06:59 PM

Hah, long story, actually.

I was following a guide that told me my boot partition had to be first. I guess this just applies to older BIOS?. Anyway, I wasn't aware of this at the time. I moved my Windows partition forward to make room for it. I guess something went wrong in the moving process, because after that I wasn't able to access my Windows partition at all after it.

Anyway, I found some system restore disks, so I totally reformatted my hard drive and I'm starting anew. XD

I guess since we came to no real conclusion, this thread can be deleted. :P

Thanks for your help, though!

syg00 08-29-2009 07:06 PM

If you had given us all the relevant info at the start maybe we could have come to a "real conclusion".
Windows is very intolerant of being moved. As you discovered.

And yes, the advice about the boot partition is to cover (old) BIOS restrictions. Out of habit I still do it though - but put it on before allocating any other partition.

emuuu 08-29-2009 07:27 PM

So if I create a boot partition after a fresh Windows install it will/should work just fine? Or is it even a good idea to have a separate boot partition?

pixellany 08-29-2009 08:51 PM

Quote:

Originally Posted by emuuu (Post 3662332)
Hah, long story, actually.

I was following a guide that told me my boot partition had to be first.

Not a Linux Guide, I trust.......Linux does not care where its partitions are on the drive. (If you have a document saying that Linux needs to be first, we would like to see it......heads will roll...;))

If you are starting over, do you want any hints on how to set things up so everything "just works"?

Short answer:

Install Windows on the first partition, which is maybe 15-20 GB

Install Linux on another partition--also ~15 GB, with swap at the end.

Keep the rest of the disk empty (unpartitioned). When everything is working, then set up one or more partitions for shared data.

syg00 08-29-2009 09:31 PM

Quote:

Originally Posted by emuuu (Post 3662355)
So if I create a boot partition after a fresh Windows install it will/should work just fine?

Yes - on any BIOS from the last 5 years or so
Quote:

Or is it even a good idea to have a separate boot partition?
Not required, but I use a lot of different distros, and if you delete the one that has grub, guess what happens ...
I like a separate boot partition.


All times are GMT -5. The time now is 03:10 AM.