Printer Friendly Version      Send     
Click to Rate and Give Feedback
TechNet
TechNet Library
TechNet Archive
Windows 98
Resource Kit
 Chapter 10 - Disks and File Systems
Chapter 10 - Disks and File Systems
Archived content. No warranty is made as to technical accuracy. Content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.

This chapter is intended primarily for system administrators, network administrators, computer technicians, and anyone else interested in using utilities to partition and format hard disks, and using utilities, such as DriveSpace 3, Disk Defragmenter, and ScanDisk, to manage disks and data. It also describes the file allocation table (FAT) used by Microsoft Windows 98 and discusses how to manage long file names.

See Also

  • For more information about editing system policies, see Chapter 8, "System Policies." 

  • For more information about hard drives and other hardware devices, see Chapter 30, "Hardware Management." 

Overview of Disks and File Systems

The 32-bit, protected-mode file system in Windows 98 allows optimal access to hard disks, CD-ROM drives, and network resources. The file system support means faster, better performance for all file I/O operations than was previously available.

You can use long file names and directory names in Windows 98 and in any applications that support long file names. The eight-character limit on file names that was imposed by the file system under MS-DOS no longer holds.

The file system in Windows 98 permits exclusive access to a disk device for file system utilities. For example, ScanDisk, a file system utility, requires exclusive access to the file system to ensure data integrity in a multitasking environment. Otherwise, if a file on the disk were to be saved while the utility was writing information to the disk at the same time, data corruption could occur.

The file system also detects when Windows 98 shuts down improperly. If Windows 98 is shut down without going through the standard shutdown sequence, real mode Scandisk will be executed at the next startup. The purpose of running Scandisk is to correct potential errors in the file allocation table (FAT) before continuing the boot process. In the event that a Disk read/write error is encountered during normal Windows 98 operation, a flag will also be set to run real mode Scandisk with Surface Scan.

Exclusive disk access means you can now run disk management and optimization utilities without quitting Windows. You can even complete tasks, such as disk defragmentation, without stopping work in other applications. The exclusive access support is used by the disk utilities provided with Windows 98 and can be used in Windows-based disk management utilities from any vendors that take advantage of the related application programming interface (API) in their utilities.

File Allocation Table

File allocation table (FAT) refers to a disk format, which is a way of organizing the storage space on a hard disk. The table organizes information about the files on the hard disk, representing each one as a chain of numbers that identifies where each part of a file is located. The FAT itself is similar to a table of contents in a book—the operating system uses it to look up a file and find which clusters that file is written to on the hard disk.

FAT is probably the most widely recognized disk format, being read by most operating systems. Microsoft originally devised FAT to manage files on floppy disks, and adapted it as a standard for file and disk management in MS-DOS. A 12-bit FAT was first used for managing floppy disks and logical drives smaller than 16 MB. MS-DOS version 3.0 introduced the 16-bit FAT for larger drives.

FAT32

FAT32 goes beyond the capabilities of FAT16. The most prominent feature is that it supports drives of up to 2 terabytes in size. In addition, FAT32 decreases the cluster size on large drives, thus reducing the amount of unused space. For example, with FAT16, a 2 GB drive has a 32 KB cluster size. The same drive under FAT32 has 4 KB clusters.

To maintain the greatest possible compatibility with existing programs, networks, and device drivers, FAT32 was implemented with as little change as possible to existing architecture, internal data structures APIs, and on-disk format for Windows 98.

However, because 4 bytes are now required to store cluster values, many internal and on-disk data structures and published APIs have been revised or expanded. In some cases, existing APIs have been prevented from working on FAT32 drives to prevent legacy disk utilities that use them from damaging the FAT32 drives. Most programs will be unaffected by these changes. Existing tools and drivers should continue to work on FAT32 drives. However, MS-DOS block device drivers (for example, Aspidisk.sys) and disk tools must be revised to support FAT32 drives.

All of Microsoft's bundled disk tools (Format, FDISK, Defrag, and MS-DOS-based and Windows-based ScanDisk) have been revised to work with FAT32. In addition, Microsoft is working with leading device driver and disk tool vendors to support them in revising their products to support FAT32.

Note A FAT32 volume cannot be compressed using Microsoft DriveSpace 3.

FAT16 vs. FAT32

FAT16 is still available because of its widespread compatibility with all other non-Microsoft operating systems. The major benefits of FAT32 are that it is more efficient than a 16-bit FAT on larger disks (sometimes by as much as 20–30 percent), and that it can support disk drives larger than 2 GB without having to use multiple partitions.

Note In real-mode MS-DOS or when running Windows 98 in safe mode, FAT32 is considerably slower than FAT16. If you need to run applications in MS-DOS mode, loading Smartdrv.exe in Autoexec.bat or your MS-DOS PIF file will be beneficial.

Some older applications that were written to FAT16 specifications may be unable to display free or total disk space over 2 GB correctly. Windows 98 provides new MS-DOS and Win32 APIs that applications can use to determine free or total disk space over 2 GB.

Table 10.1 shows a comparison of FAT16 and FAT32.

Table 10 . 1 FAT16 and FAT32 comparison 

FAT16

FAT32

Most operating systems (MS-DOS, Windows 98, Windows NT, OS/2, and UNIX) are designed to implement and use it.

Currently, FAT32 can be used only in Windows 98 and Windows 95 OSR2.

It is efficient, both in speed and storage, on logical drives smaller than 256 MB.

Drives smaller that 512 MB are not supported by FAT32.

Disk compression, such as Drvspace, is supported.

Disk compression is not supported with FAT32.

FAT16 is limited in size to 65,525 clusters with each cluster being fixed in a size relative to the logical drive. If both the quantity of clusters and their maximum size (32 KB) is reached, the largest drive is limited to 2 GB.

FAT32 allows for (x) clusters, therefore, the largest drive can be up to 2 terabytes, based on the 32 KB cluster size limitation.

Storing files in a FAT16 system can be inefficient in larger drives as the size of the cluster increases. The space allocated for storing a file is based on the size of the Cluster Allocation Granularity, not the file size. A 10 KB file stored in a 32 KB cluster wastes 22 KB of disk space.

FAT32 cluster sizes are 4 KB (drives less than 800 MB).

Cluster Sizes of FAT16 and FAT32

The largest possible file for a FAT32 drive is 4 GB minus 2 bytes. Win32-based applications can open files this large without special handling. However, non-Win32-based applications must use Int 21h Function 716Ch (FAT32) with the EXTENDED_SIZE (1000h) open flag.

The FAT32 file system includes 4 bytes per cluster within the file allocation table. This differs from the FAT16 file system, which contains 2 bytes per cluster, and the FAT12 file system, which contains 1.5 bytes per cluster within the file allocation table.

Note that the high 4 bits of the 32-bit values in the file allocation table for FAT32 are reserved and are not part of the cluster number. Applications that directly read a FAT32 file allocation table must mask off these bits and preserve them when writing new values.

Table 10.2 provides a comparison of FAT16 and FAT32 cluster sizes according to drive size.

Table 10.2 Cluster sizes of FAT16 and FAT32 

Drive size

FAT16 cluster size

FAT32 cluster size

256 MB – 511 MB

8 KB

Not supported

512 MB – 1023 MB

16 KB

4 KB

1024 MB – 2 GB

32 KB

4 KB

2 GB – 8 GB

Not supported

4 KB

8 GB – 16 GB

Not supported

8 KB

16 GB – 32 GB

Not supported

16 KB

>32 GB

Not supported

32 KB

Understanding FAT32

FAT32 provides the following enhancements over previous implementations of the FAT file system:

  • Supports drives up to 2 terabytes in size. 

  • Uses space more efficiently. FAT32 uses smaller clusters (4 KB clusters for drives up to 8 GB in size), resulting in 10 to 15% more efficient use of disk space relative to large FAT drives, and reduces the resources necessary for the computer to operate.

  • More robust. FAT32 has the ability to relocate the root directory and use the backup copy of the FAT instead of the default copy. In addition, the boot record on FAT32 drives has been expanded to include a backup of critical data structures. This means that FAT32 drives are less susceptible to a single point of failure than existing FAT volumes. 

  • Programs load up to 50% faster. FAT32's smaller cluster size enables the new and improved Disk Defragmenter to optimally locate the portions of an application and its supporting files needed at the time it is loaded. 

All of Microsoft's bundled disk utilities (Format, FDISK, Defrag, MS-DOS and Windows ScanDisk, and DriveSpace) have been revised to work with FAT32.

Important When the Drive Converter Wizard is done, the Disk Defragmenter utility runs. It is important that you let Disk Defragmenter run to completion after converting to FAT32. Not defragmenting the disk after converting to FAT32 will result in an even less efficient and slower computer than before the conversion.

You cannot dual boot Windows 98 and Windows NT 4.0 if you use FAT32. Windows NT 4.0 cannot access or boot from a FAT32 drive.

BIOS and Hibernate Issues for FAT32 File System

FAT32 allocates disk space much more efficiently than previous versions of the FAT file system. This results in tens and even hundreds of megabytes more free disk space on larger hard drives. When used with the new and improved Disk Defragmenter tool in Windows 98, FAT32 can significantly improve application load time.

You can easily convert a hard drive to FAT32 using the Converter Wizard, which is started by clicking Start, and pointing to Programs, Accessories, System Tools, and then clicking Drive Converter (FAT32).

This conversion may impact the hibernate, or suspend-to-disk, features shipped with many systems. To support Windows 98, systems that implement hibernate through the APM BIOS or through the Advanced Configuration and Power Interface (ACPI) S4/BIOS state must support FAT32.

Important Various BIOS manufacturers include virus checkers, which look for changes to the Master Boot Record (MBR). In addition, older anti-virus utilities that are installed as real-mode drivers or TSRs may detect that the MBR has changed during an MS-DOS boot. Since a conversion to FAT32 will change the MBR, some virus checkers may erroneously detect the changes to the MBR as a software virus on your system. If a virus-checking utility detects an MBR change and offers to "fix" it, decline this option.

The easiest solution is to uninstall virus-checking software or disable BIOS level protection before converting to FAT32. After conversion, reinstall the software or re-enable the BIOS protection level.

Documentation on the disk structure of the FAT32 file system is available from the Microsoft Web site at http://www.microsoft.com/technet/images/prodtechnol/win98/reskit/part2/images/wrk0o18.gif and later in this chapter.

Checks Made by FAT32 Drive Converter Wizard in Protected Mode

The FAT32 Drive Converter Wizard performs a series of checks in protected mode during conversion. The checks are listed below:

  1. The wizard checks for a list of hibernate files for APM and ACPI computers. If a hibernate file is found, the Drive Converter Wizard checks for the existence of a PC Card (PCMCIA) controller to see if the computer is a laptop. 

  2. If a hibernate file exists, the Drive Converter Wizard checks for ACPI and APM. If neither exist on the computer, the wizard converts FAT16 to FAT32. 

    – Or – 

    If the hibernate partition size is greater than or equal to the maximum memory size, it is safe to convert. 

    The wizard checks for a list of known hibernate files:

    • Amizvsus.pmf 

    • Save2dsk.bin 

    • PM_hiber.bin 

    • Hibrn8.dat 

    • Saveto.dsk 

    • Toshiber.dat 

    If any of these hibernate files exist on the computer, the wizard displays a message asking if it is okay to continue with the conversion. If you choose to continue the conversion, and you are working from a desktop computer, the hibernate file is deleted. If you are working from a laptop, the wizard recommends not converting to FAT32. 

    The series of checks is summarized in this table:

    Check

    Converter Wizard Action

    No APM/ACPI 

    Converts FAT16 to FAT32. 

    APM/ACPI and hibernate file 

    Warns against conversion. 

    APM/ACPI and PC Card (PCMCIA) controller and no hibernate file 

    Strongly warns against conversion. 

    APM/ACPI and no hibernate file and no PC Card controller 

    Converts FAT16 to FAT32. 

After the series of checks is made during the conversion, the wizard looks for applications that are incompatible with FAT32, and lists them. After the conversion is complete and Disk Defragmenter has run, use Add/Remove Programs from the Control Panel to uninstall the incompatible application (if found).

Check Made by FAT32 Drive Converter Wizard in Real Mode

The FAT32 Drive Converter Wizard also performs a check in real-mode conversion. The converter checks for the existence of hibernate files. Running the converter with the /hib switch (cvt /hib) automatically removes any hibernate files that are found.

Real-Mode Command Line Parameters

This section describes command line parameters available for the real-mode version of the Disk Converter (FAT32) utility. Only the first two parameters are required.

D: A drive letter followed by a colon specifies the drive letter of the volume to be converted to FAT32 format.

/CVT32 This parameter prevents a user from accidentally running the converter. Without this parameter, the utility will not run.

[ /WIN ] In normal operation, the converter is intended to be run under MS-DOS and not in an MS-DOS VM in Windows 98. Without this parameter, the converter will not run in an MS-DOS VM in Windows 98. Also, this parameter works only if the volume specified has no files open on it, meaning that a level-0 volume lock can be taken on the volume, preventing all possible file accesses by other system components and applications during the conversion. If a level-0 volume lock cannot be obtained on the volume to be converted, the conversion is cancelled. If a level-0 volume lock can be obtained on the volume to be converted and the /WIN parameter is present, the conversion proceeds.

[ 1 | 2 | 4 | 8 | 16 | 32] This parameter overrides the converter's internal cluster size selection logic. The default logic for cluster size selection is included below. Overriding the cluster size is not recommended. The cluster size selection logic that the converter uses provides the optimal balance between storage allocation efficiency and file system performance. Overriding the default will compromise either storage allocation efficiency, performance, or both. The cluster size overrides specify that the volume being converted should have a cluster size of 512 bytes or 1 KB or 2 KB or 4 KB or 8 KB or 16 KB. When a user overrides the optimal cluster size, the converter will warn you about the sub-optimal selection unless queries have been suppressed via the /NOP parameter.

if (((FAT16_clusters * sectors_per_cluster)/2) < 260*1024) {
optimal cluster size = 512 bytes
}
else {
optimal cluster size = 4k bytes
}

[ /NOP ] Suppress all warning dialogs, as well as user queries associated with the warning dialogs that the converter displays when it detects a problem. A warning dialog and associated user query informs the user of the condition and gives the opportunity to cancel the conversion.

[ /NOSCAN ] This parameter causes the converter to skip running MS-DOS SCANDISK prior to converting the volume.

Important Skipping ScanDisk before FAT32 conversion is not recommended.

[ /MIN ] This parameter overrides the minimum volume size logic that the converter uses to determine whether converting a volume to FAT32 is feasible. The conversion will take place even if the volume is too small to economically convert to FAT32. The logic the converter uses to determine if a volume is below the minimum size follows.

if (((FAT16_clusters * sectors_per_cluster)/2) < 512 * 1024) (
do not convert volume)

[ /NT5 ] If a FAT32-aware version of Windows NT is already installed on this system, this parameter causes the converter to convert the volume to FAT32 and provide for dual-boot capability between Windows NT and Windows 98. If there is no FAT32-aware version of Windows NT installed on the volume being converted, this switch is ignored.

[ /HIB ] The converter checks for any file in the following list of hibernate files present in the root directory of the volume to be converted to FAT32. If it detects any one of the files and the /HIB parameter is not present, the conversion is cancelled. If any of one of the files is present and the /HIB parameter is present, the file is deleted and the conversion proceeds. A warning dialog is displayed and the user is queried about whether to cancel the conversion unless warnings have been suppressed via the /NOP parameter.

  • Amizvsus.pmf 

  • Save2dsk.bin 

  • PM_hiber.bin 

  • Hibrn8.dat 

  • Saveto.dsk 

  • Toshiber.dat 

[ /ERRLOG filename ] Write the status code of the conversion to a file named "Filename." "Filename" may exist on the same volume being converted. The codes written to this file may be any of the following codes and their associated values.

Error

Value

CVT_ERR_NONE

0

CVT_ERR_USAGE

0x7000

CVT_ERR_INVALIDCMDLINEPARM

0x7001

CVT_ERR_INVALIDCLUSTSIZE

0x7002

CVT_ERR_RUN_CVT32

0x7003

CVT_ERR_INCOMPAT_BIOS

0x7004

CVT_ERR_BADDOSVER

0x7005

CVT_ERR_BADWINVER

0x7006

CVT_ERR_DOSMODEONLY

0x7007

CVT_ERR_NETWORK_DRIVE

0x7008

CVT_ERR_CDROM_DRIVE

0x7009

CVT_ERR_FLOPPY_DRIVE

0x700a

CVT_ERR_INVALIDDRIVE

0x700b

CVT_ERR_DRVSPACE

0x700c

CVT_ERR_DISKCOMPRESSION

0x700d

CVT_ERR_OUTOFMEMORY

0x700e

CVT_ERR_FAT32NOTSUPPORTED

0x700f

CVT_ERR_INT13NOTSUPPORTED

0x7010

CVT_ERR_GETDPBFAILED

0x7011

CVT_ERR_ALREADYFAT32

0x7012

CVT_ERR_DRIVETOOSMALL

0x7013

CVT_ERR_RUNSCANDISK

0x7014

CVT_ERR_BADMARK

0x7015

CVT_ERR_CANTUPDATEPART

0x7016

CVT_ERR_CANTLOCK

0x7017

CVT_ERR_DISKERROR

0x7018

CVT_ERR_UNKNOWNPARTTYPE

0x7019

CVT_ERR_DISKPROB_OR_DISKFULL

0x701a

CVT_ERR_USERABORTED

0x701b

CVT_ERR_SMALLCLUSTERS

0x701c

CVT_ERR_ANTIVIRUS

0x701d

CVT_ERR_ANTIVIRUSPOPUP

0x701e

CVT_ERR_EXTATTRIB

0x701f

CVT_ERR_UNINSTALL

0x7020

CVT_ERR_LOGFILE

0x7021

CVT_ERR_BOOTSECTFILE

0x7022

CVT_ERR_WIN9XNTBOOTCONFLICT

0x7023

CVT_ERR_HIB_FILE_EXIST

0x7024

CVT_ERR_MBR_HOOKER_EXIST

0x7025

CVT_ERR_PBRMBRBACKUPFILE

0x7026

[ /HELP ] Use of this switch or the /? switch displays the following Help text. Does not perform a conversion.

Converts 16-bit FAT file system to 32-bit FAT file system.
Usage: CVT D: where D is the drive to convert.

Testing Hibernate with FAT32

Before converting a large number of computers in your organization, test hibernate with FAT32 using the following steps:

  1. Start Windows 98.

  2. Click Start, and point to Programs, Accessories, and System Tools, and click Drive Converter (FAT32). Follow the steps presented by the wizard. 

  3. After conversion is complete, point to Start and click Shutdown, using Standby to hibernate the computer. 

  4. Verify that the system correctly resumes from hibernate. 

  5. Run ScanDisk to verify that the file system is still intact. 

Note This test should be performed on every brand of computer in your organization. Also, special consideration should be made on systems that may be similar, but purchased during different time frames.

The following scenarios should be tested:

  • Start the computer in its shipping configuration with FAT16, convert to FAT32, and test as indicated above. 

  • On a computer that is already running FAT32 and hibernate, add the maximum amount of memory, and verify hibernate. 

  • If your BIOS uses a hibernate partition, boot the computer with the partition removed or reformatted (simulating users who upgrade their hard disk), and verify that the system handles the lack of hibernate partition and informs the user of what to do. If Windows shows a Start/Shutdown/Standby option, test it and make sure that the computer suspends to RAM instead of to disk. 

System Commander and FAT32

System Commander replaces the Master Boot Record (MBR) in Windows 98. The Drive Converter (FAT32) checks for System Commander in both real mode and protected mode. If System Commander is found on the computer, the Converter Wizard does not convert FAT16 to FAT32.

To work around this problem, you must uninstall System Commander before converting to FAT32. If your version of System Commander supports FAT32, you can reinstall it after the conversion. You can also run the converter with the /mbr switch (cvt /mbr), which will stop the converter from replacing the Master Boot Record.

Overview of Disk Utilities

This section provides a brief description of disk utilities provided with Windows 98. All of the disk utilities, with the exception of DriveSpace 3, have been revised to include FAT32 support. The utilities are described in more detail later in this chapter.

Note In general, older disk utilities that perform low-level disk functions, such as defragmenters, disk repair tools, and disk compression utilities, do not function properly on FAT32 drives. In most cases, vendors have updated their utilities to be FAT32-aware. The older versions of these utilities should continue to work properly on Windows 98 FAT16 drives.

Drive Converter (FAT32)

This utility converts a hard drive from FAT16 to FAT32. After running the converter, Disk Defragmenter will run on that drive during your next boot. It is important to run Disk Defragmenter because system performance will be slow until you do. The entire process, including defragmentation, could take several hours.

Caution Windows 98 does not include a utility for converting a drive back to FAT16 once you have converted it to FAT32.

Fdisk and Format

These utilities, which you can use to partition and format disks, behave exactly as did their counterparts in MS-DOS versions 6.x and Windows 95. You can use a graphical version of Format in Windows Explorer.

Disk Defragmenter

The Disk Defragmenter (also called a disk optimizer) is used to defragment information on a disk. Windows 98 monitors applications that you launch and creates a log file for each application in the \Windows\Applog directory. Disk Defragmenter uses the log files to arrange program files in the order they are accessed when the program starts, causing the program to start more quickly.

DriveSpace 3

The built-in support for DriveSpace 3 disk compression is completely compatible with DoubleSpace® and DriveSpace 3 disk compression provided with MS-DOS 6.x and Windows 95 Plus Pack. Compression is performed by using a 32-bit virtual device driver that delivers improved performance over previously available real-mode compression drivers and frees conventional memory for use by MS-DOS-based applications when executed within Windows 98.

Note The DriveSpace 3 program identifies FAT32 partitions but does not compress them.

ScanDisk

This graphical disk analysis and repair tool helps users check the integrity of disks and remedy problems it detects. Users can scan files and folders, or the disk surface for errors.

Disk Cleanup

Disk Cleanup offers users a list of ways to free disk space, including emptying the Recycle bin, removing old temporary files, and emptying the Internet cache. This disk space management utility is a wizard to help customers free up hard-disk space. The intent is to perform a series of typical disk space recovery tasks in a step-by-step fashion, in order to help novice users recover some disk space. The wizard is not intended to be a power-user tool and does not allow users the opportunity to delete or move system components, nor other files that could be dangerous to remove. The overriding criteria are safety and usability.

The following are the entry points for Disk Cleanup:

  • Low Disk Space warning dialog box. 

  • Drive property page Tools tab. 

  • Published interface that third-party applications can call to provide entry to the wizard. 

  • The System Tools option in the Accessories program group on the Start menu. 

  • Online Help (this wizard replaces the Disk Space Troubleshooter in Help). 

WinAlign

WinAlign is a tool designed to optimize the performance of executable code (binaries) on the Windows 98 platform. WinAlign aligns binary sections along 4 KB boundaries, aligning the executable sections with the memory pages. This allows the MapCache feature to map directly to sections in cache, resulting in a significant increase in performance through more available memory.

For more information about WinAlign, see the Windows 98 Resource Kit Tools Help.

Issues with Disks and File Systems

When installing Windows 98, be sure to create a new Windows 98 Startup Disk. Because of changes in the real mode and protected mode kernels to support FAT32, versions of Windows 95 and Windows 98 are not compatible with each other when booting to a floppy disk. A new Startup Disk is highly recommended.

Note You can also create a Startup Disk through Control Panel, Add/Remove Programs, Startup Disk.

To ensure disk integrity, have Task Scheduler run ScanDisk regularly. You can set this up with the Maintenance Wizard. Also, run Disk Defragmenter at regular intervals to optimize disk I/O performance.

For more information about Maintenance Wizard and Task Scheduler, see Chapter 27, "General Troubleshooting," and Chapter 23, "System and Remote Administration Tools."

You cannot dual boot Windows 98 and Windows NT 4.0 if you use FAT32. Windows NT 4.0 cannot access or boot from a FAT32 drive.

Be sure to use disk and file management utilities designed specifically for Windows 98. The disk and file management utilities for Windows 98 work with both FAT32 and FAT16 file systems. You also avoid losing long file names and data.

In some cases, the LFNBK utility lets you remove and later restore long file names on a disk. This makes it possible to run a utility not compatible with long file names.

For more information, see "Using the LFNBK Utility for Temporary Compatibility" later in this chapter.

Caution Stacker 4.0 from STAC Electronics and similar disk optimization utilities are not compatible with long file names. If you use such software under Windows 98, the long file names already on the computer will be destroyed, and other critical errors could occur.

Contact the software manufacturer for information about Windows 98 – compatible upgrades for your disk utilities.

Windows 98 automatically provides long file name support. However, Windows 98 file systems and OS/2 High Performance File System (HPFS) each have slightly different ways of defining 8.3 file name aliases for long file names. If you are using a mixed network environment, be sure to understand the differences (as described in this chapter). Then to help minimize any naming conflicts, define and publish a file-naming policy for users who share files.

Disk Management

Windows 98 provides utilities to partition and format a hard disk. Windows 98 also includes several utilities for managing disks, protecting data, and ensuring good disk performance. To keep your computer in good working order, use these programs on a regular basis. Table 10.3 outlines some tasks that are necessary to manage your computer.

Table 10.3 Disk management tasks 

To ensure that

Do this

Files are not lost if the hard disk fails

Run Microsoft Backup software. Back up your files at least once a week. See Chapter 27, "General Troubleshooting."

The computer can access files quickly and efficiently

Defragment the hard disk. See "Defragmenting Disks" later in this chapter.

Lost clusters do not take up space on a disk, or the hard disk is not damaged

Run ScanDisk. See "Using ScanDisk" later in this chapter.

System performs optimally

Run Maintenance Wizard. See Chapter 23, "System and Remote Administration Tools."

Space is available on the hard disk

Use Disk Cleanup and disk compression. See "Using Disk Cleanup" and "Using Disk Compression" later in this chapter.

A sample routine for managing a computer's hard disks might include the following tasks:

  • Automatically running ScanDisk regularly to check the integrity of the hard disk. 

  • Occasionally using the Disk Defragmenter to optimize the hard disk. 

  • Use Disk Cleanup to remove unnecessary temporary files and to empty the Recycle bin and the Internet cache. 

No matter what your computer management plan, carry it out at regular intervals using Task Scheduler. Task Scheduler is easy and automatic and performs tasks when you are not around or not using the computer.

Note For best results, do not run other programs while running either Disk Defragmenter or ScanDisk. Although you can use the computer for other tasks while running either of these utilities, each time you write to the disk, the utility automatically reinitiates itself to work with the current view of the disk.

Using Fdisk to Partition Hard Disks

This section describes how to use the Fdisk utility to configure a hard disk. For example, if you want to combine several partitions into one large partition, you must use Fdisk.

Fdisk is an extremely powerful program. If you delete a disk partition by using Fdisk, all the data in that partition will be permanently destroyed.

Caution Do not repartition the hard disk using Fdisk if the hard drive was partitioned using a third party program, such as those created by Disk Manager, EZ Drive, Storage Dimensions SpeedStor, Priam, or Everex partitioning programs. These programs provide drive translation between the hard disk drive and the BIOS, and are typically used on systems in which the BIOS does not support large drives. If the drive has been partitioned using one of these utilities, use that program to repartition the drive (as opposed to using Fdisk).

The above programs are not a complete list of utilities that provide disk partitioning. Other programs sold with various hard drives provide similar functionality, but have various names, depending on the manufacturer. Current partitioning software typically loads right after BIOS POST, but prior to the operating system. When these programs load, they usually display a banner page or text informing the customer to press a key sequence to boot to the floppy drive (generally the CTRL or SPACEBAR). Older versions of partitioning software load from a device=<driver> line in Config.sys. The following are examples of this type of driver: Dmdrvr.bin (Older Disk Manager), Sstor.sys (SpeedStor), Hardrive.sys (Priam), and Evdisk.sys (Everex).

If you are unsure which software is being used, consult your documentation, the computer manufacturer, or the hard disk drive manufacturer.

To configure a hard disk
  1. Create a Startup Disk using the Add/Remove Programs option in Control Panel. 

  2. Back up the files on the hard disk. 

    Note Step 2 is only necessary if there are files on the disk that you need or want to save. 

  3. Partition the hard disk using Fdisk. 

  4. Format the hard disk. 

  5. Restore the backed-up files. 

Partitioning Drives

If you want to partition a hard disk into one drive, you must first use Fdisk to delete all existing partitions and logical drives, and then create a new primary partition and make it active. You can also partition a hard disk so that it has more than one logical drive.

Fdisk is an MS-DOS-based application that can be run from an MS-DOS command line or from within Windows 98 if partitioning an additional hard drive. The partitions that Fdisk creates are called MS-DOS partitions. The Startup Disk contains a copy of Fdisk, which you can use if a hard disk becomes corrupt or unreadable.

To start Fdisk
  1. If you are starting Fdisk from a Startup Disk, put the disk in drive a: and press CTRL+ALT+DEL to restart the computer. At the command prompt on the a: drive, type fdisk

    – Or – 

    At the command prompt, type fdisk

  2. If you have a hard disk smaller than 512 MB, the Fdisk Options screen appears. 

    You can choose to do the following:

    • Create a partition or logical drive. 

    • Set the active partition. 

    • Delete a partition or logical drive. 

    • Display partition information. 

    • If the computer has two or more hard disks, Fdisk displays a fifth option named Change Current Fixed Disk Drive, with which you can switch to another disk drive. 

    – Or – 

    If you have a hard disk larger than 512 MB, the following screen appears. 

     

    Important If you enable large disk support, any drives created will be FAT32. As such, you will not be able to access the newly created drive if booting from a boot disk created by a previous version of Windows 95, Windows 95A, or MS-DOS. Windows 95B (OSR2) does support FAT32, however, it is recommended that you use your Windows 98 Emergency Boot Disk when booting from a floppy. In addition, legacy third-party disk utilities may not function on FAT32, so it is highly recommended you contact your software vendor to ensure FAT32 compatibility. Most third-party manufacturers already have FAT32 versions of disk utilities available. Utilities included with Windows 98 are compatible with FAT32. 

    Fdisk identified that you have a drive larger than 512 MB. It asks if you wish to enable large disk support, so that your system can use FAT32 as your file system. You can choose one of the following options:

    • Answering "Y" means you will be using a 32-bit FAT. Fdisk can make the entire disk available as one partition (up to 2,047 GB). 

    • Answering "N" means you will be using a 16-bit FAT. Fdisk will only allow up to 2 GB for a partition even if the disk is larger. 

      Windows 98 introduces many new performance enhancements, such as Application load acceleration, MapCaching, and idle time paging. Although these are features of the Windows 98 operating system, additional benefits are gained when running on FAT32 volumes. 

Each Fdisk screen displays a Current Fixed Disk Drive line, followed by a number. If the computer has only one hard disk drive, this number is always 1. If the computer has more than one hard disk drive, the number shows the disk Fdisk is currently working on. The first hard disk drive on the computer is 1, the second is 2, and so on. The Current Fixed Disk Drive line refers only to physical disk drives.

Note If you installed a disk-compression program from Microsoft or another vendor, Fdisk displays the uncompressed, not the compressed, size of the drives. Also, Fdisk may not display information about all the drives used by a disk-compression program from another vendor.

To configure a hard disk using Fdisk
  1. Delete all MS-DOS partitions in the following order: logical drives, the extended MS-DOS partition, and then the primary MS-DOS partition. 

  2. Create a new primary MS-DOS partition. 

  3. (Optional) Create an extended partition and logical drives. 

Caution If you use Fdisk to repartition a hard disk, all the files on the original partitions will be deleted. Be sure to back up all data files on the hard drive before using Fdisk.

Deleting Partitions and Logical Drives

You can use Fdisk to delete partitions before creating a new primary partition. You must delete partitions in the following order:

  1. Any non-MS-DOS partitions. 

  2. Any logical drives in the extended MS-DOS partition. 

  3. Any extended MS-DOS partition. 

  4. The existing primary MS-DOS partition. 

Important Back up your files on all partitions of the fixed disk prior to deletion. If the computer has a non-MS-DOS partition on a hard disk, you may have to boot to the operating system that created the partition in order to back up the data on the logical drive.

For more information, see the documentation that came with the non-MS-DOS operating system, or the disk-partitioning program from another vendor.

To delete a partition or logical drive
  1. In the Fdisk Options screen, press 3, and then press ENTER. The Delete DOS Partition Or Logical DOS Drive screen appears. 

  2. Press the number for the kind of partition you want to delete, and then press ENTER.

  3. Follow the directions on the screen, and repeat the steps for deleting any additional logical drives or partitions. 

If Fdisk cannot delete a non-MS-DOS partition, quit Fdisk and delete the non-MS-DOS partition by using the software used to create it.

Creating a Primary MS-DOS Partition

On a new disk, or after you have deleted a primary MS-DOS partition, you can create a new primary MS-DOS partition.

To create a primary MS-DOS partition
  1. In the Fdisk Options screen, press 1, and then press ENTER. The Create DOS Partition Or Logical DOS Drive screen appears.

  2. Press 1, and then press ENTER. The Create Primary DOS Partition screen appears. 

  3. If you want the partition to be the maximum size, press ENTER. Then insert a Startup Disk in drive a:, and press any key. 

    – Or – 

    If you do not want the partition to be the maximum size, press n, and then press ENTER. Another Create Primary DOS Partition screen appears. 

  4. To specify the partition size you want, follow the instructions on-screen, and then press ENTER.

    You can specify the partition size as a percentage of disk space or in megabytes of disk space. If you specify a percentage of disk space, include a percent sign (%) after the number.

  5. If you create the Primary partition to use the entire hard drive, press ESC twice to exit FDISK, then reboot the computer to the floppy disk. 

    If you chose not to use the entire drive for the Primary partition, you need to create the Extended DOS partition (unless you plan to use the remaining disk space for other reasons, such as a different operating system). To do this, select Option 1 from the main FDISK options screen., then choose to create an Extended DOS partition. This will typically be set up for the remaining disk space on the drive. You will be prompted to create logical drives upon establishing the Extended DOS partition. Specify the partition size you want as a percentage or number of megabytes of disk space. Select logical drive sizes the same way. 

    Finally, if you created a Primary and an Extended partition, you need to set an active partition. From the main Fdisk options menu, select option 2, and then select the Primary partition to set active. 

Verifying Drive Integrity

While using Fdisk, each time you create a partition or logical drive, Fdisk displays the following message on the bottom of the screen:

Verifying drive integrity, ##% complete.

The percentage counts 0 to 100. When verifying the drive's integrity, Fdisk is checking the tracks where the system files and FAT will be stored. Fdisk displays this message since it has capabilities for setting up very large drives and the process may take some time.

The check initially verifies the number of tracks necessary to hold the system files and FAT as if the entire disk were partitioned as one primary partition. If you create an extended partition it will verify the number of tracks necessary to hold the system files and FAT as if the remaining portion were partitioned as one logical drive. Finally, with each logical drive created, Fdisk verifies the number of tracks necessary to hold the system files and FAT as if the remaining portion of the extended partition were defined as a logical drive. This repeats until you finish creating logical drives.

Formatting a Hard Disk

The Format command has changed to take into account 32-bit FAT and larger drives. The process for formatting a drive has not changed.

The hard disk on your computer must be formatted before you can run Windows 98 Setup. However, if Windows 98 is already installed and you need to reformat the hard disk, use the following procedure.

Note If the disk was compressed using DriveSpace, you must use the Format option in the DriveSpace program to format the compressed drive.

To format a hard disk drive with Windows 98 installed
  • In Windows Explorer, right-click the drive icon for that disk, and then click Format

To format a hard disk drive using a Windows 98 Startup Disk
  1. Make sure a Startup Disk is in drive a:. Then, at the command prompt, type the following:

    format drive:  

    For drive, type the letter of the drive you want to format.

    If you are formatting drive c:, copy system files to the hard disk by typing the following at the command prompt:

    format c: /s

    When the warning message appears, proceed with formatting by pressing Y. Then press ENTER.

  2. When formatting is complete, type a volume label (if you want one), and then press ENTER.

  3. If you want to format other drives, repeat steps 1 and 2.

  4. Remove the floppy disks from all floppy disk drives, and restart the computer by pressing CTRL+ALT+DEL.

Assigning Drive Letters for Removable Media

Whenever a removable media device is present, the Windows 98 volume tracker ensures that the correct media is in the device and reports improper media removal or insertion.

The volume tracker keeps track of removable media in two ways:

  • On non-write-protected disks, the volume tracker writes a unique ID in the disk's FAT header. This ID is different from the volume serial number. 

  • On write-protected disks, the volume tracker caches each disk's label, serial number, and basic input/output system (BIOS) parameter block. 

Windows 98 supports existing removable media with MS-DOS-compatible partitions, which usually are created by using Fdisk utilities from other vendors. You can use Fdisk for Windows 98 to create partitions on removable media that are recognized by the BIOS. Drives that are recognized by the BIOS are also known as INT 13 drives.

Windows 98 does not perform volume tracking based on the volume serial number because all removable media do not have serial numbers or some might have duplicate serial numbers (as is the case with bulk-formatted floppy disks). Therefore, the file system driver must assign unique IDs to removable media the first time there is a request to mount the specific media, unless unique numbers have already been written to the media. These unique numbers identify the media for volume tracking.

You can control the number of drive letters to be reserved during system startup for each removable media drive.

To reserve drive letters for removable media
  1. In the System option in Control Panel, click the Device Manager tab. 

  2. In the hardware list, double-click the item that represents the removable device. Removable drives are typically found under CD-ROM or Disk drives. 

  3. In the Properties dialog box, click the Settings tab. 

  4. In the Reserved Drive Letters area, select a letter in the Start Drive Letter list to define the first drive to be assigned to this device.

    In the End Drive Letter list, select the last drive to be assigned to this device. Click OK

  5. To close the System Properties dialog box, click OK

  6. When prompted, restart the computer. 

The MaxRemovableDrivePartition entry in the registry allocates the drive letters to be used by partitions on removable media. If this entry is not present in the registry, the number of drive letters to be assigned is based on the number of partitions present on the media when the system starts. If no media are present at startup, Windows 98 reserves one drive letter for each of the removable media.

To support variable-sized disks and partitions, Windows 98 recalculates the disk geometry every time a media change is detected. If you insert media with more partitions than specified by the MaxRemovableDrivePartition entry in the registry, a message warns you that some partitions on the media are not accessible in the current configuration and prompts you to increase the value of MaxRemovableDrivePartition.

Converting an Existing FAT16 Drive to a FAT32 Drive

Use the FAT32 Drive Converter to convert your drive to FAT32.

Caution Windows 98 does not include a utility for converting a drive back to FAT16 once you have converted it to FAT32.

Drive Converter (FAT32)
To convert to FAT32 using Drive Converter (FAT32)

Caution The Drive Converter (FAT32) makes changes to the boot record and file allocation tables of any hard disk that is converted.

  1. Click Start, point to Programs, point to Accessories, and then click System Tools.

  2. Click Drive Converter (FAT32). This launches the Drive Converter (FAT32) Wizard. Follow the directions on the screen. 

The Drive Converter (FAT32) named Cvt1.exe, by default is installed in the Windows folder. The Drive Converter (FAT32) program does the following:

  1. Launches the Drive Converter (FAT32). 

  2. Scans your system for applications that may be incompatible with FAT32.

    The list of programs that the Drive Converter (FAT32) will search for are kept in the registry at:
    HKEY_LOCAL_MACHINE \SYSTEM \CurrentControlSet \Control \SessionManager \CheckBadApps400 

  3. Warns you that the system will be restarted and prompts you to save your work. 

  4. Prompts you to specify which drive to convert; only one drive at a time can be converted. 

  5. Prompts you to back up your files. 

Managing the Recycle Bin to Free Disk Space

When you delete a file or directory, it is moved to the Recycle Bin, but it still takes up space on the hard disk. Use one or all of the following methods to ensure disk space is not being used by the contents of the Recycle Bin:

  • Avoid moving items to the Recycle Bin by pressing SHIFT when you use the mouse or keyboard to delete items.

  • Avoid moving items to the Recycle Bin by specifying that items are removed from the disk immediately when you delete them.

  • Empty the Recycle Bin regularly. 

  • Use the Maintenance Wizard to schedule emptying the Recycle Bin on a regular basis. For more information, see Chapter 27, "General Troubleshooting." 

You can also configure the Recycle Bin to use only a set amount of space so that you are prompted to empty the bin more often.

To configure the Recycle Bin
  1. Right-click the Recycle Bin icon, and then click Properties

    Note You can configure properties separately for each hard disk drive on the computer by clicking the option named Configure Drives Independently. 

  2. If you want deleted items to be removed from the Recycle Bin immediately, make sure Do Not Move Files To The Recycle Bin is checked. 

  3. If you want to specify the amount of hard disk space the Recycle Bin can use, drag the slider to the desired percentage.

For more information about the Recycle Bin, see Help.

Using Disk Cleanup

Disk Cleanup presents you with a list of ways that you can get more disk space, including emptying the recycle bin, removing temporary files, and emptying the Internet cache.

Note This utility also appears when a user is running out of hard disk space. If Windows attempts to allocate space on a hard drive (create a file or resize an existing file) and the free disk space drops below a set threshold, a low disk space notification will appear. This notification prompts the user to run Disk Cleanup. The threshold is 25–65 MB, depending on the volume size. The low disk space warning only appears once during a Windows session. The user will see a second warning only when they completely run out of disk space. The out of disk space warning will always appear when Windows attempts to allocate space on a drive that is completely full.

To start Disk Cleanup
  • In My Computer, right-click a drive, click Properties, and then click Disk Cleanup

    – Or – 

    Click Start, point to Programs, point to Accessories, point to System Tools, and then click Disk Cleanup

Disk Cleanup automatically runs when it detects a low disk threshold. It will suggest several options to delete, depending on the disk drive, so that you can free up some disk space. Disk Cleanup will only run once if it detects a low disk threshold until you try to copy a file to the drive or until you restart your computer.

Using Microsoft Backup

Microsoft Backup, a Windows 98 utility for backing up data, provides options for backing up files to removable disks or tapes, restoring from disks or tapes, and comparing backup file sets to files on the hard disk. Microsoft Backup supports the QIC 113 backup tape specification, which includes support for long file names.

For users familiar with the Windows 3.1 Backup utility, the following list describes important differences in Backup under Windows 95 and Windows 98:

  • The Windows 98 version of Microsoft Backup does not support restoring backup sets created by MS-DOS version 6.x Backup utilities. 

  • The recommended method for creating a complete backup file set for the computer is the Full System Backup option. This option automatically selects the files required for a system backup. 

    If you decide to modify the default selections (by clearing the check boxes for some folders), be sure that you select at least the \Windows directory; otherwise, the registry will not be backed up. 

  • When using the Backup tab in the Settings Options dialog box, notice that selecting Differential under the Type Of Backup option causes the utility to back up only files that have changed since the last time Backup was run. With this setting, new files will not be added to the file set and deleted files will not be removed. 

  • Backup has support for parallel, IDE/ATAPI, and SCSI devices. 

  • Backup supports backups to local, removable, and network drives. 

For more information about Microsoft Backup, see Chapter 27, "General Troubleshooting."

To make a Startup Disk
  • Double-click Add/Remove Programs in Control Panel, and then click the Startup Disk tab. 

Defragmenting Disks

Over time, as programs read from and write to a hard disk, information stored on the disk can become fragmented—that is, files are stored in noncontiguous clusters. Fragmentation does not affect the validity of the information—the files are still complete when they are opened. But it takes much longer for the computer to read and write fragmented files than it does for unfragmented files.

To improve file access time, you can defragment uncompressed drives and compressed DriveSpace or DoubleSpace drives.

Disk Defragmenter has been enhanced to make programs start much faster. When a program starts (loads), it typically reads an EXE file and various DLL files. However, only portions of the EXE and DLL files are read during start. Furthermore, these reads are not sequential and jump back and forth, both within the same file and between files. Every one of these non sequential accesses translate to a disk seek and a performance penalty. Windows 98 Disk Defragmenter tries to place disk clusters in the order they are read, so these seeks are eliminated or greatly reduced, shortening the time needed to start the program.

To record the disk access patterns of programs during their startup, Windows 98 uses a process called Task Monitor. Task Monitor automatically monitors programs you use and record their disk access patterns during their start. These records, called log files, are stored in the \Windows\Applog directory. In addition to access patterns, Task Monitor also records the number of times you use programs. This usage information enables Disk Defragmenter to favor more frequently used programs in optimizing the disk.

The format of the log file name is application.lgn, where application is the name of the application and n is the drive letter where the application files reside. Table 10.4 outlines some log file name formats.

Table 10.4 Log file name formats 

File name

Description

Notepad.lgc

Log file for Notepad, which is located on drive C

Word.lgd

Log file for Word, which is located on drive D

Excel.lgd

Log file for Microsoft Excel, which is located on drive D

MSinfo.lgc

Log file for MSInfo, which is located on drive C

When Disk Defragmenter (Defrag.exe) runs, it calls Cvtaplog.exe to gather information from all the lgn files and build an Applog.dtn file, one for each drive. The Applog.dtn file contains information about cluster placement optimization instructions which are read by Defrag.exe. Defrag.exe uses this information to place disk clusters in the optimized order so that programs start up faster.

Important Disk Defragmenter does not work with most third party compression utilities, nor will it work on read-only drives, locked drives, network drives, FFS drives, or drives created with ASSIGN, SUBST, or JOIN.

To defragment a disk drive
  1. Click Start, point to Programs, point to Accessories, point to System Tools, and then click Disk Defragmenter

    – Or – 

    Click the Start button, click Run, and then type defrag

  2. In the Select Drive dialog box, specify the drive that requires defragmentation. 

    Click the Settings button if you want to do any of the following:

    • Rearrange program files so they start faster. 

    • Check the drive for errors. 

    • Choose the above options for this session only or for all sessions. 

  3. Click OK

Tip Showing details while the Disk Defragmenter is running causes it to take longer than it does when showing only summary information or running it minimized. For quickest performance, minimize the Disk Defragmenter window while the utility is running.

To see defragmentation information for a particular drive
  1. In My Computer, right-click the drive's icon.

  2. Click Properties, and then click the Tools tab. 

    The Tools Properties dialog box shows the number of days since the last complete defragmentation process ran on the drive. You can also run Disk Defragmenter from this dialog box. 

Performance with Other Programs

Excessive disk activity by other programs can interfere with defragmentation, and may cause Disk Defragmenter to restart frequently and take an inordinate amount of time to complete. If this happens, close all programs while Disk Defragmenter is running.

Some screen savers cause excessive disk activity. To prevent screen savers from running during defragmentation, either change the screen saver to None from Display in the Control Panel or modify the registry.

Caution Only advanced users and system administrators should use Registry Editor to modify the registry. If you use Registry Editor to change values, you will not be warned if any entry is incorrect. Editing the registry directly by using registry Editor can cause errors in loading hardware and software, and can prevent users from being able to start the computer.

Before modifying registry values, always back up your system. See "Backing up and Recovering the Registry" in Chapter 31, "Windows 98 Registry".

To prevent screen savers from running during defragmentation
  1. Open Registry Editor. 

  2. Create a string named DisableScreenSaver under HKEY_CURRENT_USER \Software \Microsoft \Windows \CurrentVersion \Applets \Defrag \Settings. 

  3. Set its value to yes

Some programs are always running in the background of Windows 98 and are difficult to close. If you closed all programs and Disk Defragmenter still restarts frequently and cannot complete, you may want to run Disk Defragmenter before Windows displays the logon prompt (at this point, most programs have not been started).

To run Disk Defragmenter before Windows displays the logon prompt
  1. Open Registry Editor. 

  2. Go to HKEY_LOCAL_MACHINE \Software \Microsoft \Windows \CurrentVersion\RunServicesOnce, and create a new string value named Defrag

  3. Set the value to defrag.exe 

    – Or – 

    Set the value to defrag with your choice of command line switches. See "Command Line Switches for Disk Utilities" later in this chapter. 

  4. Close Registry Editor and restart your computer. 

Disk Defragmenter runs before the Windows logon prompt with minimal interruptions. Putting this command line under the RunServiceOnce key takes effect only once. Subsequent computer restarts will not cause Disk Defragmenter to run again.

Fine-Tuning Program Start

The Cvtaplog.exe file is called by Defrag.exe to determine the program optimization order and to build the optimization cluster list. The optimization order is recorded in Optlog.txt, which is located in the \Windows\Applog (hidden) folder on your system. The log file lists programs that were used and not optimized, and explains why (see "Flags for Ineligible Programs"). It also records values of various control parameters.

The following is a sample Optlog.txt file:

Program Launch Optimization Log - Created Sat Jan 17 01:00:02 1998

Programs Eligible for Optimization:
Ord Flag ProgName Uses LastExecDate Program Path
1 WINWORD 85 1998.01.15 C:\PROGRAM FILES\MSOFFICE\OFFICE\WINWORD.EXE
2 RUNDLL32 82 1998.01.16 C:\WINDOWS\RUNDLL32.EXE
3 MSPAINT 54 1997.11.22 C:\PROGRAM FILES\ACCESSORIES\MSPAINT.EXE
4 NSPLAYER 47 1998.01.12 C:\PROGRAM FILES\NETSHOW\PLAYER\NSPLAYER.EXE
5 EXCEL 41 1998.01.16 C:\PROGRAM FILES\MSOFFICE\OFFICE\EXCEL.EXE
6 BSHELF98 30 1998.01.16 C:\PROGRAM FILES\REFERENCE\BOOKSHELF 98\BSHELF98.EXE


Programs Ineligible for Optimization:
Ord Flag ProgName Uses LastExecDate Program Path
7 S NOTEPAD 54 1998.01.07 C:\WINDOWS\NOTEPAD.EXE
8 U TAX 10 1997.04.15 C:\TAX96\TAX96.EXE

Control Parameters:
Use app profile = Yes
Minimum log size = 1000
Maximum no use days = 90
Maximum apps = 50

Flags for Ineligible Programs:
S = Log size smaller than <Minimum log size>
U = Program not used for more than <Maximum no use days>
P = No profile for program
E = Associated program no longer exists
D = Log deleted (may be combined with one of the above)

Note that "Programs Eligible for Optimization" are optimized in the order of most used to least used. The program with the highest use is optimized first. A flag (reason) is given for each of the "Programs Ineligible for Optimization."

Control parameters are configurable in the registry.

Caution Only advanced users and system administrators should use Registry Editor to modify the registry. If you use Registry Editor to change values, you will not be warned if any entry is incorrect. Editing the registry directly by using registry Editor can cause errors in loading hardware and software, and can prevent users from being able to start the computer.

Before modifying registry values, always back up your system. See "Backing up and Recovering the Registry" in Chapter 31, Windows 98 Registry.

All control parameters are DWORD values under the HKLM\software\Microsoft\Windows\CurrentVersion\Applets\Defrag\AppStartParams key. In the absence of control parameter settings in the registry, the default value for the parameter is used. The default value and the meaning of each parameter is as follows:

Value Name
Type
Default
Meaning

UseProfile
DWORD
1
0 means do not use task monitor's app profile. When profile is not used, programs are optimized in FindFirst/FindNext order of the Application.lgn files in the \Windows\Applog folder, and the following parameters are ignored.

Value Name
Type
Default
Meaning

MinLogSize
DWORD
1000
Minimum log file size in bytes to qualify for optimization. Programs with log files smaller than this value are not optimized. If UseProfile is 0, this parameter is ignored.

Value Name
Type
Default
Meaning

MaxNoUseDays
DWORD
90
Programs not used for longer this many days do not qualify for optimization. If UseProfile is 0, this parameter is ignored.

Value Name
Type
Default
Meaning

MaxApps
DWORD
50
Maximum number of apps to be optimized. Programs are optimized in descending order of usage counts, up to this max number. If UseProfile is 0, this parameter is ignored.

Value Name
Type
Default
Meaning

ExcludeFiles
SZ
None. Already set up as System.dat\User.dat\System.ini\Win.ini.
A list of files excluded from program start optimization. Certain files, such as System.dat, are better organized contiguously than fragmented for program start optimization. File names are separated by a backslash in this string.

Disk Region Optimized for Program Start

If program start optimization is performed, Disk Defragmenter notes in the registry the boundaries of the disk region optimized for program start. This region is the region of the disk used to store the clusters for the program start optimization and may look to other disk optimization programs as being heavily fragmented. Programs can query the registry for the boundaries of this region, and then will leave this region alone.

Under the HKEY_LOCAL_MACHINE \software \Microsoft \Windows \CurrentVersion \Applets \Defrag \AppStartParams key is an entry for each drive optimized for program start. The entry is written when Disk Defragmenter completes defragmenting the drive. The entry name is a single letter specifying the driver letter. Its value is a pair of DWORDs specifying the first cluster and the last cluster of the region respectively. For example, the following entry as displayed by Registry Editor says on drive C, the disk region optimized for program start is clusters 0x00000003 to 0x000033F5:

C 03 00 00 00 F5 33 00 00

Using ScanDisk

ScanDisk is a full-featured disk analysis and repair program. ScanDisk has been upgraded to recognize and fix issues with FAT32 drives. You can use ScanDisk on both uncompressed and compressed drives. ScanDisk will check compressed drives created with third-party compression software, but will do so as if they are uncompressed. ScanDisk cannot check the compression integrity of third party compression programs. ScanDisk can, however, provide a detailed analysis of compression structures on DoubleSpace and DriveSpace drives.

Windows 98 provides two versions of ScanDisk: a graphical Windows-based version (Scandskw.exe) that you can run from the Start menu or from Windows Explorer, and an MS-DOS-based version (Scandisk.exe) that is contained in the \Windows\Command folder. Running Scandisk.exe while in Windows will invoke Scandskw.exe.

Note ScanDisk cannot find or fix errors on CD-ROM drives, network drives, or drives created by using assign, subst, join, or interlnk.

ScanDisk checks and fixes problems in the following areas on hard disk drives, floppy disk drives, RAM drives, and memory cards:

  • FAT16 and FAT32. 

  • Long file names. 

  • File system structure (lost clusters, cross-linked files). 

  • Directory tree structure. 

  • Physical surface of the drive (bad sectors).

  • DriveSpace 3 or DoubleSpace volume header, volume file structure, compression structure, and volume signatures.

Tip You can add ScanDisk to the Windows Maintenance Wizard List. For more information, see Chapter 27, "General Troubleshooting."

You can place ScanDisk in Task Scheduler so that it is run at regularly scheduled times. You can also run ScanDisk from the Tools Properties dialog box for a drive. To do this, right-click that drive's icon, click Properties, and then click the Tools tab. Click the Check Now button to begin running ScanDisk.

ScanDisk can check and repair mounted DriveSpace 3 or DoubleSpace drives. You can run ScanDisk from the command prompt to check and repair unmounted compressed volume files (CVFs). When you run ScanDisk to check a compressed drive, by default, ScanDisk checks the host (physical) drive first. In general, you should allow it to do so because an error on the host drive could cause problems with the compressed drive.

To run ScanDisk
  1. Click Start, click Run, and type scandisk

  2. Click the drive you want to analyze or repair.

    In the Type Of Test area, click Standard or Thorough.

    • Standard checks the files and folders on the selected drive for errors.

    • Thorough checks files and folders for errors, but it also checks the physical integrity of the disk's surface.

  3. If you do not want ScanDisk to prompt you before repairing each error it finds, make sure Automatically Fix Errors is checked. 

  4. If you are running a thorough test, click the Options button to specify which areas of the disk to check or which type of processing to perform. Select the options you want to use, and then click OK

  5. Click Advanced to set advanced options as needed, and then click OK. For more information about each option, see Help. 

  6. To begin checking the disk, click Start

To run ScanDisk on unmounted CVFs
  • Boot the computer to an MS-DOS command prompt, change to the drive that contains the unmounted CVF, and type the following command: 

    scandisk drvspace. nnn  

    – Or – 

    scandisk dblspace. nnn 

    where nnn is a number. This starts an MS-DOS session and runs ScanDisk on the corresponding DriveSpace 3 or DoubleSpace CVF. 

Using Disk Compression

A compressed drive is not a real disk drive, although to most programs it appears to be. Instead, a compressed drive exists on the hard disk as a compressed volume file (CVF). A CVF is a file with read-only, hidden, and system attributes, and that contains a compressed drive. Each CVF is located on an uncompressed drive, which is referred to as the CVF's host drive. A CVF is stored in the root directory of its host drive and has a file name, such as Drvspace.000 or Dblspace.000.

Note DriveSpace 3 included with Windows 98 has been modified to recognize FAT32 drives, but it will not compress them.

CVFs can store more data than the space they use on their host drives; for example, a typical CVF might use 100 MB of space on its host drive but contain 200 MB of compressed data. DriveSpace 3 assigns a drive letter to the compressed volume so that you can use it as a disk drive and can access the files it contains. The host drive will have a separate drive letter (although it might be hidden).

Caution Do not tamper with a CVF. If you do, you might lose all the files on the compressed drive.

With Windows 98 DriveSpace 3, you can compress drives and manage drives compressed with DriveSpace 3 or DoubleSpace. (You can even have drives of both compression types on your computer.)

When Windows 98 is installed, Setup replaces the Dblspace.bin or Drvspace.bin file in the root directory of the boot drive with versions that can be unloaded during the system startup process and replaced with Drvspacx.vxd.

Using DriveSpace 3 for Disk Compression

Using DriveSpace 3, you can compress and uncompress data on floppy disks, removable media, or hard disk drives. DriveSpace 3 frees space on disks by compressing the data or space the disks contain. The first time you use DriveSpace to compress data or space on a drive, the disk will have 50 to 100 percent more free space than it did before.

DriveSpace 3 contains these enhancements over Windows 95 DriveSpace:

  • Enhanced compression with support for compressed drives up to 2 GB using a 32 KB cluster size. 

  • Support for storing compressed data for a cluster in multiple fragments when there are not enough contiguous sectors on the disk to store the entire cluster. 

  • Compression of up to 20 percent faster on Pentium-based computers. Other x86-based computers should also run faster with DriveSpace 3 when the compression is configured for best performance.

  • DriveSpace 3 settings for specifying whether to use compression, what type of compression to use, and how to use it. 

  • Support for compression enhancements on existing drives. 

You can use a compressed drive just as you did before compressing it. In addition, DriveSpace 3 creates a new uncompressed drive, called the host drive, where it stores the CVF. If the host drive contains any free space in addition to the CVF, you can also use it to store files that must remain uncompressed.

As with earlier CVF versions, a DriveSpace 3 CVF has a name in the form: Drvspace.nnn, where nnn is the CVF sequence number in the range 000 through 254.

Windows 98 also places drive-specific compression information (and the tools to manipulate it) where you would expect to find it: in the drive's properties. (System-wide compression settings and functions are still available in the DriveSpace 3 programs.) To present this information, a Compression tab is added to the Property dialog boxes for all local hard and floppy disk drives, except compressed drives created by software from other vendors. Uncompressed drives that are hosts for one or more compressed volume files also have a Compression tab added to their properties. For hidden host drives, you must use the DriveSpace 3 program to view information about the drive.

Using Compression Agent

Compression Agent gives you the following compression choices:

  • Whether specified files should be in UltraPack format, and whether to downgrade a file from UltraPack format. 

  • Whether individual files, folders, or file types should be compressed and, if so, with what method. 

  • Whether to use compression for the rest of your files and, if so, which type. 

You can start Compression Agent manually or have Task Scheduler start it automatically. You can also use the Maintenance Wizard to schedule Compression Agent. Compression Agent uses the Windows 98 Last Access Date to determine which files have not been used within a defined time, but does not modify the Last Access Date for any files.

How Compression Works with DriveSpace 3

DriveSpace 3 compresses data in 32 KB blocks (instead of 8 KB blocks used for Dblspace or Drvspace), and supports two levels of compression: HiPack and UltraPack.

HiPack compression uses the same encoding format as standard compression.

UltraPack format offers better compression than standard or HiPack compression, but files compressed in UltraPack format are slower to decompress. UltraPack compression is available by running Compression Agent. You cannot configure DriveSpace to save files in UltraPack format automatically. And, because UltraPack encoding format uses DriveSpace 3 CVFs, Drvspace.bin and Drvspacx.vxd must be installed to read the CVFs.

DriveSpace 3 for Windows 98 can create a compressed drive of up to 2 GB. You can also create a new compressed drive from the free space on an uncompressed drive that is part of a unremovable FAT16 hard disk. After compression, you will notice that the uncompressed drive contains less free space than it did before. This space is now being used by the new compressed drive, which is stored in a hidden file with a file name, such as Drvspace.001.

Tip The registry can reside on compressed drives that were created by "preload" compression software such as Stacker 4.0, DoubleSpace, DriveSpace 3, and AddStor SuperStor/DS.

A swap file can reside on a compressed drive if a protected-mode driver (that is, Drvspace.vxd) controls the compressed drive. DriveSpace 3 marks the virtual memory as uncompressible.

If your swap file is on a compressed drive created by a real-mode compression drive, you should move the swap file to another drive, such as the host drive.

For more information about changing the location of your swap file, see Chapter 26, "Performance Tuning."

Example

Suppose you have a 200 MB hard disk with 100 MB of data on it. Uncompressed, this disk has 100 MB of free space. You can increase the amount of disk space in either of two ways:

Use DriveSpace 3 to compress both the data and the free space on the disk. Because DriveSpace 3 reports file sizes of compressed files as though they were uncompressed, the disk is now a 400 MB disk with 100 MB of data and 300 MB of free space.

Create a new compressed drive from free space on the hard disk. DriveSpace 3 will report that you have two drives, one with 200 MB of free space and the other with 100 MB of data and no free space. (You can also create an empty drive using only part of the available free space.)

The compression policies specified in the Compression Agent Settings dialog box control the policy used to compress files. However, you can also force or prevent a particular compression type on a particular file, or set of files, or folders, based on the following exceptions to the default compression policy:

  • Never compress.

  • Always compress with UltraPack format.

  • Always compress with HiPack format.

The following shows the Compression Agent command line syntax:

cmpagent [ drive : | /all] [/noprompt] 

The following list describes the parameters for this command:

Parameter

Description

drive:

Specifies drive to be recompressed.

/all

Specifies all local, fixed drives that are compressed.

/noprompt

Runs without waiting for the user to click Start, and without displaying a summary at the end. Errors are displayed. This switch can be shortened as /nop.

Fine-Tuning Compression

You typically use the default values for compression, which specify using standard or no compression when saving files. Set Task Scheduler to run Compression Agent when the computer is not busy. Compress seldom-used files into UltraPack format and all other files into HiPack format. While deciding which methods and formats to use, consider whether you want maximum disk space or maximum system performance.

Maximizing hard disk space on a computer 

Specify that UltraPack format be used to compress most files. (UltraPack format is recommended for Pentium-based computers.) Specify that files be compressed as they are saved. If your computer is fast, specify that HiPack format be used.

Maximizing system performance 

Files compressed in UltraPack format are slower to decompress—if you access a document or run an application that is compressed in UltraPack format, you must wait before you can begin to work again. For slower computers that require maximum performance, use Task Scheduler and Compression Agent to specify that all compression is done while the computer is idle instead of compressing files as they are saved.

Suggestions for defining maximum performance: Use DriveSpace 3 to specify that compression occurs only offline (when files are not being saved) or only when disk space is low. Specify a high threshold for UltraPack (for example, compress files not accessed for 30 days or more). Set exceptions for files that should not be compressed in UltraPack format (for example, do not compress executable files).

Note If you choose not to compress files as they are saved, or to compress files only when disk space is low (using Depends On Free Space), the system reports free space as though files will not be compressed. As a result, the computer appears to have less free space than when files are compressed as they are saved. However, if you use Compression Agent regularly, you will be able to store the same amount of data in this space.

Although the option to compress a drive provides more usable space, the process takes longer than creating a new compressed drive because DriveSpace 3 has to compress the data on the drive.

Important Before you use DriveSpace 3 to compress a drive, you should back up the files the drive contains.

To compress a drive
  1. Click Start, click Run, and then type drvspace

  2. In DriveSpace 3, click the drive you want to compress. 

     

  3. Click the Drive menu, and then click Compress

    The Compress a Drive dialog box appears, listing the drive it is about to compress. 

  4. If you want to specify the drive letter or free space to leave available for the host drive, and whether the host will be hidden, click Options.

    Make modifications in the Compression Options dialog box as needed, and then click OK

    Note By default, DriveSpace 3 hides the host drive if the amount of free space is 2 MB or less.

  5. Click Start to continue. 

  6. DriveSpace 3 prompts you to create a Startup Disk. Click Yes or No

  7. DriveSpace 3 prompts you to back up your files. If you want to back them up at this time, click Back Up Files

  8. To start compression, click Compress Now.

DriveSpace 3 checks the drive for disk errors, and then it compresses the drive. This process can take from several minutes to several hours, depending on the speed of the hard disk and processor and on the amount of data the hard disk contains. Because DriveSpace 3 checks and rechecks the validity of the data as it compresses files, the process is very safe. In fact, if the compression process is interrupted accidentally (for example, by a power outage), DriveSpace 3 recovers and continues without losing any data.

If any files are open on the drive, DriveSpace 3 will prompt you to close them. For drives that always have files opened (such as the drive containing Windows 98 or the drive containing a swap file), DriveSpace 3 will restart the computer and use a limited version of Windows in place of Windows 98 while it compresses the drive. To do this, a directory named Failsave.drv is created that contains the system files required for this operation. After compression, your computer will restart again, this time with Windows 98. When the compression is completed, DriveSpace 3 shows how much free space is available on the drive.

To create a new compressed drive
  1. In DriveSpace 3, click the drive that has free space you want to use to create the new compressed drive. 

  2. Click the Advanced menu, and then click Create Empty

  3. If you want to leave some free space on the original drive, decrease the value in the Using box. 

  4. To start compression, click Start

To uncompress a drive
  1. In DriveSpace 3, click a drive to uncompress. 

  2. Click the Drive menu, and then click Uncompress

  3. To start uncompressing, click Start

    If there is not enough space on the host drive to contain the uncompressed files, DriveSpace 3 displays a warning. Otherwise, DriveSpace 3 prompts you to back up files and shows the status of the process as it progresses. 

Note If you try to change the size of a drive that was mounted with a real-mode DriveSpace 3 or DoubleSpace driver, you will be prompted to restart the computer so that the drive can be remounted under Windows 98. This will also occur for other operations using the real-mode DriveSpace 3 driver.

Fine-tuning Storage Space

On an uncompressed drive, free space indicates how much additional data you can store on that drive. For example, if a drive has 2 MB of free space, you can expect to fit 2 MB of data on it. However, the free space on a compressed drive is only an estimate of how much data you can fit on that drive.

When you store a file on a compressed drive, DriveSpace 3 compresses the file so that it takes up as little space as possible. Some files can be compressed more than others; for example, a text file can be compressed much more than a program file. DriveSpace 3 cannot detect the compressibility of files you have not stored yet, so it only estimates a compressed drive's free space.

DriveSpace 3 estimates a drive's free space by using the estimated compression ratio, which you can set to specify the compressibility of the files you plan to store. For example, if the estimated compression ratio is 3-to-1, DriveSpace 3 calculates the drive's free space based on the assumption that each file to be stored can be compressed to one-third its original size.

Usually, the best compression estimate to use is the actual compression ratio for the files already stored on the drive. Sometimes you might want to reset the estimated compression ratio of each drive to match that drive's actual compression ratio.

You might want to change the estimated compression ratio if it differs greatly from the actual compressibility of the files to be stored. For example, if you plan to store extremely compressible files, such as bitmap files, you might want to specify a higher estimated compression ratio.

Changing a drive's estimated compression ratio does not affect how much DriveSpace 3 actually compresses the files on that drive; it changes only the way DriveSpace 3 estimates the free space on the compressed drive.

To change the estimated compression ratio
  1. In DriveSpace 3, click the compressed drive you want to change.

  2. Click the Advanced menu, and then click Change Ratio.

  3. In the Compression Ratios area, type a new ratio box or drag the slider to the desired ratio. Click OK

You can also adjust the amount of free space for a compressed drive or its host drive. This is equivalent to changing the size of the compressed drive and its CVF. When you increase free space on a compressed drive, you decrease it on its host, and vice versa.

To change the amount of free space on a drive
  1. In DriveSpace 3, click the drive on which you want to change the amount of free space. 

  2. Click the Drive menu, and then click Adjust Free Space.

  3. In the Adjust Free Space dialog box, type a new value or use the slider to adjust the amount of free space available on the compressed and host drives. Click OK

Using Task Scheduler

Task Scheduler is an application for scheduling programs to run at specific times. Programs can be scheduled to run based on several criteria, such as time and date, or a range of times, or whether the computer is idle or is not running on batteries. Task Scheduler supports options for specifying when Compression Agent, Disk Defragmenter, ScanDisk, and other programs will run.

Example

You might use Task Scheduler to do the following:

  • Dial-in to an online service during off-peak hours, look for certain topics, download the results, and hang up. 

  • Run a spreadsheet application such as Microsoft Excel, and use one or more macros to perform extensive computations on worksheets. 

  • Designate that ScanDisk run a standard test nightly and a thorough test monthly. 

For more information about using Task Scheduler, see Chapter 27, "General Troubleshooting."

Technical Notes on Disk Device Support

Win32 Driver Model (WDM) defines a device-driver architecture that provides a common set of I/O services understood by both Windows 98 and future versions of Windows NT. With WDM, developers can write a single bus driver or device driver for both operating systems.

The ability to have binary-compatible device drivers comes from the layered architecture. Each layer isolates portions of the services required of a device driver and lets hardware vendors contain all hardware-specific functionality into a single file. Before WDM, device drivers had to include hooks for a particular operating system in addition to the elements necessary to interact with a specific piece of hardware. The non-layered approach prevents device drivers from being supported across multiple operating systems.

The WDM layered architecture is based on the concept of driver classes. There are six layers to WDM.

  • Device Class Drivers 

  • Device Minidrivers 

  • Bus Class Drivers 

  • Bus Minidrivers 

  • OS Services (Ntkern.vxd) 

  • Virtual Device Drivers (legacy .vxd's) 

Windows 98 uses the layered block device drivers to manage input and output to block devices, such as disks and CD-ROM drives. A block device is a device such as a disk drive that moves information in groups of bytes (blocks) rather than one byte at a time. Layered block device drivers are 32-bit, flat-model device drivers that run in protected mode. These drivers support conventional and small computer system interface (SCSI) disk drives, plus partitioned and non-partitioned removable media. Windows 98 also uses layered block device drivers to manage Windows 3.x FastDisk drivers, MS-DOS-based real-mode device drivers, and Windows NT miniport drivers.

Each layered block device driver can be loaded dynamically, so the appropriate driver can be loaded or unloaded as needed without restarting the computer. Although the drivers are virtual device drivers (VxDs), they do not use the standard virtual device services and APIs. Instead, the I/O Supervisor provides the services and functions the device drivers need to complete their tasks.

Specifically, the block I/O subsystem in Windows 98 provides the following:

  • Architecture to support all Plug and Play features. 

  • Support for miniport drivers that are compatible with Windows NT. 

  • Compatibility support for Windows 3.1 FastDisk drivers and MS-DOS-based real-mode device drivers. 

  • Protected-mode drivers that take over real-mode MS-DOS-based device drivers when it is safe to do so. 

For more information about the block I/O subsystem, see Chapter 28, "Windows 98 Architecture." For more information about WDM, see Chapter 30, "Hardware Management."

Supported Disk Devices

Windows 98 provides better disk device support than Windows 95 and ensures compatibility with existing MS-DOS-based and Windows-based disk device drivers.

Windows 98 also provides enhanced support for large media using logical block addressing, including hard disks with more than 1024 cylinders. Extensions to the INT 13 disk controller support are provided in the protected-mode disk handler drivers for this support.

The following types of hard disk drives are supported under Windows 98:

IDE
IDE DMA

IDE LBA
SCSI

The following types of bus adapters are supported under Windows 98:

EISA
ISA
MCA

PCI
PCMCIA

SCSI 2
VL bus

The following sections describe support in Windows 98 for IDE, SCSI, high-speed floppy disk, and removable media devices. Information about SCSI and non-SCSI port drivers is also included.

IDE Drives and Controllers

Windows 98 provides improved support for integrated device electronics (IDE) drive configurations, as summarized in this section.

Alternate IDE controllers. Windows 98 provides protected-mode support for the use of one or more IDE controllers in a computer, or the combination of an IDE controller in a portable computer and an alternate controller in a docking station (available, for example, in some Compaq docking station products). IDE controllers provide support for multiple disk drives.

IDE-based CD-ROM drives. Windows 98 supports CD-ROM drives that connect to IDE-compatible disk controllers.

Large IDE disk drives. IDE drives that support a logical block addressing (LBA) scheme are available, allowing them to exceed the 0.5 GB (528 MB) size limitation. Windows 98 provides protected-mode support for IDE disk drives larger than 504 MB.

Note The BIOS must also support LBA, otherwise third-party partitioning software is required.

The cluster size for a drive is defined by the Format program, depending on the size of the local drive as shown in Table 10.2.

Bus mastering chip sets. Windows 98 provides support for bus mastering chip sets, such as Intel Triton and Opti Viper M.

Note Bus mastering should only be enabled for specific hard drive models that are certified by their manufacturer to work properly with a Windows bus master driver. The drives must indicate that they support direct memory access (DMA) in the drive ID data. Check properties in the disk drive to see if a check box for DMA appears, which indicates that the controller supports DMA. However, it is a good idea to check with the hard disk manufacturer to see if the hard drive supports DMA.

S