Monday, February 6, 2012

Solved! Grub Error for XP: “Invalid Device Requested”

So I was messing around with the partitions on my laptop the other day trying to install the new version of Ubuntu (7.10, which for some reason refused to run on my laptop) and managed to break whatever it is that tells XP to boot. I kept getting the error “Invalid Device Requested” when selecting XP in Grub. I checked the Grub entry in menu.lst, and checked the partition that XP was installed on, and it looked fine.

Then I realized that I had deleted the first partition on my HD to put the new Ubuntu on…and that partition, while not my Windows XP partition, was an NTFS partition that was some kind of backup/restore partition that Gateway had on there. I think it must have had all the Windows XP boot files on it, because when I looked that my XP partition, it was missing boot.ini, ntldr, ntdetect, etc. That would explain why Grub was not seeing it as a bootable disk.

So I read a bit on the intarweb, and saw that a few people were saying that XP’s boot files need to be on the first partition of the disk. I’m not entirely sure that this is true, but to be safe I moved my XP partition to be the first on the disk.  EDIT: I’m not sure if XP has to be the first partition, and if someone else is having this same problem, try sticking the partition number with XP on it into the boot.ini file where it says “partition(1)”. Might save you some time.

I then made a new boot.ini with the following entries (pretty much default):

[boot loader]
timeout=30
default=multi(0)disk(0)rdisk(0)partition(1)\WINDOWS
[operating systems]
multi(0)disk(0)rdisk(0)partition(1)\WINDOWS=”Microsoft Windows XP Professional” /fastdetect

I then copied the AUTOEXEC.bat, CONFIG.sys, IO.sys, MSDOS.sys, NTDETECT.com, and ntldr from another XP machine to the root of my laptop’s XP partition. I rebooted, and voila! XP booted right up from Grub. (You can also get these files off of the XP CD in the i386 folder.) EDIT: After doing some research, all you *should* need to fix this is NTLDR, NTDETECT.COM, and a BOOT.ini file.

Post a comment if this works for you.

Posted in Computers | 1 Comment »

One Response

  1. onur Says:

    Hi. I am having the same problem with you. I copied the files you said, but nothing changed!..
    but you said : “but to be safe I moved my XP partition to be the first on the disk” , i could not understand that..

Leave a Comment

Please note: Comment moderation is enabled and may delay your comment. There is no need to resubmit your comment.