LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 05-04-2009, 07:28 PM   #1
kiwi_MTBer
LQ Newbie
 
Registered: Nov 2008
Location: Chch, NZ
Distribution: Fedora 10
Posts: 18

Rep: Reputation: 0
Grub not loading WinXP after XP reinstall


When trying to boot to WinXP with grub the following appears and hangs:

Code:
 Booting WinXP Pro
rootnoverify (hd0, 4)
chainloader +1
When adding makeactive after rootnoverify this appears:

Code:
 Booting WinXP Pro
rootnoverify (hd0, 4)

Error 12: Invalid device requested
Press any key to continue...
Everything was working fine untill yesterday when I tried reinstalling Windows. Since then Ive reinstalled grub thru the cd (without booting any OS) and still no luck.

From what I can gather, windows has shifted itself from (what I believe to be /dev/sda1) to /dev/sda5 (anyone want to remind me why I moved to linux?!) and linux is still on /dev/sda2. Linux still loads fine

Heres my grub.conf:

Code:
# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE:  You do not have a /boot partition.  This means that
#          all kernel and initrd paths are relative to /, eg.
#          root (hd0,1)
#          kernel /boot/vmlinuz-version ro root=/dev/sda2
#          initrd /boot/initrd-version.img
#boot=/dev/sda

default=2
timeout=5
splashimage=(hd0,1)/boot/grub/splash.xpm.gz
hiddenmenu
title Fedora 9
	root (hd0,1)
	kernel /boot/vmlinuz-2.6.27.21-78.2.41.fc9.x86_64 ro root=UUID=1e1bffcb-9cb1-412b-a932-a615873f46bf
	initrd /boot/initrd-2.6.27.21-78.2.41.fc9.x86_64.img
title WinXP Pro
	rootnoverify (hd0,4)
	makeactive
	chainloader +1
Any help will be much appreciated. Cheers
 
Old 05-04-2009, 08:00 PM   #2
wabbalee
Member
 
Registered: Oct 2006
Location: brisbane - australia
Distribution: ubuntu
Posts: 335

Rep: Reputation: 38
I found something that may be useful for you even though it does not address your problem exactly, it may still contain info you need to get back on track.

https://help.ubuntu.com/community/Re...tallingWindows

otherwise just google for grub and you'll find loads. I have run into similar problems a long time ago and I remember that I ended up installing windows first and then Linux. Then I made an image clone of windows for when windows decides to crash again. I still do this quiet a lot on other peoples machines that want to try/use linux but still can't give windows a kick in the ....
 
Old 05-04-2009, 08:02 PM   #3
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 20,944

Rep: Reputation: 4070Reputation: 4070Reputation: 4070Reputation: 4070Reputation: 4070Reputation: 4070Reputation: 4070Reputation: 4070Reputation: 4070Reputation: 4070Reputation: 4070
Windoze won't boot from a logical partition - let's see the output of "fdisk -l" (as root, or give it full path on Fedora)
 
Old 05-04-2009, 08:20 PM   #4
kiwi_MTBer
LQ Newbie
 
Registered: Nov 2008
Location: Chch, NZ
Distribution: Fedora 10
Posts: 18

Original Poster
Rep: Reputation: 0
Heres the ouput from fdisk -l (only showing the drive that windows and linux is on):

Code:
Disk /dev/sda: 250.0 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x85a485a4

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1               2       16972   136319557+   f  W95 Ext'd (LBA)
/dev/sda2           16973       19582    20964825   83  Linux
/dev/sda3   *       19583       27400    62798085    7  HPFS/NTFS
/dev/sda4           27401       30401    24105532+   7  HPFS/NTFS
/dev/sda5               2       16972   136319526    7  HPFS/NTFS
After reading this WinXP is on /dev/sda1 and again on /dev/sda5 (??), though changing drive numbers in grub either comes up with the same error as before or another one "NTLDR is missing".

Im hoping that Im missing something simple here, otherwise I might just go back and reinstall everything from the start (like wabbalee says). If I didnt need windows for certain things at uni, I wouldve just given it the boot long ago...
 
Old 05-04-2009, 08:34 PM   #5
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 20,944

Rep: Reputation: 4070Reputation: 4070Reputation: 4070Reputation: 4070Reputation: 4070Reputation: 4070Reputation: 4070Reputation: 4070Reputation: 4070Reputation: 4070Reputation: 4070
Will Fedora allow to look at those NTFS partitions ?. If so, see which contains ntldr.
If it was me, I'd be inclined to change the type of sda1 from 0x0f to 0x07 (sda5 will/should disappear). I don't understand why sda3 is marked bootable though.

(take note of my sigline).
 
Old 05-04-2009, 11:12 PM   #6
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: PCLinux, Slackware, Ubuntu
Posts: 10,094

Rep: Reputation: 2369Reputation: 2369Reputation: 2369Reputation: 2369Reputation: 2369Reputation: 2369Reputation: 2369Reputation: 2369Reputation: 2369Reputation: 2369Reputation: 2369
I don't know what you did when you were re-installing xp but sda1 does not contain windows, it is an extended partition and does not contain data. Why do you think windows is on sda5? what's on the bootable partition, sda3? Whatever happened here, if you actually did install windows xp to sda5 which is a logical partition, you won't be able to boot it unless you put xp boot files (or some windows boot files) on a primary partition. This is because xp has a weak bootloader.
 
Old 05-05-2009, 05:15 PM   #7
kiwi_MTBer
LQ Newbie
 
Registered: Nov 2008
Location: Chch, NZ
Distribution: Fedora 10
Posts: 18

Original Poster
Rep: Reputation: 0
Before the reinstall of XP my HDD had:

[Windows] | [Fedora] | [Games] | [Spare]

When booting with the XP disk and using the partitioning tool that comes up, I deleted the windows partition and told it to install windows to this partition. sd3 contains files for my games AND now it contains windows boot files (NTLDR, boot.ini etc hence why Im guessing its marked as bootable). All the windows files are now in sd5 (Im presuming from yancek's post). How this happened- I dont know. Something has gone wrong somewhere along the line.

Because of this I'm going to re-reinstall windows, but rearranging the HDD layout to something similar I had before this happen.

What confuses me is that sd1 and sd5 are on the same place on the HDD- is this because sd1 (as a physical partition) contains sd5 (as a logical)?
 
Old 05-05-2009, 07:09 PM   #8
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: PCLinux, Slackware, Ubuntu
Posts: 10,094

Rep: Reputation: 2369Reputation: 2369Reputation: 2369Reputation: 2369Reputation: 2369Reputation: 2369Reputation: 2369Reputation: 2369Reputation: 2369Reputation: 2369Reputation: 2369
Look at your fdisk output above and understand that in Linux partitioning, the logical partitions start at 5 so that if, as you did, you create an extended partition and then within it create one logical partition of the same size you will see the output showing start: 2 and End: 16972 for each.

To create an extended partition, you must use one of your primary partitions which in your case is sda1. You then have three other primary partitions, sda2, sda3 and sda4. If you have windows boot files such as boot.ini, ntldr, etc. in sda3 you should be able to chainload from that partition.

If you haven't started your re-install yet, you might try this entry in /boot/grub/menu.lst:

rootnoverify (hd0,2)
setup (hd0)
quit
 
Old 05-05-2009, 09:07 PM   #9
wabbalee
Member
 
Registered: Oct 2006
Location: brisbane - australia
Distribution: ubuntu
Posts: 335

Rep: Reputation: 38
if you are going to reinstall, please have a look a my suggestions here, this is the way I have been doing it for quiet some time now and that works like a charm for me. Of course where ever I say Ubuntu you just pretend I said Fedora :-)

it is post #7 on that thread

Last edited by wabbalee; 05-05-2009 at 09:09 PM.
 
Old 05-06-2009, 01:17 AM   #10
kiwi_MTBer
LQ Newbie
 
Registered: Nov 2008
Location: Chch, NZ
Distribution: Fedora 10
Posts: 18

Original Poster
Rep: Reputation: 0
After playing around with menu.lst still couldnt get it to work so....

I have taken the easy way out (tho the longest..) and reinstalled windows. And now I have a HDD with a similar layout to how I started, and both linux and winxp load- so all good.

Dont know how it ended up with a logical partition and the startup files on a seperate partition than windows itself- but hey at least now I know to maybe pay a little bit more attention when partitioning in the future.

Thanks guys anyways
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
GRUB: Loading WinXP on a different hard drive ZxPwn Linux - General 3 06-12-2008 01:04 PM
winxp reinstall w/grub manual install on ubuntu causes missing hal.dll file for xp pulper Linux - Software 6 09-13-2006 02:26 PM
Need to reinstall WinXP, How do I keep my GRUB bootloader? jesusphreak Linux - Software 2 04-17-2005 09:38 PM
i got RH8 & WinXP installed and properly working by GRUB. how can i reinstall WINXP? kublador Linux - Newbie 4 06-23-2003 12:00 PM
how to reinstall grub after a winxp installation? zovres Linux - Newbie 1 04-28-2003 09:17 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 07:49 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration