I have a few suggestions that should make installing grub easier. First, use the Legacy version of GRUB 0.97. The current GRUB 2 version is quite complicated. Second, create a GRUB boot floppy or CD-ROM to install GRUB.
GRUB has two different things that you "install". The files for GRUB can be placed in any partition, Primary or Logical. The boot sector for GRUB must be "installed" to the Master Boot Record or a Primary partition (not Logical). I recommend creating a Primary partition for the GRUB boot loader and Linux. Then install GRUB (files and boot sector) to the Primary partition.
Your problem with booting Linux is most likely because you are trying to install the GRUB boot sector into a Logical partition. Although you can install the GRUB files to a Logical partition, you then have to install the GRUB boot sector to the MBR. Boot loaders should only be installed into Primary partitions even though GRUB supports some exceptions to that rule.
To install GRUB you first need to make sure that you have the required files. You need a folder called "/boot/grub" containing the GRUB files.
You only need the "stage1_5" files for the file-system where GRUB is located. It doesn't hurt to just copy all all the files. They are very small.
Create a "menu.lst" file in the "/boot/grub" folder with the correct information to load Linux.
Here's an example "menu.lst" loading Linux from the third Primary partition on the first hard disk.
kernel /boot/vmlinuz vga=791 root=/dev/sda3 ro vt.default_utf8=0
After all the files are present in "/boot/grub" then you can install GRUB (write the boot sector). First, boot GRUB from a floppy or CD and press the "C" key to get into command mode. Or, you can run GRUB from Linux by typing in "grub" at the command prompt in Linux.
Here are the two commands to install GRUB to the third Primary partition of the first hard disk. The GRUB boot block is also written to the third Primary partition.
The first command "root" says that the GRUB files are located in the third partition. The second command "setup" says where to install the GRUB boot sector.
After installing GRUB you can create a boot sector file to use with "NTLDR" and "BOOT.INI".
dd if=/dev/sda3 of=/tmp/bootsect.lnx bs=512 count=1
You can replace "/tmp/bootsect.lnx" with the path and file name that you want to use for storing the boot sector file.
In your Windows XP "BOOT.INI" file you need to add a menu entry under the "[operating systems]" section.
multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Microsoft Windows XP"
You must put the boot sector file (for example BOOTSECT.LNX") in the root directory containing the "NTLDR" and "BOOT.INI" files for Windows. You may need to copy the file somewhere else such as a thumb drive if Linux can't write to your NTFS partition.
You can download an ISO image of a Legacy GRUB boot CD from my web site here.
Download the file "bootcd.bin" and rename it to "bootcd.iso". Use CD burning software to write the ISO image to a CD. The CD will boot to a GRUB menu.
First, copy the required GRUB files. You can find them on the CD. Rename the files to lower-case if they do not end up being lower case! You can boot Linux from the CD if you have no other Linux. It is Slackware Linux.
To use the Linux on the CD, log in as root with no password.
Create some mount points and mount both your hard disk and the CD.
mount /dev/sda3 /mnt/hd
mount /dev/hdc /mnt/cd
cp /mnt/cd/*stage* /mnt/hd/boot/grub
cp /mnt/cd/*STAGE* /mnt/hd/boot/grub
You can shut off or restart the computer. Then, boot the CD again and press "C" to get a GRUB command prompt. Set up GRUB.
GRUB command mode has a lot of useful commands. One that is really helpful is the "find" command.
That will display all the GRUB device names for partitions where the file "/boot/vmlinuz" was found. If you've only got one copy of Linux installed, that should print the device name to use in place of "(hd0,2)" when your Linux is not in the third partition of the first hard disk. You can also type in "root", "kernel" and "initrd" commands to load some Linux not listed in the "menu.lst" file. After typing the commands, use the "boot" command to actually boot the Linux that you loaded.