LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 03-31-2012, 11:36 AM   #1
fkasmani
Member
 
Registered: Dec 2007
Posts: 178

Rep: Reputation: 17
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.
 
Old 03-31-2012, 01:53 PM   #2
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: Slackware, Ubuntu, PCLinux,
Posts: 10,431

Rep: Reputation: 2471Reputation: 2471Reputation: 2471Reputation: 2471Reputation: 2471Reputation: 2471Reputation: 2471Reputation: 2471Reputation: 2471Reputation: 2471Reputation: 2471
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
 
1 members found this post helpful.
Old 03-31-2012, 08:41 PM   #3
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,099

Rep: Reputation: 4117Reputation: 4117Reputation: 4117Reputation: 4117Reputation: 4117Reputation: 4117Reputation: 4117Reputation: 4117Reputation: 4117Reputation: 4117Reputation: 4117
That is very odd.
Use "fixboot" (not fixmbr) and it should fix XP, and not trash your grub MBR code.
 
Old 04-01-2012, 03:30 AM   #4
fkasmani
Member
 
Registered: Dec 2007
Posts: 178

Original Poster
Rep: Reputation: 17
Quote:
Originally Posted by syg00 View Post
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 View Post
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.

Last edited by fkasmani; 04-01-2012 at 03:56 AM. Reason: adding details.
 
Old 04-01-2012, 04:06 AM   #5
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,099

Rep: Reputation: 4117Reputation: 4117Reputation: 4117Reputation: 4117Reputation: 4117Reputation: 4117Reputation: 4117Reputation: 4117Reputation: 4117Reputation: 4117Reputation: 4117
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.
 
Old 04-01-2012, 04:18 AM   #6
fkasmani
Member
 
Registered: Dec 2007
Posts: 178

Original Poster
Rep: Reputation: 17
Quote:
Originally Posted by syg00 View Post
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 View Post
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)
 
Old 04-01-2012, 05:22 AM   #7
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,099

Rep: Reputation: 4117Reputation: 4117Reputation: 4117Reputation: 4117Reputation: 4117Reputation: 4117Reputation: 4117Reputation: 4117Reputation: 4117Reputation: 4117Reputation: 4117
Quote:
Originally Posted by fkasmani View Post
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.
 
Old 04-01-2012, 12:30 PM   #8
fkasmani
Member
 
Registered: Dec 2007
Posts: 178

Original Poster
Rep: Reputation: 17
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?

Last edited by fkasmani; 04-01-2012 at 12:58 PM. Reason: additional info
 
Old 04-01-2012, 04:54 PM   #9
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: Slackware, Ubuntu, PCLinux,
Posts: 10,431

Rep: Reputation: 2471Reputation: 2471Reputation: 2471Reputation: 2471Reputation: 2471Reputation: 2471Reputation: 2471Reputation: 2471Reputation: 2471Reputation: 2471Reputation: 2471
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
 
Old 04-01-2012, 06:29 PM   #10
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,099

Rep: Reputation: 4117Reputation: 4117Reputation: 4117Reputation: 4117Reputation: 4117Reputation: 4117Reputation: 4117Reputation: 4117Reputation: 4117Reputation: 4117Reputation: 4117
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.
 
Old 04-01-2012, 09:31 PM   #11
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 10,599
Blog Entries: 4

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

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.
 
Old 04-02-2012, 03:36 AM   #12
fkasmani
Member
 
Registered: Dec 2007
Posts: 178

Original Poster
Rep: Reputation: 17
Quote:
Originally Posted by sundialsvcs View Post
Betcha something did change ... and betcha you made an ever-so-slight (sic...) change to the Grub configuration.
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 View Post
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 View Post
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
 
Old 04-02-2012, 12:50 PM   #13
fkasmani
Member
 
Registered: Dec 2007
Posts: 178

Original Poster
Rep: Reputation: 17
Quote:
Originally Posted by yancek View Post
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.
 
Old 04-02-2012, 01:47 PM   #14
fkasmani
Member
 
Registered: Dec 2007
Posts: 178

Original Poster
Rep: Reputation: 17
Quote:
Originally Posted by sundialsvcs View Post
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?
 
Old 04-02-2012, 03:27 PM   #15
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: Slackware, Ubuntu, PCLinux,
Posts: 10,431

Rep: Reputation: 2471Reputation: 2471Reputation: 2471Reputation: 2471Reputation: 2471Reputation: 2471Reputation: 2471Reputation: 2471Reputation: 2471Reputation: 2471Reputation: 2471
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.
 
  


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
GRUB error 15 on stage1.5. Trying to dual boot Arch and WinXP Kao Linux - Newbie 11 07-11-2009 07:16 PM
Dual Boot WinXP - Grub error 21 and 17 with removable hdd bays tgebrael Linux - Newbie 4 02-24-2009 09:26 AM
Dual boot WinXP/Debian, grub error booting WinXP ChemBot Linux - General 5 02-22-2007 04:13 PM
Grub error 17 Fedora 6 & WinXP dual boot R N Ghosh Fedora 3 01-21-2007 12:24 PM
GRUB: How to boot WinXP (NTLDR, NTDETECT.COM & BOOT.INI) from boot partition (EXT2) ? Rayen16 Linux - Software 1 05-25-2006 12:09 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 04:40 AM.

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