Link to home
Start Free TrialLog in
Avatar of Steve Mutchler
Steve MutchlerFlag for United States of America

asked on

missing ntfs.sys and other boot files...

I get XP machines in from time to time that won't boot...
missing or corrupted boot files...

Normally I boot from an XP CD and restore the bad/missing files...

But often times there is more than one file corrupted, and you don't know
which ones until you reboot, and it tells you...

Been thinking about some kind of system to make the repair easier...

Boot from Ubuntu...have a USB drive with some of the common files that get corrupted...uncompressed...I guess just pull them from a working XP machine...

NTFS.sys...Boot.ini...NTLDR...Ntdetect.com...etc

Then have a batch file on the flash drive to copy the files to the correct location...have it replace the files listed whether or not the specific file is corrputed or not...

Has anyone tried this...???...think it might work...???

Are there any other ways of doing this that might work...???

Thoughts welcome...

Steve

ps...it's been a long time since I did batch files...I think I'm gonna need
some files from Win98 to do the batch files on that USB drive...???

Avatar of tarcis
tarcis
Flag of Brazil image

Some files vary in xp version, only a few are common for all versions.

I remember getting erros on hal.dll and lots of c:\windows\config but this last one is a file with the registry, so its different for every computer.

Normally when you encounter such problem, its caused by a freeze or bad shutdown, and a simple chkdsk /r can get those damaged files back (remember to check if the HD is still good to avoid getting this problem again).

This guide has 10 steps to recovering xp boot, and as you can see its not about just puting files back.
http://www.techrepublic.com/article/10-things-you-can-do-when-windows-xp-wont-boot/6031733

I have sucesfully fixed xp boot by copying files like you did one by one checking at each bootup, but most times is just a waste of time
Avatar of joebot
joebot

Hello,
If chkdsk doesn't repair the files then I would recommend doing a repair install of Windows. This non-destructively reinstalls the os and you don't lose any data or applications.

To do this you would boot to the XP cd > Press Enter to setup Windows > F8 to accept the eula > It should then detect your Windows install and give you the option to press "R" to repair. It will then proceed like a clean Windows install but save all of your data and programs.

http://pcsupport.about.com/od/operatingsystems/ss/instxprepair1.htm
Checkout SPOTMAU you can boot from the cd and fix most of those issues. Saves you some time reinventing the wheel.

http://www.spotmau.com/

Although its not free  :(


 
Avatar of nobus
imo - that is what a repair install does : http://www.michaelstevenstech.com/XPrepairinstall.htm
You should get a hold of your hard drive's manufacturer diagnostic utility and  test the hard drive thoroughly.  System files should not get corrupted on a regular basis and this could be the result of a drive on the verge of failing.  

Its never IF a hard drive is going to fail, its always WHEN is it going to fail?  If your hard drive checks OK, there has got to be some other hardware issue with your computer that is causing this corruption.

Jim-R  it is not about a drive, but "I get XP machines in from time to time that won't boot...
missing or corrupted boot files..."
Avatar of Steve Mutchler

ASKER

Well...it was an interesting evening...tried something I had not done before...

I booted up with my UBCD, hoping I might find a tool of somekind that would help...
Since I have not used my UBCD much, I was reading thru some directions on using the tools...

This particular author described a process that I thought I would try...

First I pulled the drive, slaved it to another box and made an image...then ran virus and mbam scans...it was clean...

Booted to recovery console...
C:\ATTRIB -H C:\BOOT.INI
C:\ATTRIB -R C:\BOOT.INI
C:\ATTRIB -S C:\BOOT.INI

C:\DEL BOOT.INI

At th is point the author wanted to run C:\BOOTCFG...but he was also talking about running CHKDSK /R/F....
So, I ran CHKDKS /R/F and now things got interesting...

CHKDSK found and corrected some errors...which I guess I really hadn't expected, since I know this clients machine and had worked on it about a year ago, rebuilt it and installed a new HD...

So...after CHKDSK I ran C:\BOOTCFG /REBUILD...and I got this error message "failed to scan disks for Windows installation.  This error may be caused by a corrupt file system whick would prevent bootcfg from successfully scanning.  Use chkdsk to detect any disk errors."

So...I'm running CHKDSK again and see what happens...
After CHKDSK I'll try BOOTCFG /REBUILD again...if no joy, I'll do a repair install...
If that doesn't work, then I assume I have a bad HD, will replace it and rebuild...

I'll keep you posted...
you may need to run hddregenerator on it - be wait for the chkdsk to finish
Good idea nobus...
altough hd regenarator sometimes fixes a bad HD, the best thing to do afterwards is to test the HD with the manufacturer tool (seagate -> seatools, wd-> wd diag, samsung->estool...) and make sure the drive passes all tests. If it doesnt, backup and get a new drive, its better than the headache to try to recover data later. If the drive is bad but still working, you can clone it and not go through the trouble of reinstalling everything.
"Jim-R  it is not about a drive, but "I get XP machines in from time to time that won't boot...
missing or corrupted boot files..."

@nobus:  I missed the part that implies this isn't the same computer missing or corrupting system files on a regular basis, but a random series of computers coming for repair.

It doesn't change my opinion that the hard drive is the first suspect responsible for the condition.

@steevem5000 re C:\DEL BOOT.INI

Any time an author suggests the DEL command, especially on a system file, even if the suspect file is bad, corrupted or otherwise compromised, I always substitute the RENAME command and add dot OLD, dot BAD or similar so it's easy to reverse what has been done.  Not a big deal when you've already imaged the drive, but could save you some time and effort in the future.

Well...my quest to find, hopefully, a simpler solution to missing/corrupt boot files didn't work on this particular computer...
Finished chkdsk, appears susccessful...but bootcfg still gets error message...

I'll try the Seagate test...since it's a Seagate HD...see what that brings up...
Which reminds me...I don;t think I've ever run it from a command prompt...can you boot to the Seagate CD and run the tests...???
I ran a test with my UBCD and that test was fine...so I assumed.......................................

If test suggests bad HD, then new HD and rebuild...if test is inconclusive or shows ok...then I'll attempt a repair install...if that's good, get all the updates back in order...and I can pull the data from the image...

Well...what I had hoped would a rather quick repair is not turning out that way...

I'll keep you posted...

To respond to some comments...

Jim-R...I get a few machines in every month like this one...some boot file comes up missing...and every time I struggle with pulling the files from the XP CD...I always have to look up the command structure...and it seems like
more often than not it's not always successful....sometimes if I slave the drive and run errorcheck, it fixes itself...


Jeff_01...never used Spotmau...but have heard of it...will check it out...

nobus...you have answered so many of my questions of the years I can't thank you enough...
I have never used hddregenator...I assume it's non destructive...something like Spinrite...


Well...going from bad to worse...now I DO have problems...

I don;t know how I missed this...just not thinking, I guess...

Repair install bluescreens out...won't work...
Slaved the drive to another computer...the comptuer knows the drive is there...but BIOS won;t  reconize it...
AND....to top everything off...it appears that my image is no good...I use Acronis...but it didn;'t show me any errors...

So now...I gotta do some data recovery, get a new drive and start all over...and it's really my fault for not
being observent and cautious...all time I cannot bill to the client...
Live and Learn...

So...thanx for all your suggestions on the previous situation...

Now...if any of you have favorite data recovery programs when BIOS won;'t recognize the HD...I would like to hear from you...or any other suggestions you may have...
ASKER CERTIFIED SOLUTION
Avatar of nobus
nobus
Flag of Belgium image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
obus...I'm up and running...got the data back...

AND...I printed out your post and read thru your other links and printed them out also...

Question...

You say...

 copy E:\i386\NTLDR c:\
      ATTRIB -arsh ntldr
      copy e:\i386\NTDETECT.COM
      ATTRIB -arsh ntdetect.com c:\


Should not the command be...

expand E:\i386\ntldr c:\
expand E:\i386\ntdetect.com c:\

I don't see  how  the command your have expands those compressed files out...

Also...I assume your attrib -arsh is only to make the file "visible" after
copying it to the C:\ drive...so you know it's there...

Thanx for the help...
it does not extract, just copy it - the command is to give the normal attributes to the files