# Tip: Rebuilding XP



## lotuseclat79 (Sep 12, 2003)

The Windows Self-Destruct Button
Ref: http://tech.yahoo.com/bp;_ylt=AowSQVejzXecImwaH7c7GAPxLJA5?blogname=null&blogpost=115

Using the Windows "Rebuild" command to give your PC a new lease on life:
The simple, streamlined instructions:

* Boot from your XP Setup CD and enter the Recovery Console
* Run "Attrib -H -R -S" on the C:\Boot.ini file
* Delete the C:\Boot.ini file
* Run "Bootcfg /Rebuild"
* Run Fixboot

Langa also offers a more detailed instruction that shows you, literally button by button, what to press to make sure your computer gets rebuilt properly. It's a great step by step explanation of something that can be a little frightening and daunting at first.

Ref: http://www.informationweek.com/story/showArticle.jhtml?articleID=185301251

-- Tom

P.S. I recommend reading the full article before attempting to rebuild XP.


----------



## JohnWill (Oct 19, 2002)

Interesting article, I'm sure it won't be too long before the opportunity to test this comes along.


----------



## lotuseclat79 (Sep 12, 2003)

lotuseclat79 said:


> The Windows Self-Destruct Button
> Ref: http://tech.yahoo.com/bp;_ylt=AowSQVejzXecImwaH7c7GAPxLJA5?blogname=null&blogpost=115
> 
> Using the Windows "Rebuild" command to give your PC a new lease on life:
> ...


Here is a gotcha in the above scheme of using the attrib command from the Recovery Console, i.e.:

* Boot from your XP Setup CD and enter the Recovery Console
* Run "Attrib -H -R -S" on the C:\Boot.ini file
* Delete the C:\Boot.ini file
* Run "Bootcfg /Rebuild"
* Run Fixboot

First, I was unable to issue the attrib command as described above, however,
when I issued it with each parameter in a separate attrib command, then it worked, as in:
* Run "Attrib -H" on the C:\Boot.ini file
* Run "Attrib -R" on the C:\Boot.ini file
* Run "Attrib -S" on the C:\Boot.ini file

Next, if you are able to run the chkdsk c: /r command and it does not report that it fixed or repaired something, you should then attempt to issue the
* Run "bootcfg /scan" or "bootcfg /list" to see if it works and before running the delete command on the c:\boot.ini file which is NOT advised. If the bootcfg command works then it is advised that it is safer to rename the boot.ini file to boot.ini.orig rather than to delete it.

If you get a report back that the bootcfg command is unable to work, probably due to a corrupted file system (although chkdsk c: /r may have worked and did not report any repairs) then it will not be able to work if the /add or /rebuild parameters are issued.

The caveat of not deleting the c:\boot.ini file can help (only if you do not have a corrupted file system) you if you have access to a Linux version with NTFS read/write support from a kernel 2.6.14 or later. However, the NTFS support (i.e. kernel driver) is only for writing an existing file of the same size, so you can modify it, but not make it larger - according to my current understanding.

There is a freely available NTFS read/write facility named Captive which could probably help (have not tried it) at:
http://www.jankratochvil.net/project/captive/
As opposed to other projects this is currently the only software supporting the full read/write access including the possibility to create/delete files, modify directories etc.

If you delete the c:\boot.ini file and your file system is corrupted even though chkdsk completes without repairs, the command: bootcfg /rebuild will not work and it will tell you it is probable a file system corruption causing the problem.

The best you can hope for is then to attempt to do an XP Repair Install and hope it works to correct a corrupted file system, if present. If it works, you should be able to boot up the repaired system. However, I do not know at this point whether running an XP Repair Install over a corrupted file system will repair it and be able to successfully boot up.

If not, you may be able to mount the volume and save your data files before attempting a full clean installtion which will reformat the disk and install a clean version of XP.

-- Tom


----------



## RedHelix (Oct 31, 2005)

Interesting. I have a machine on the bench at work that's proclaiming it only has a partial XP install, but I can view the well-developed files and folders from a preinstallation environment. I was going to just nuke and reinstall, but I'll give this a try when I go in tomorrow.


----------



## gurutech (Apr 23, 2004)

Why would you delete the BOOT.INI file after booting into recovery console? If you get the menu option to choose to boot into recovery console, then the problem isn't with the BOOT.INI file. It may just need to be edited, not deleted...


----------



## lotuseclat79 (Sep 12, 2003)

Hi gurutech,

Only on advice from MS, because the instructions ultimately come from them, so, I suppose that they considered it necessary to generate a new one, and I would guess that their scheme to rebuild it required it to be deleted first (i.e. maybe a Recovery Console limitation on rewriting existing files).

Choosing to boot into the Recovery Console is only available if you have it already expressed in the boot.ini file, and getting into the Recovery Console is usually done with a CD when it is necessary (things are already flakey and need to be fixed somehow and other fixes did not work leaving the RC as the only alternative left standing). The only problem is that if the Registry has not been modified to give the RC commands more breadth of coverage, then it is just very liimited.

I agree with you that it should not be necessary to delete the boot.ini file, and I would instead rename it - so, you can always rename it back from the RC later if necessary.

-- Tom


----------



## neos1 (Feb 13, 2006)

Quoting LotusClat:
""Choosing to boot into the Recovery Console is only available if you have it already expressed in the boot.ini file, and getting into the Recovery Console is usually done with a CD when it is necessary (things are already flakey and need to be fixed somehow and other fixes did not work leaving the RC as the only alternative left standing).
 The only problem is that if the Registry has not been modified to give the RC commands more breadth of coverage, then it is just very liimited.""

How is this accomplished?


----------



## lotuseclat79 (Sep 12, 2003)

Hi neos1,

"How to make Recovery Console more useful"
http://forums.techguy.org/tech-tips-tricks/480677-how-make-winxp-recovery-console.html

-- Tom


----------

