Legacy Documentclose button

Important: The information in this document is obsolete and should not be used for new development.

Previous Book Contents Book Index Next

Inside Macintosh: Files /
Chapter 5 - Disk Initialization Manager / About the Disk Initialization Manager


Disk Initialization

Disk initialization is the process of making a disk usable by the Macintosh Operating System. When shipped, most floppy disks are uninitialized because different operating systems have different initialization requirements. On Macintosh computers, disk initialization consists of three independent steps:

All three steps must be performed successfully before the disk is considered initialized (or valid). You can use a single Disk Initialization Manager function, DIBadMount,
to perform all three operations in sequence, or you can perform any one of them by calling a corresponding low-level function (either DIFormat, DIVerify, or DIZero).
In general, your application should use the standard user interface described in the following section to initialize a disk.

The first step in the initialization process is disk formatting. Formatting a disk consists of writing special information onto a disk so that the disk driver can read from and write to the disk. This involves dividing the total usable space into sectors and tracks. See the chapter "Disk Driver" in Inside Macintosh: Devices for a description of how a disk is divided into tracks and sectors.

The second step in the disk-initialization process is disk verification. Verifying a disk consists of reading every bit on the disk to ensure that the disk has been formatted correctly and contains no bad blocks. If an error occurs during the reading of any single bit, the verification is considered unsuccessful.

The third and final step in the disk-initialization process is disk zeroing. Zeroing a disk consists of creating on the disk the data structures and files necessary for the disk to be recognized as a hierarchical file system (HFS) volume. In particular, zeroing a disk places a master directory block (MDB), a volume bitmap, and a catalog file in appropriate
locations on the disk. (For information on the locations and sizes of these items, see the description of the organization of data in a volume in the chapter "File Manager" in
this book.) The volume bitmap and catalog file are set up to represent a volume containing no user files. As a result, zeroing a disk makes any files previously located on the disk inaccessible.

Beginning in system software version 7.0, zeroing a disk also causes the Disk Initialization Manager to attempt to remove any bad blocks (as identified during the disk-verification process) from the pool of available blocks on the disk. See "Bad Block Sparing" on page 5-7 for a description of this capability.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
2 JUL 1996