Add Windows XP entry to GRUB
I can't figure out how to add a Windows XP entry to the GRUB bootloader. I know there's been a million threads on this already, but none of them seem to help me. It think the problem might be that I have a lot of drives and partitions.
I added the following to /boot/grub/menu.lst: title Windows Xp rootnoverify (hd0,0) makeactive chainloader +1 But when I select it during boot, it says some executable is not in the right format, or something like that. I tried hd1 and hd2, but that gave me errors about unknown partition type. Can anyone help me fix this? Here's some specs: Suse Linux 9.3 120gb SATA drive /dev/sdb /dev/sdb1 Reiser / /dev/sdb5 NTFS Storage /dev/sdb6 Swap /dev/sdb7 Reiser (previous Suse install) /dev/sdb8 NTFS Storage 120gb SATA drive /dev/sdc /dev/sdc1 NTFS Storage 200gb SATA drive /dev/sda /dev/sda1 NTFS Windows /dev/sda5 NTFS Storage It's all a mess I know, but there's a lot of valuable stuff stored on the partitions, so reorganizing it would take ages. |
hey! that's our problem.
you need to work out where the window's boot info is, and then how to tell grub that- hd0,0 isn't going to be helpful here. titanium_geek |
Do you mean that I need to specify the windows directory as well as the drive? Do you have an example you could show me?
|
Can you post the actual output of the commmand: fdisk -l
|
as homey says, fdisk -l - that's a little L, not a one,
is the best way to start. ok- an explanation of the problem: grub reads the grub entry to find out what it needs to do. at the line where you call Code:
rootnoverify (hd0,0) Ok. So if we look at your partition diagram, which we shouldn't rely on, go for the fdisk -l but if we have a look, it is pointing to the one that just says sdb. Try changing it to hd2 (for the third drive) and 1 for the second partion. so it would be Code:
rootnoverify (hd2,1) oh- and the grub manual, though it be long and boring (hint- use the power of the table of contents) is an excellent resource. http://www.gnu.org/software/grub/manual/grub.html - use it! and another thing- next time try and read the threads- I know it can be daunting when you are starting out. One last thing- I was a rude idiot for not welcoming you to the forums- Welcome to LQ! titanium_geek |
Thank you, it's good to be here.
I did read a few threads about this, but nobody else seemed to have as many partitions as I do, so those solutions didn't work. Here's the fdisk output: Quote:
|
> But when I select it during boot, it says some executable is not in the right format, or something like that.
What's the exact error message? |
try sdb5 as the place to find windows.
I think the solution might be that it's sda - not hda. try, this: Code:
rootnoverify (sd2,4) remember that it's hardrive, partion number, but start counting at zero. beyond that, my knowledge peters out- sorry. titanium_geek |
http://www.gnu.org/software/grub/man...OS_002fWindows
this link might have some info in regards to your situation. I think, that it might be worth an day's work to back up your stuff, and then do a complete reformat and repartition- in a way that makes sense. - but you should be able to fix it without that- of course with less hair :) titanium_geek |
Quote:
Ideally I would repartition everything, but there's a few hundred gig of stuff on these drives, it would take a bit of work to pull off. |
I haven't been able to get any hd#,# combination to work, and I think I know why. I installed Windows on that partition while I already had Windows installed on another partition. There is thus no boot.ini on the partition I'm trying to boot to. What should I put in the boot.ini?
EDIT: If I need to reinstall Windows, can I do it without clobbering GRUB? Could I maybe unplug all hard drives except for the Windows drive, install Windows, then plug everything back in? |
one: windows loves to be the first partition on the first drive. It will scream if you don't let it.
two: it WILL clobber grub- if it can find it. :jawa: I know of people on this forum who have unplugged all but the windows drive, then reinstalled windows with out it killing grub. Of course, you could put grub on a floppy disk, then windows can't touch it. A linux boot floppy is a very useful tool in situations like this, as well. Oh- and have you thought in investing in an external hardrive to backup your data? ;) good luck- windows can be infruriating! titanium_geek |
I now have things working nicely. Here's a rundown:
1. Unplugged all drives except the one I want windows on. 2. Installed windows on it. 3. Linux drive is SATA1, windows drive is SATA3, but I changed the boot order in BIOS so that SATA3 was the first one. Could have just plugged them in the other way I know, but whatever. 4. Installed Kubuntu with GRUB onto the linux drive. It detected Windows during installation and added to the boot menu: Quote:
Anyone want to make any observations about this setup? |
looks good! keeping windows and linux on separate drives is always a good thing.
titanium_geek |
What is "dd" trick?
Try changing the boot order of the hard drives through bios, or just switch the cables around. That's what worked for me. It seemed that when my linux drive was the first boot hard drive, there was no "hd#,#" combination which would boot windows, but when I put the windows drive as the first boot device, it worked fine. It's possible that you'll have to install GRUB on the windows drive if it's to be the first boot drive, because it's probably not on there at the moment. |
remember that the (0,0) means hd_1 not hd_0
i had the same problem i was putting in 0,3 for hdb3 when it should have been 0,2 |
logical rearrangement
How about swapping your hard drives logically as Windows can only start from the first hard disk.
something like this... map (hd0) (hd1) map (hd1) (hd0) |
All times are GMT -5. The time now is 03:44 PM. |