Recover corrupt W2K boot code
Published: 29 Jan 2003 09:10 GMT
Enabling CD-ROM boot
You may need to configure your BIOS to allow booting from the CD-ROM. Start your BIOS software at startup and go to the section that allows you to adjust the Boot settings. Make sure a CD-ROM is enabled, and change the order so that the CD-ROM is listed before the hard drive (Figure C).
| Figure C |
![]() | Adjust your BIOS settings, if necessary, to enable the machine to boot from a CD-ROM. |
If you're supporting an older BIOS that doesn't have this option, check with your computer maker to see if an upgrade is available. Otherwise, you'll need to use the Windows 2000 Setup disks to start Windows 2000 in order to access the Recovery Console and your Windows 2000 CD for a fresh copy of Ntldr. The next screen in Windows Setup gives you the option of starting the Recovery Console (by pressing C) or using the Emergency Repair Process (by pressing R).
Note
If you don't have setup disks, you'll need four floppies and your Windows 2000 CD. Windows 2000 contains a guide to creating these disks. Click Start and Help. In the Index, typesetup and choose the topic Boot Disks, Creating.
Using the manual repair option
To access the manual repair option, press R at the Windows Setup screen. On the next screen, press M for manual repair. Manual repair begins with three options selected: Inspect Startup Environment, Verify Windows 2000 System Files, and Inspect Boot Sector. Press [Enter] to begin the manual repair.
Tip
You don't want to use F, Fast Repair, because you don't want to restore the registry, only the Ntldr file.
If you have an Emergency Repair Disk (ERD), you can place it in the drive and press [Enter]. However, an ERD isn't necessary for replacing Ntldr. You can press L to skip inserting an ERD. When Windows Setup finds your Windows 2000 installation on disk, press [Enter] to begin repairing the files. Windows will examine the disks and display a progress bar as it does so. When a file is missing or differs from the version on the CD, you'll be prompted to skip the file, repair the file, or let the program repair all files without asking.
If Windows Setup reports, as expected, that Ntldr is not the original file, press [Enter] to repair the file. (Setup won't tell you anything different if the file is actually missing, so the message is a tad inaccurate.) Figure D shows this blue screen, which I call the Blue Screen of Life, in comparison with the usual Windows Blue Screen Of Death error message.
| Figure D |
![]() | When manual repair detects a problem with Ntldr, choose [Enter] to repair the file. |
Once the file is repaired, Windows will continue examining files. Chances are, it will find many files that don't match, especially if you've applied any Service Packs. Since the problem is confined to Ntldr, you can press [F3] to quit Setup. You'll be warned that Windows Setup isn't complete. Ignore the warning and press [F3] again to quit. Windows will reboot, so remove any floppy disks and the Windows 2000 CD from their drives before it does. If the problem was indeed a missing or corrupt Ntldr, you'll now be rewarded with the bootstrap menu's return, or you'll proceed to the Windows logon screen.
Check for viruses
If a virus infects the machine, no amount of manual copying is going to fix the problem: The machine will just keep getting reinfected. It's a good idea to keep an updated floppy disk or CD with virus scanning software and other utilities for emergencies such as this.
An alternative: Using the Recovery Console
If the manual repair option doesn't work, as it didn't during one test after I followed Microsoft's instructions, choose C at the Windows Setup screen to start the Recovery Console. The Recovery Console will list all Windows 2000 operating systems installed on your computer. Enter the number corresponding to the one you wish to repair, and press [Enter]. You'll need to enter your administrator password before continuing. The computer will display a prompt showing that the command line interface is ready for instructions. You'll be logged in to the WINNT directory of your choice.
Learn about the Recovery Console
The Recovery Console is a command line interface similar to DOS and the Windows 2000 command prompt. If you're unfamiliar with the Recovery Console, type Help and press [Enter] to see a list of available commands. For an explanation of these utilities, start Windows 2000 Help and enter Recovery Console Commands in the Index.
Copying Ntldr from the Windows 2000 CD is easy. First, change to the root directory by typing CD and pressing [Enter] at the command line. Next, place the Windows 2000 CD in the drive and type the following:
Copy D:\i386\Ntldr
Substitute your CD-ROM drive letter for D, if necessary. If the copy is successful, you'll see the message "1 File(s) Copied." You can now type exit to quit the Recovery Console. Your computer will reboot, and Windows should start.
If this doesn't solve your problem, other essential startup files could be corrupted. Use the Recovery Console to copy Ntdetect.com and Boot.ini from your Windows 2000 CD. Note: Boot.ini uses a certain naming convention to describe each computer's hard-drive geometry. It's a wise precaution to make a backup copy of Boot.ini on your hard drive or on a data CD in case you need it later. You can read more about manually configuring Boot.ini at Support.Microsoft.com.
VMware aids troubleshooting
Finally, to test recovery steps when faced with a deleted or corrupted Ntldr file, I use VMware to run a virtual installation of Windows 2000 within my normal Windows 2000 operating system. That way, I can remove Ntldr or change its contents and watch the results of different repair methods without risking damage to my OS.
Watch out for errors in Microsoft's instructions
Not surprisingly, I found that some of the Microsoft instructions for recovery were in error. For example, the Windows 2000 Startup And Shutdown Troubleshooter recommends using a manual repair with only Inspect Startup Environment selected. Actually, it was necessary to select Verify Windows 2000 System Files to fix a corrupted or missing Ntldr. In addition, error messages were slightly different than reported.
For a weekly round-up of the enterprise IT news, sign up for the
Enterpise newsletter.
Find out what's where in the new Tech Update with our
Guided Tour.
Tell us what you think in the
Enterprise Mailroom.
Full Talkback thread
1 comment
-
This article is very good e objective. Thanks Mich... Lincoln Almeida










