Maintenance and Update Tools
Windows 2000 provides tools that you can use to maintain and update your system. Some of the most useful of these tools are detailed in this section, as shown in Table 31.6.Table 31.6 Maintenance and Update Troubleshooting Tools
Tool | Overview | Location |
---|---|---|
Check Disk(Chkdsk.exe) | Scans for and repairs physical problems, such as bad blocks, as well as logical structure errors, such as lost clusters, cross-linked files, or directory errors, on volumes on the hard disk. | %SystemRoot%System32 |
Disk Defragmenter(Dfrg.msc) | Rearranges files, folders, programs, and unused space on the hard disk to optimize disk performance. | %SystemRoot%System32 |
AVBoot(Makedisk.bat) | Scans for and removes MBR and boot sector viruses from the computer's memory and disk. | VALUEADD3RDPARTYCA_ANTIV on the Windows 2000 operating system CD |
Windows Update(Wupdmgr.exe) | Serves as an online extension of Windows 2000. It provides a central location to find customized files and product enhancements, including Service Packs, system files, device drivers, and new Windows 2000 features. | %SystemRoot%System32 |
Chkdsk
Chkdsk is a command-line tool that scans and repairs volumes on the hard disk for physical problems, such as bad blocks, and logical structure errors, such as lost clusters, cross-linked files, or directory errors. Run Chkdsk from a command prompt rather than from Windows Explorer to see the resulting display.
Chkdsk Syntax
The command-line syntax for Chkdsk is as follows:
chkdsk [volume[[path]filename]]] [/f] [/v] [/r] [/x] [/i] [/c] |
Used without parameters, Chkdsk displays the status of the disk in the current volume.
Chkdsk Switches
Table 31.7 lists all Chkdsk command-line switches.Table 31.7 Chkdsk Switches
Switch | Effect |
---|---|
filename | FAT only. Specifies the file or set of files to check for fragmentation. Wildcard characters (* and ?) are allowed. |
path | FAT only. Specifies the location of a file or set of files within the folder structure of the volume. |
size | NTFS only. Changes the log file size to the specified number of kilobytes. Must be used with the /l switch. |
volume | FAT only. Specifies the drive letter (followed by a colon), mount point, or volume name. |
/c | NTFS only. Skips checking of cycles within the folder structure. |
/f | Fixes errors on the volume. The volume must be locked. If Chkdsk cannot lock the volume, it offers to check it the next time the computer starts. |
/i | NTFS only. Performs a less vigorous check of index entries. |
/l | NTFS only. Displays current size of the log file. |
/r | Locates bad sectors and recovers readable information (implies /f). If Chkdsk cannot lock the volume, it offers to check it the next time the computer starts. |
/v | On FAT. Displays the full path and name of every file on the volume.On NTFS. Displays cleanup messages, if any. |
/x | NTFS only. Forces the volume to dismount first, if necessary. All opened handles to the volume are then invalid (implies /f). |
/? | Displays this list of Chkdsk switches. |
NOTEUse Chkdsk occasionally on each volume to check for errors. You must be logged on as a member of the Administrators group.
FAT refers to volumes formatted with FAT12, FAT16, or FAT32.
Using the /i or /c switch skips certain checks of the NTFS volume and reduces the amount of time required to run Chkdsk.
Chkdsk Reports
Chkdsk creates and displays a status report for a volume, based on the file system used. Chkdsk also lists and corrects errors on the volume. The following are sample Chkdsk reports for volumes using each hard disk file system supported by Windows 2000. Each of these tests were run using the /f switch, although no errors were reported on any of the volumes.Following is an example Chkdsk report from an NTFS volume:
The type of the file system is NTFS. |
An example of a Chkdsk report from a FAT32 volume:
The type of the file system is FAT32. |
An example of a Chkdsk report from a FAT16 volume:
The type of the file system is FAT. |
NOTEIf errors exist on the volume, Chkdsk alerts you by using a message and, if the /f switch was used, corrects the errors.
A sample Chkdsk report from FAT12 is not shown because it is only supported on floppy disks and volumes less than 16 MB in size.
Chkdsk only runs on local floppy disks, hard disks, and removable, read/writable disks. It does not support CD-ROM and DVD-ROM disks.
Correcting Problems by Using Chkdsk
Chkdsk cannot correct found errors when there are open files on the volume because Chkdsk cannot lock the volume. In this case, Chkdsk offers to check the volume automatically the next time the computer is started. This is typical behavior for the boot volume. When the boot volume is checked, the computer is automatically restarted after the volume check is completed.Because some repairs, such as correcting lost clusters (also knows as allocation units) or cross-linked files, change a volume's file allocation table and can cause data loss, Chkdsk first prompts you with a confirmation message similar to the following:
10 lost allocation units found in 3 chains. |
If you press N, Windows 2000 fixes the errors on the volume but does not save the contents of the lost clusters. If you press Y, Windows 2000 attempts to identify the folder to which they belong. If the folder is identified, the lost cluster chains are saved there as files. If the folder cannot be identified or if the folder does not exist, it saves each chain of lost clusters in a folder called Found.xxx, where xxx is a sequential number starting with 000. If no folder Found.000 exists, one is created at the root. If one or more sequential folders called Found.xxx (starting at 000) exists, one using the next number in the sequence is created. After the storage folder has been identified or created, one or more files with a name in the format Filennnn.chk (the first saved file is named File0000.chk, the second is named File0001.chk, and so on in sequence) are saved. When Chkdsk finishes, you can examine the contents of these files with a text editor to see whether they contain any needed data (if the converted chains came from corrupted binary files, they are of no value). You can delete the CHK files after you have saved any useful data.
NOTEIf you do not use the /f switch, Chkdsk alerts you if it detects a file that needs to be fixed by indicating that it needs to be rerun with the /f switch to fix the errors. If you use the /f switch on an extremely large volume (for example, 70 GB) or a volume with a very large number of files (in the millions), Chkdsk can take a long time (perhaps days) to complete. The volume is not available during this time, since Chkdsk does not relinquish control until it is done. If the system volume is being checked during the startup process, the computer is not be available until the Chkdsk process is complete.Bad sectors reported by Chkdsk were marked when your volume was first prepared for operation. The fact that they are marked as bad means that the system prevents the disk from using them, so previously identified bad sectors pose no danger to your data.
Be careful to delete only files using the file name extension CHK from the Found.xxx folders. Other programs might create and use files with that extension.
Disk Defragmenter
Disk Defragmenter is a Windows-based tool that rearranges files, folders, programs, and unused space on your computer's hard disk. This is occasionally necessary because of the way files are stored on disk. When files are edited and outgrow their original space on the disk, the file is broken into fragments, with latter fragments stored in open spots elsewhere on disk. In addition, when files are deleted on FAT16 and FAT32 volumes, only the entries in the file allocation table itself are deleted. The formerly occupied space is marked as open and can be used by other files. When other files use the empty space, if it is not large enough to accommodate the remaining data of the file, the file is again broken up with the remainder stored in another open space on disk. This process occurs with every new and edited file that is stored to disk.While this process makes storage faster and more efficient when the file is saved, it takes much longer to read and write fragmented files than unfragmented files. Creating new files and folders also takes longer because the space available on the volume is scattered. Windows must then save new files and folders to various locations on the volume. When many files on disk become badly fragmented, performance notably suffers.
Running Disk Defragmenter
Disk Defragmenter remedies this problem by rewriting the files on disk back into contiguous segments. To start Disk Defragmenter, from the Start menu, point to Programs, Accessories, and System Tools, and then click Disk Defragmenter.You can analyze the volume to see how many fragmented files and folders there are and then decide whether or not to defragment the volume.The amount of time that the defragmentation process takes to run depends on several factors, including the size of the volume, the number of files on the volume, the amount of fragmentation, and the available local system resources. Disk Defragmenter defragments volumes formatted with FAT16, FAT32, and NTFS.
Disk Defragmenter Results
The Disk Defragmenter tool display is split into two main areas, as shown in Figure 31.1. The upper portion lists the volumes on the local computer. The lower portion shows how fragmented the volume is. The colors indicate the condition of the volume:
Red areas show fragmented files. Blue areas show contiguous (unfragmented) files. White areas show free space on the volume. Green areas show system files, which cannot be moved by Disk Defragmenter. These system files are not part of the Windows operating system but include files belonging to NTFS (when applicable) and the system paging file.
Figure 31.1 Disk Defragmenter
By comparing the Analysis Display band to the Defragmentation Display band, you can see the improvement in your volume after defragmenting. Always analyze volumes before defragmenting them. After the analysis is complete, a dialog box tells you if you need to defragment the volume. You can defragment local file system volumes only, and you can only run one Disk Defragmenter console at a time. In addition, you must be logged on as an administrator or a member of the Administrators group. If your computer is connected to a network, network policy settings might also prevent you from completing this procedure.
AVBoot
InoculateIT Antivirus AVBoot version 1.1 is a command-line tool that scans the computer's memory and all locally-installed disk drives for MBR and boot sector viruses. If a virus is found, AVBoot can remove the virus. AVBoot is located in the VALUEADD3RDPARTYCA_ANTIV folder of the Windows 2000 operating system CD. To create an AVBoot startup disk
Insert the Windows 2000 operating system CD into the CD-ROM drive.Insert an empty, high-density 3.5-inch floppy disk into the floppy disk drive.From the Start menu, click Run.Browse the CD-ROM drive in the Look in list box, and navigate to the VALUEADD3RDPARTYCA_ANTIV folder.Double-click Makedisk.bat, and then click OK.When the process is complete, remove the floppy disk, label it "AVBoot," and then store it in a safe location. Record the creation date in a log book.
Makedisk.bat is used to create a startup floppy disk that runs AVBoot.To run AVBoot, insert the AVBoot startup floppy disk and restart the computer. AVBoot automatically starts when the computer has completed the startup process from the floppy disk.
NOTEWhen the AVBoot menu appears, press 1. It displays a report showing the version number and the date of the installed virus-scanning engine and the data or antivirus signature files. The next line displays the results of a virus scan in memory. Below that, a Boot Sector Summary report is displayed, showing the results of the scan on the installed floppy disk drives and all hard disks. If a second floppy disk drive or hard disk is not installed, the report states "Not Installed". Press any key to return to the AVBoot menu. Following is an example:
On many computers, an option in the CMOS setup program allows the user to set the sequence of installed disks that the system searches for the startup files. If drive C is set to be searched before drive A, the AVBoot disk is not loaded.
InoculateIT AntiVirus Avboot V1.1 |
IMPORTANT
Whether you use a third-party antivirus program or AVBoot, be sure to regularly update the virus signature files. After you install an antivirus program, immediately update the signature files, usually through an Internet connection. Check with the software documentation for specific instructions. AVBoot includes update instructions in the installation folder and on the AVBoot floppy disk. When you update the virus signature files, record the date in your log book so you can determine how fresh the files are on the AVBoot disk.
It is extremely important that you regularly update your antivirus program. In most cases, antivirus programs are unable to reliably detect and clean viruses of which they are unaware resulting in false negative reports. Most commercial antivirus software manufacturers offer monthly updates. Use the latest download to ensure that your system is protected with the latest virus defenses.
Windows Update
Windows Update is an online extension of Windows 2000. It provides a central location to find customized files and product enhancements, such as Service Packs, system files, device drivers, and new Windows 2000 features, that have been selected to work with your computer's configuration.
Using Windows Update
Windows 2000 creates a Start menu shortcut to the Windows Update Web page. Windows Update uses Active Setup and Microsoft® ActiveX® controls that are downloaded and installed on your system when you connect to the Windows Update Web page.
NOTEThe controls scan your system, comparing system files and device drivers on your computer with a database of the files on the Windows Update server. Windows Update then generates a list of items that can be added and updated, and offers to install any files that are found to be newer than your current set.
Windows Update requires browser software that supports ActiveX controls.
NOTE
All updates can be uninstalled using Update Wizard Uninstall in System Information on the Tools menu. Existing files and drivers are automatically backed up before new ones are installed by Windows Update.
Restricting Access to Windows Update
To closely control the programs that users download, you can prohibit user access the Windows Update Web page. By using Group Policy, you can remove the Windows Update icon both from the Start menu and from the Tools menu in Microsoft® Internet Explorer. Enabling the policy prevents users from accessing the Windows Update Web page from a computer running Windows 2000 Professional.To disable access to Windows Update by using Group Policy
Start the Group Policy snap-in.
NOTE
For more information about adding the Group Policy snap-in into MMC, see "Recovery Console" earlier in this chapter.
Expand Local Computer Policy.Expand User Configuration and Administrative Templates, and then click Start Menu & Taskbar.Double-click Disable and remove links to Windows Update.In the Disable and remove links to Windows Update Properties dialog box, on the Policy tab, select Enabled, and then click OK.
IMPORTANT
If you are using Windows 2000 Professional-based computers on a Windows 2000 Server-based network, use Group Policy from the Windows 2000 Server to control this functionality.