Dual-boot - WinXP gives NTLDR error

Questions about Grub, UEFI,the liveCD and the installer
Forum rules
Before you post please read this

Dual-boot - WinXP gives NTLDR error

Postby fkasmani on Sun Apr 01, 2012 5:38 am

Hello, I've just completed setting up my PC with dual-boot and it's worked fine for about a week now. Just yesterday I booted from the WinXP side and now today when I try to boot up it says
Code: Select all
NTLDR is missing. Press Ctrl+Alt+Del to restart


tired the fixboot from the WinXP recovery console and it said (whatever) was written correctly, but I still get the "NTLRDR is missing" message when I select the windows partition from the grub menu.

Just to go through the steps I followed, I first tried to repair-install the current installation on WinXP but it said it would overwrite my current install and I'd lose all my files including my documents, etc.., so I didn't go ahead with it. Instead I went to the recovery console and ran the chkdsk /p command. By now grub had obviously been messed up, so I followed the link
http://community.linuxmint.com/tutorial/view/245and easily got grub back to normal.

I then tried the "fixboot" command but drive letters were different in the recovery console - while the WinXP partition shows up as F:/ in WinXP, here it was showing as D:/ so I did fixboot d:
Somehow I still could not boot into WinXP, 'cos of the same NTLDR missing error.

Then I went back to the recovery console and copied ntldr & ntdetect.com from the WinXP setup CD, but ntdetect.com gave the Access Denied error. I then booted up from my Linux Mint 12 and copied ntdetect.com from the WinXP setup CD into the WinXP partition. Then tried to bootup from selecting the WinXP option from the grub menu, but no luck, and here I am.

Any help on how I can go about with this, pls.

Regards.
fkasmani
Level 2
Level 2
 
Posts: 52
Joined: Wed Mar 03, 2010 6:11 am

Linux Mint is funded by ads and donations.
 

Re: Dual-boot - WinXP gives NTLDR error

Postby AlbertP on Sun Apr 01, 2012 8:59 am

Probably the partition numbers have changed, and you need to set the correct number of the Windows system partition in its boot.ini file.
Registered Linux User #528502
Image
Feel free to correct me if I'm trying to write in Spanish, French or German.
AlbertP
Level 15
Level 15
 
Posts: 5870
Joined: Sun Jan 30, 2011 12:38 pm
Location: The Netherlands

Re: Dual-boot - WinXP gives NTLDR error

Postby fkasmani on Sun Apr 01, 2012 1:30 pm

Thanks, AlbertP.
Where can I see the partition numbers?

Surprising!!!!
I just went into the root folder of my WinXP partition from my LinuxMint installation so as to copy the contents of boot.ini here, and I I don't see boot.ini (I don't think any files would be hidden as I viewing via LinuxMint, yet I've enabled "view hidden files").
Since this is a dual-boot, where are these files stored? Maybe I need to copy ntldr and ntdetect.com in there.
fkasmani
Level 2
Level 2
 
Posts: 52
Joined: Wed Mar 03, 2010 6:11 am

Re: Dual-boot - WinXP gives NTLDR error

Postby AlbertP on Sun Apr 01, 2012 1:42 pm

I once restored a Win XP failing to boot by just modifying the C:\boot.ini. On my Win Vista the file indeed does not exist - the bootloader has been replaced by something new since Vista. But on XP it's supposed to be there.
I'm afraid something accidentally deleted the file, and the missing file might cause the failed to find NTLDR error.
Registered Linux User #528502
Image
Feel free to correct me if I'm trying to write in Spanish, French or German.
AlbertP
Level 15
Level 15
 
Posts: 5870
Joined: Sun Jan 30, 2011 12:38 pm
Location: The Netherlands

Re: Dual-boot - WinXP gives NTLDR error

Postby fkasmani on Sun Apr 01, 2012 1:53 pm

Surprisingly there seem to be no system files in the WinXP partition. Here's what's on there:
Code: Select all
bootex.log        MSOCache   Program\ Files           WINDOWS
Config.Msi        msvci70.dll   RECYCLER
Documents\ and\ Settings  NTDETECT.COM   System\ Volume\ Information
hiberfil.sys        ntldr      VritualRoot
and the NTDETECT.COM and ntldr are there because I copied them there.

How do I get the system files and boot.ini back in here? Can I copy them and maybe make a new boot.ini and place them in this folder?
fkasmani
Level 2
Level 2
 
Posts: 52
Joined: Wed Mar 03, 2010 6:11 am

Re: Dual-boot - WinXP gives NTLDR error

Postby AlbertP on Sun Apr 01, 2012 1:54 pm

You could probably get a boot.ini from a fresh XP. I'm not sure what files should normally be there on XP, as I'm having Vista on my computer.
Registered Linux User #528502
Image
Feel free to correct me if I'm trying to write in Spanish, French or German.
AlbertP
Level 15
Level 15
 
Posts: 5870
Joined: Sun Jan 30, 2011 12:38 pm
Location: The Netherlands

Re: Dual-boot - WinXP gives NTLDR error

Postby fkasmani on Sun Apr 01, 2012 2:04 pm

Just googling around and this is what I've come across: http://corusa.com/blog/2009/08/06/root- ... indows-xp/
Wonder how I can get those files back in place - they must be somewhere in the WinXP setup disk and I'd need to extract them.
fkasmani
Level 2
Level 2
 
Posts: 52
Joined: Wed Mar 03, 2010 6:11 am

Re: Dual-boot - WinXP gives NTLDR error

Postby jmor8801 on Sun Apr 01, 2012 8:42 pm

That happened to me about 2 years ago with ubuntu. I finally had to use the winxp recovery mode and do fixmbr then fixboot from the command line. Then i had to reinstall grub and tell it where the linux was at. Maybe this helps ?
jmor8801
Level 1
Level 1
 
Posts: 22
Joined: Wed Mar 14, 2012 3:26 pm

Re: Dual-boot - WinXP gives NTLDR error

Postby fkasmani on Mon Apr 02, 2012 2:51 pm

I wonder if this can be of any help: When I get the grub screen to chose which OS I want to load, I have the option to press 'e' to edit the commands before loading or 'c' for command prompt, so I selected the Windows XP option and pressed 'e'. Here's what came up:
Code: Select all
setparams 'Microsoft Windows XP Professional (on /dev/sda3)'

insmod part_msdos
insmod ntfs
set root='(hd0,msdos3)'
search --no-floppy --fs-uuid --set=root 022D2F8676290F21
drivemap -s (hd0) ${root}
chainloader +1

Now, when I do to Disk Utility in Linux Mint, I can select the WinXP partition and it states this to be
Code: Select all
Device: /dev/sda5
yet, the grub code above says
Code: Select all
setparams 'Microsoft Windows XP Professional (on /dev/sda3)'
would it help if I changed the /dev/sda3 in the grub to /dev/sda5

Another thing I see in the Disk Utility is an option of "Check Filesystem". Could I repair the WinXP bootup issue from this?
fkasmani
Level 2
Level 2
 
Posts: 52
Joined: Wed Mar 03, 2010 6:11 am

Re: Dual-boot - WinXP gives NTLDR error

Postby AlbertP on Mon Apr 02, 2012 2:56 pm

The name you give to your Windows does not matter. The partition number is instead written on the set root= line: (hd0,msdos3) means sda3.
Registered Linux User #528502
Image
Feel free to correct me if I'm trying to write in Spanish, French or German.
AlbertP
Level 15
Level 15
 
Posts: 5870
Joined: Sun Jan 30, 2011 12:38 pm
Location: The Netherlands

Re: Dual-boot - WinXP gives NTLDR error

Postby fkasmani on Tue Apr 03, 2012 2:56 am

AlbertP wrote:The name you give to your Windows does not matter. The partition number is instead written on the set root= line: (hd0,msdos3) means sda3.

but according to fdisk -l sda3 is not my WinXP partition. The WinXP partition is sda5
fkasmani
Level 2
Level 2
 
Posts: 52
Joined: Wed Mar 03, 2010 6:11 am

Re: Dual-boot - WinXP gives NTLDR error

Postby AlbertP on Tue Apr 03, 2012 5:10 am

You can usually fix your grub.cfg with sudo update-grub.

Grub possibly uses a differnt way of numbering logical partitions. Grub's partition 3 has a Windows bootsector on it, as you else wouldn't see an NTLDR error. It's also possible that Windows XP does not like being on a logical partition.
Registered Linux User #528502
Image
Feel free to correct me if I'm trying to write in Spanish, French or German.
AlbertP
Level 15
Level 15
 
Posts: 5870
Joined: Sun Jan 30, 2011 12:38 pm
Location: The Netherlands

Re: Dual-boot - WinXP gives NTLDR error

Postby wayne128 on Tue Apr 03, 2012 5:31 am

I think you are placing WinXP on logical partition and this method thus present trouble on winXP boot loader.
There are ways around but I believe it is not worth doing since yours is simple dual booting XP with Linux OS.

It is easier to get winXP installed onto primary partition, then install Linux OS in any ( primary or logical partition).
wayne128
Level 8
Level 8
 
Posts: 2203
Joined: Tue Jul 13, 2010 12:15 am

Re: Dual-boot - WinXP gives NTLDR error

Postby fkasmani on Mon Apr 09, 2012 12:55 pm

I did blkid and it shows 022D2F8676290F21 as the UUID for SDA3 while SDA5 is the WinXP partition. Would it help if I did one of the following:
Either replace 022D2F8676290F21 with the sda5 UUID in the grub, or, format my ntfs data partition to (maybe) ext3 and then update grub with 'sudo update-grub' - this way grub would see only one ntfs partition and correctly assign it to WinXP (just a thought).
fkasmani
Level 2
Level 2
 
Posts: 52
Joined: Wed Mar 03, 2010 6:11 am

Re: Dual-boot - WinXP gives NTLDR error

Postby AlbertP on Mon Apr 09, 2012 1:25 pm

Probably there's a Windows bootsector on the sda3 disk by accident. You don't need another filesystem to get rid of that, formatting it again as NTFS should erase that non-functional bootsector.

Did you already check the boot.ini on sda5 if the boot partition is indeed 5 there?
Registered Linux User #528502
Image
Feel free to correct me if I'm trying to write in Spanish, French or German.
AlbertP
Level 15
Level 15
 
Posts: 5870
Joined: Sun Jan 30, 2011 12:38 pm
Location: The Netherlands

Linux Mint is funded by ads and donations.
 

Return to Installation & Boot

Who is online

Users browsing this forum: NM5TF and 20 guests