DOS Hard
Disk Drive (HDD) Structure:
· Each hard drive is organized as a stack of disks similar to a floppy disk.
· Each surface is divided into tracks.
· Each track is divided into sectors.
· Each sector is stores 512 bytes of information.

Size in Bytes = (Total no. of Tracks) x (Sectors) x (Sector size)
= (Cylinders x Heads) x (Sectors) x (Bytes per Sector)
= (1024 x 16) x 63 x 512 Bytes
= 528482304 Bytes
= 528 MB (Commercial)
= 528482304 / 1024 kB
= 516096 kB
= 516096 / 1024 MB
= 504 MB (Actual)
Size in Bytes = (Total no. of Tracks) x (Sectors) x (Sector size)
= (Sides x Tracks) x (Sectors) x (Bytes per Sector)
= (2 x 80) x 18 x 512 Bytes
= 1.44 MB (Commercial)
In both cases the formula is the same except to find the Total no. of Tracks.
In case of a floppy drive it is Total no. of Tracks = (Sides x Tracks), and
In case a hard drive it is Total no. of Tracks = (Cylinders x Heads)
· Not only DOS all operating system stores information as files.
· The structure of organizing files is called file system.
· The files are organized into groups, called directories or folders, they are also files keeping track of other files.
· The directories can be organized into hierarchies of directories, just like a filing cabinet.
The physical hard drive has to be mounted and connected to the appropriate controller card, using proper cables.
There are four types of interfaces:
1. Device-level:
· ST-506/412 - Seagate's proprietery interface
· ESDI - Enhanced Small Device Interface
2. System-level:
· IDE - Integrated Drive electronics
· SCSI - Small Computer System Interface
After Physically installating the hard drive, The first thing you have to do is to write the HDD parameters in the CMOS Setup, and they are:
1. number of Cylinders,
2. number of Heads,
3. number of Sectors/track,
4. amount of write precompensation (speeds up writing of data as tracks become smaller near the center of the platters), and
5. the number to be used as the landing zone for the heads when the drive is shut down.
· These information can be obtained from the manufacturer and normally written on the drive itself.
· The newer BIOS has routines to auto detect these information from the drive.
· The newer drives don't need informations about precompensation and landing zone.
· The older BIOS limits the size of HDD, that is 504 MB (1024C x 16H x 63S).
· To overcome this, newer BIOS include an Enhanced mode that uses Logical Block Addressing (LBA) techniques or, Large mode, translation to enable the larger HDD sizes, a maximum of 8 GB (1024C x 256H x 63S).
·
There is another factor that limits the size of disk
partitions (logical drives) - Operating
system:
· DOS 2 and 3 allows a maximum of 32 MB partitions
· DOS 6 allows a maximum of 1 GB partitions
· First Win95 allows a maximum of 2 GB partitions
· Win95 OSR allows a maximum of 8 GB partitions
· Upgrade the Motherboard BIOS
· Install an Enhanced BIOS available on interface card or install HDD controller card with newer BIOS.
· Upgrade the Motherboard
· Use software that interfaces between the old BIOS and the new drive
· Disk manager software - EZ-Drive v9.09W (http://www.wdc.com/support/ftp/ezdrive/ezdrive9.exe)
To prepare the hard disk drive for use by the system, three levels of preparation must take place. These are, in order,
· the low-level format (below DOS),
· the partition, and
· the high-level format (or DOS).
· Low-level format is similar to the high-level DOS format, in that it marks off the disk into
· Cylinders,
· Sectors, and
· Defines their placement on the disk
· In older drives (such as ST-506 and ESDI drives), the user is required to perform the low-level format.
· In most newer drives (such as IDE and SCSI drives), the user is not required to perform the low-level format. Low-level format is performed at the factory. Rather attempts to perform low-level formats may result in damage to the drive.
· The reason is the drives contains alignment information used to control heads. This alignment information may be lost during a low-level format. Only the manufacturer can restore this information to the disk.
· Before high-level format can be performed, the drive must be partitioned.
· The partition establishes the size and number of logical drives on the physical drive.
· Without partitioning, the DOS will not recognize the physical drive as logical drives C:, D:, E:, etc.
· By partitioning a drive, multiple operating systems can exist on the same drive.
· Though the BIOS might recognize a large HDD, the operating system limits the size of the partitions i.e., the size of the logical drives.
· DOS 2 and 3 allows a maximum of 32 MB partitions
· DOS 6 allows a maximum of 1 GB partitions
· First Win95 allows a maximum of 2 GB partitions
· Win95 OSR allows a maximum of 8 GB partitions
· Partitioning a drive creates a Partition table, also called a MBR.
The partiion table is written at the very beginning of the drive and contains information about
· the size of each partition
· start and ending of the partitions.
· Which is the active partition?
· It is exactly 512 bytes long.
· In DOS, you can create a maximum of 4 primary partitions. Some utilities are:
· Partition Magic,
· System commander,
· MasterBooter 2.5 - EFDISK, shareware program.
· FDISK is the partition utility shipped with DOS, Windows95:
· Can create only one primary partition and an extended partition,
· Extended partition does not create a logical drive like D:, E:, etc.
· To create more than one logical drives, you have to create an extended partition first,
· Then, create logical partitions in it,
· You can create a maximum of 24 logical drives, first one is a primary partition and the rest 23 will be logical partitions.
· Partition Magic can create a miximum of 4 primary partitions,
· Or, 3 primary partitions and an extended partition that can hold 21 logical partitions
High-level Formatting:
This process creates the following items on a logical drive (partition):
· Tracks and sectors. Each sector has an address and the beginning mark.
· Boot record
· FAT, file allocation table, 2 copies.
· Root directory, fixed 224 entries.
There have been four HDD interfaces commonly associated with microcomputers.
1. Device-level interfaces:
· ST-506/412 - Seagate's proprietery interface
· ESDI - Enhanced Small Device Interface
2. System-level interfaces:
· IDE - Integrated Drive electronics
· SCSI - Small Computer System Interface
Device-level interfaces:
These types of drives typically use a controller card that contains the system-level interface for the drive. These drive types require the user to perform all three levels of drive preparation.
The system-level interfaces:
These types of drives place most of the controller circuitry on the drive itself. Therefore the system sees the entire HDD system as an attachment to its bus systems. These units also come with the low-level format already in place.
The name came from the model number of the drive (manufactured by Seagate) that first used this interface. ST-506/412 interface used a two-cable arrangement to connect the drive to the adapter card, as depicted in figure below.
This type of interface employed two types of data encoding:
· Modulated Frequency Modulation (MFM) coding, and
· Run-Length Limited (RLL) coding, extend the drive's storage capacity by 50%.
· It uses two cables,
· one is 34-pin cable, looks like a floppy cable but the twist at pin 25-29 (5 wires not 7),
· the other for the second drive a 20-pin cable.

The Enhanced Small Device Interface (ESDI) is actually an improved ST-506 standard interface. This interface, shown in figure below, uses the same 20/34-pin, two-cable arrangement as the ST-506. The signal definitions and locations have been changed, however, so that the two interfaces are not compatible.
Developed by a group of manufacturer in mid 80's.

Has faster transfer rate and capacity.
The Integrated Drive Electronics (IDE) interface was developed by WD.
It is also refered to as an AT Attachment (ATA) interface.
This interface, shown in figure below, uses the same 20/34-pin, two-cable arrangement as the ST-506. The signal definitions and locations have been changed, however, so that the two interfaces are not compatible.
Developed by a group of manufacturer in mid 80's.

Has faster transfer rate and capacity.
Updated IDE specifications allow for more than two drives to exist on the interface. This new specification is called Enhanced IDE (EIDE), or the ATA-2 interface.
It also provides for improved IDE drivers, known as the AT Attachment Packet Interface (ATAPI), for use with CD-ROM drives.
The Small Computer System Interface (SCSI, often referred to as scuzzy) standard, provides a true system-level interface for the drive. Nearly all the drive's controller electronics are located on the peripheral device.
The SCSI interface described in the figure only makes provisions for 8-bit parallel data transfers.
The SCSI interface can be used to connect up to seven diverse types of peripherals to the system. As an example, a SCSI chain could connect a controller to a hard drive, a CD-ROM drive, a high-speed tape drive, a scanner, and a printer. SCSI devices are added to the system by daisy-chaining them together.
SCSI devices may be classified as internal, or as external devices.
Unlike other HDD types, SCSI hard drives are not configured as part of the system's CMOS setup function.
The SCSI specification refers to its SCSI controller as SCSI-7 (by default), and then classifies the first internal hard drive as SCSI-0.
Each SCSI device has either a SCSI number selection switch or configuration jumpers.

The SCSI daisy chain must be terminated with a terminating resistor network
pack at both of its ends.