LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Dual-boot - WinXP gives NTLDR error (https://www.linuxquestions.org/questions/linux-general-1/dual-boot-winxp-gives-ntldr-error-937427/)

fkasmani 03-31-2012 11:36 AM

Dual-boot - WinXP gives NTLDR error
 
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:

NTLDR is missing. Press Ctrl+Alt+Del to restart
I can repair/re-install WinXP with the setup disk, but I know it's going to modify the GRUB and I then won't be able to boot from the Linux-Mint side (which is my main usage).

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

Regards.

yancek 03-31-2012 01:53 PM

Do the repair to xp with your install disk then use your Linux Mint Live/Install CD to reinstall Grub2, instructions at the link below:

http://community.linuxmint.com/tutorial/view/245

You could also go to the Ubuntu site below to Section 12. Don't know if all the options listed here are available on Mint but the Copy Live CD files method should work:

https://help.ubuntu.com/community/Grub2

syg00 03-31-2012 08:41 PM

That is very odd.
Use "fixboot" (not fixmbr) and it should fix XP, and not trash your grub MBR code.

fkasmani 04-01-2012 03:30 AM

Quote:

Originally Posted by syg00 (Post 4641719)
That is very odd.
Use "fixboot" (not fixmbr) and it should fix XP, and not trash your grub MBR code.

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
Quote:

Originally Posted by yancek (Post 4641568)

and easily got grub back to normal.

I then tried the "fixboot" command suggested by syg00 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.

syg00 04-01-2012 04:06 AM

The only time I've seen something like that is if an attempt was made to re-install grub, and it was installed to the (Windoze) partition rather than the MBR.
If fixboot won't fix it, too many sectors in the partition got trashed. That means a re-install in my experience.

fkasmani 04-01-2012 04:18 AM

Quote:

Originally Posted by syg00 (Post 4641853)
If fixboot won't fix it, too many sectors in the partition got trashed. That means a re-install in my experience.

The worst part of re-installing is that it wants to overwrite my current installation and I'll end up losing all my installed programs, settings, etc.,
And even worse, is it common that this could happen again? I'm really surprised how this error just came up. Is this common with dual-boot?

I was just googling around and found this link http://www.proposedsolution.com/solu...-to-restart-2/and was wondering if Step 4 could be a solution (or would it mess up things on the Linux side (or on grub)?

Quote:

Originally Posted by syg00 (Post 4641853)
The only time I've seen something like that is if an attempt was made to re-install grub, and it was installed to the (Windoze) partition rather than the MBR.

Does this mean that every time I have to re-install grub I would experience this and (finally) have to reinstall WinXP afresh? (Surprisingly I haven't re-installed grub before this error came up)

syg00 04-01-2012 05:22 AM

Quote:

Originally Posted by fkasmani (Post 4641857)
Does this mean that every time I have to re-install grub I would experience this and (finally) have to reinstall WinXP afresh?

No.

Re-installing grub is perfectly safe. If you do it correctly.

fkasmani 04-01-2012 12:30 PM

I have a question, since I'm on a dual boot system and can access my WinXP partition by booting up from LinuxMint, where are the WinXP system files located - I just went into the root folder of my WinXP partition from LinuxMint 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").
Maybe I need to copy ntldr and ntdetect.com in there instead of into the WinXP partition?

Surprisingly there seem to be no system files in the WinXP partition. Here's what's on there:
Code:

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?

yancek 04-01-2012 04:54 PM

It's been a while since I used a windows system with boot.ini, but I believe that is the only file you will need as you already have ntldr and ntdetect.com. There is a link below to the microsoft site which has an example boot.ini file which you could create and copy to the root of your xp system. Should work.


http://support.microsoft.com/kb/289022

syg00 04-01-2012 06:29 PM

Merely having the files is insufficient - you need a programmatic means of locating them at boot. That is what fixboot attempts to provide. If that doesn't work, re-install seems the only option.

sundialsvcs 04-01-2012 09:31 PM

Betcha something did change ... and betcha you made an ever-so-slight (sic...) change to the Grub configuration. :tisk:

Start by confirming that you can still boot into Linux. Then, v-e-r-r-y carefully, examine the actual configuration that you are presenting to Windows when it loads. Grub must put NTLDR in-charge of the system in exactly the right way.

fkasmani 04-02-2012 03:36 AM

Quote:

Originally Posted by sundialsvcs (Post 4642346)
Betcha something did change ... and betcha you made an ever-so-slight (sic...) change to the Grub configuration. :tisk:

maybe, but I really don't remember. I'll tell what was the last thing I did - I was in my Linux and copied config files of Opera browser from my CD into the WinXP folder (under "documents and settings\my user\application data\opera") just before that I had booted up perfectly well into my WinXP. Then as from the following day it hasn't worked. Surely putting something into documents and sett....... shouldn't make WinXP boot proceedure go bonkers? But one thing is for sure; I have NOT reinstalled/modified grub or MBR before WinXP went corrupt.

Quote:

Originally Posted by sundialsvcs (Post 4642346)
Start by confirming that you can still boot into Linux.

Yes, Linux works fine - I'm in it right now.
Quote:

Originally Posted by sundialsvcs (Post 4642346)
Then, v-e-r-r-y carefully, examine the actual configuration that you are presenting to Windows when it loads. Grub must put NTLDR in-charge of the system in exactly the right way.

I'm not quite sure what you mean here. When I boot up my PC, it just comes up with the GRUB screen asking me to choose between Linux Mint, Linux Mint (something like) recovery mode, Memtest and WinXP, so I select WinXP and the next thing I see is the NTLDR message :banghead:

fkasmani 04-02-2012 12:50 PM

Quote:

Originally Posted by yancek (Post 4642234)
There is a link below to the microsoft site which has an example boot.ini file which you could create and copy to the root of your xp system. Should work.


http://support.microsoft.com/kb/289022

Thanks.
I tried this, but still get the NTLDR not found error.

fkasmani 04-02-2012 01:47 PM

Quote:

Originally Posted by sundialsvcs (Post 4642346)
Then, v-e-r-r-y carefully, examine the actual configuration that you are presenting to Windows when it loads. Grub must put NTLDR in-charge of the system in exactly the right way.

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:

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:

Device: /dev/sda5
yet, the grub code above says
Code:

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?

yancek 04-02-2012 03:27 PM

While you are booted in to Linux Mint, open a terminal and run: sudo fdisk -l (Lower case Letter L in the command not a number one)

Check to see if either/both sda3 and sda5 show the filesystem as ntfs, windows.

Quote:

search --no-floppy --fs-uuid --set=root 022D2F8676290F21
Also from the terminal, run blkid, don't know if you need sudo, then compare it to the number after set=root above. Doubt if this is the problem but...? I've not used xp but, from what I've read about it, you need at least the boot files on a primary partition which sda5 is not.

I doubt you could repair the xp filesystem from the Mint Disk Utility, don't really know.


All times are GMT -5. The time now is 09:45 AM.