Go to Home Page GuidesHow to ArticlesReviewsForumsFrequently Asked QuestionsNewsOnline StoreLinksPotpourri

Site Search

 

HARD DISK DRIVE GUIDE
HOW A HARD DISK DRIVE WORKS?
Last updated: 6/2/00

Hard Disk Inards A hard disk drive consists of a motor, spindle, platters, read/write heads, actuator, frame, air filter, and electronics.  The frame mounts the mechanical parts of the drive and is sealed with a cover.  The sealed part of the drive is known as the Hard Disk Assembly or HDA.  The drive electronics usually consists of one or more printed circuit boards mounted on the bottom of the HDA. 

A head and platter can be visualized as being similar to a record and playback head on an old phonograph, except the data structure of a hard disk is arranged into concentric circles instead of in a spiral as it on a phonograph record (and CD-ROM).  A hard disk has one or more more platters and each platter usually has a head on each of its sides.  The platters are mounted on the spindle which is turned by the drive motor.  Most current IDE hard disk drives spin at 5,400 or 7,200 RPM and 10,000 RPM drives are emerging.  A layer of magnetic material is deposited on the surface of the platters and those in most of the drives I've dissected have shiny, chrome-like surfaces.

The heads (or Winchester sliders) are spring-loaded airfoils and actually fly like an airplane above (or below) the surface of the platters at a distance measured in micro-inches.  This sort of mechanism is known as a Winchester hard disk drive and was invented by IBM in 1973.  Hard disk Read/Write HeadThe heads are extremely small electromagnets and are shown schematically to the right (for a prettier and more detailed picture with separate read and write elements, click here).  Information is stored on the platters by sending pulses of current from the drive electronics to the head.  The direction of the current and thus the direction of the diverging magnetic field across the gap in the head determines the direction the magnetic domains (little bitty, molecular magnets) on a particular spot on the platter's magnetic coating, and, thus, whether the spot represents a binary one or zero. The domains essentially retain their directional bent (whether the computer is on or off) until "told" to do otherwise by the drive electronics, which take their orders from the rest of the computer and ultimately from software.  The complexity of the mechanisms and methods associated with doing all of this will be omitted here.

 Hard Disk Head AssemblyThe heads move together and are propelled across the disk surface by the actuator.  The actuator on most recent hard disks employs a voice coil mechanism.  It functions much like the voice coil in a loud speaker, thus its name.   It consists of a curved magnet (or magnets--very strong ones) and a spring-loaded coil of fine wire which is attached to the read/write heads by head arms.  The head arms are attached to, and pivot about an actuator shaft.  When the drive electronics apply an electric current to the actuator coil, it interacts with the magnet and swings against the actuator spring.  The heads rotate around the actuator shaft in the opposite direction of the coil movement, inward and outward from the center to the edges of the platters.  If there is a power outage the spring, which counterbalances the the electromagnetic force between the coil and magnet, takes over and automatically parks (lands them on skids or nanosliders--like pontoons on a sea plane) and locks the heads on a part of the platters called a landing zone (like an airport runway only curved) before they can crash (like an airplane) on, and mar that part of the surface of the platters where data is stored.  When power is restored, the platters speed-up and the heads take off (like a tethered model airplane, except the ground moves--and those on the bottoms of the platters can fly up-side-down) and start flying again--an extraordinary mechanism...

One no longer has to park a hard disk before moving the computer as was the case in times of old when actuators were moved by devices known as stepper motors.  However, if the power jitters repeatedly or the drive is subjected whack from a frustrated user, a crash can occur.

Try to visualize a thin, hollow cylinder passing through all of the platters.  It would produce a circular track on each side of each platter.  Now divide each tack into equal arcs or sectors.  Well, that is exactly how a hard disk is organized.  That is, Cylinders, Heads (which are equal the number of tracks or platter sides), and Sectors are the coordinates of the data on a hard disk drive.

SERVO-FORMATTING.  There are two kinds of sectors on a hard disk.  The first and at the very lowest level is a servo sector.  When a hard disk is manufactured a special pattern is written in a code called a Gray code on the surface of the platters, while the drive is open in a clean room, with an expensive machine called a servowriter.  Although there are other schemes,  it is written in a wedge at the start of each sector (an embedded servo pattern) on most drives.  There are a fixed number of servo sectors per track and the sectors are adjacent to one another.  This pattern is permanent and cannot be changed by writing normal data to the drive. It also cannot be changed by low-level formatting (see below) the drive, as some may think.  If it is changed, the drive has had it--kaput!  The electronics use feedback from the heads, which read the Gray code pattern, to very accurately position, and constantly correct the radial position of the appropriate head over the desired track, at the beginning of each sector, to compensate for variations in platter geometry, caused by mechanical stress and thermo expansion and contraction.   Altogether, the head positioning components form what is know as closed loop servo system--a marvelous (and, perhaps, dangerous) thing to watch operate in a drive which has been opened.

LOW-LEVEL FORMATTING.  After the servowriter has done its thing and the drive is sealed, the hard disk drive is low-level formatted to create the second level of sectors: data sectors.  The servo sectors are divided into data sectors.  Current IDE drives employ zoned-bit recording which varies the number of data sectors per track.  Servo sectors in outer tracks are divided into more data sectors than those in the the inner tracks.  In the interest of keeping things simple we will not digress further into zoned-bit recording and will maintain the conceptual model of a fixed number of sectors per track established by the above diagram.  Furthermore, the drive firmware further  translates the physical cylinders, heads, and data sectors back and forth into a different combination of cylinders, heads and cylinders, as seen by the computer, so they fall within the constraints of the various operating systems.  What you will see (and what the computer sees) when you work with the drive is a simpler fixed number of sectors per track.  Below the surface things are much more complex.  And the diagram of the hard disk platter above is necessarily greatly simplified.  In reality the coding. etc. is much more complex then discussed here, and there are many more tracks and sectors on modern hard disk drives--you certainly cannot see them.

Gaps from Mueller--> Low-level formatting creates and demarcates data sectors (or blocks)--writes to the servo sectors and puts spaces between the data sectors.  This together with servo formatting allows the heads to read and write data to and from the desired data sectors as they whiz by.

Logical Geometry

Add more detail from Mueller et al-->  Most data sectors are about 600 bytes long and are divided into a prefix region, a data region, and a suffix region.  512 bytes are used for data.  The low-level format writes format information to the sector prefixes and suffixes.  The prefix region identifies the start of a sector and contains its number.  Most hard disks have defects on their platters where data cannot be reliably stored.  The low-level formatting process detects  these defects in a write/read surface scan of the drive, saves them in a defect list identifying the offending sectors, and writes bad sector information into the suffix regions of viable sectors--marks bad sectors as such.  A check-sum used to verify the data in the data area is recorded in the suffix region of good sectors. A fixed value is repeatedly written to the data region.

In the "old days," we had to low level-format all hard disk drives and manually enter the defect list using the DOS debug program to talk to the controller's BIOS.

All current IDE drives are low-level formatted when manufactured and should not require a low-level format again.  It shouldn't be attempted on modern drives unless specifically directed by the manufacture's representatives.  An unusable drive can result.  In many cases manufacturer-specific software/hardware has to be used to low-level format a hard disk drive.

Electronics - cache'

In summary, when we buy a new hard disk drive it has been servo formatted, low-level formatted, and otherwise "magically" transformed by the manufacturer and electronics into a "black box" with its cylinders, heads, and sectors printed on a label on the top of the drive.  Those parameters are pretty much "fixed in concrete," and they are what we deal with when installing a hard disk drive.

LARGE BLOCK ADDRESSING (LBA).  Most operating systems (e.g., Windows) are limited in the maximum number of cylinders and sectors they can address.  Most modern hard disk drives exceed those limitations.  Most computer BIOS's (Basic Input Output System--a program on a chip on the motherboard which manages the computer's innards below the operating system) couldn't care less.  Most current motherboard BIOS's solve this problem with LBA. 

HOMEWORK.   Before plunking-down the cash to buy that new hard disk, it is advisable to do some homework.  First, check with the motherboard manufacture's web site to see if will support the hard disk.  Some older computers have a problem with drives greater than 8.4 GB. The BIOS may need to be flashed or replaced.  If you BIOS LBA

If your version of Windows older than Windows 95 OSR2 (see http://duxcw.com/digest/Howto/software/winver.htm), you will have to divide your drive into 2 GB partitions (see below) each with a logical drive (C:,D:,E:, F:, and G:). If you have an old version of Win 95, now is probably a good time to upgrade to Win 98/98 SE.

Determine if you have a place to mount the drive in your computer.  If you only have 5 1/4" drive bays open, you may need a 3 1/2" to 5 1/4" mounting kit.

Your new drive and old drive should be installed on the same cable, the one going to the primary IDE interface on the motherboard. If one of the drives is put one the same cable as your CD-ROM, the CD-ROM could slow it down. Is the cable long to reach both drives? You can plug either end of the cable into motherboard (in fact, you can plug anyone of the three connectors into the motherboard. The cable does have three connectors, doesn't it? The cable should not exceed 16” in length. The red stripe goes towards pin 1 on the motherboard and drives. Check to see if you have enough drive power connectors on the power supply. You may need a Y connector. Obtain the jumper settings from the manufacture’s web site for your old drive if they aren’t on the drive itself. I would run a virus scan on the old drive and any floppies used to install software.

Your new drive should be your C: drive. It is probably faster and is newer than your old drive. If you decide to make the new drive your C: drive, you need to decide if you are going to move everything from the old drive to the new one or do a complete reinstall.  A new install is probably best, but that means you will have to reinstall all of your old software and hardware drivers. You will need to be sure that you have all of software and drivers to do that. You may want to download all of the most recent drivers for your hardware to you old hard disk where they will be available during the final installation on your new drive. If you are going to copy your old drive to your new one, you should obtain and learn how use a software utility, such as Partition Magic (http://www.powerquest.com/partitionmagic/index.html) or Ghost, capable of copying an image of your old drive to your new one. XCOPY just does not do a good job of coping Windows to a new drive.

I’ll assume you have decided to install your new drive as the C: drive and do a new install of Windows. Read the following articles for instructions:

http://duxcw.com/digest/Howto/software/windows/upgrade/intro.htm
http://duxcw.com/digest/Howto/software/windows/cabs/movecabs.htm
http://duxcw.com/digest/Howto/buildcom/athlon/index.html (Parts 5,6,7, and 8)

Be sure you old drive is completely disconnected when doing this so you won’t accidentally scrub your old drive and that your new drive is jumpered for Master with no Slave present. Set your CMOS to auto detect the C: drive. After parting, formatting, and installing Windows, shutdown the computer, jumper the new drive as a Master with Slave present (some drives like Maxtor don’t have this setting and no change is required), the old drive as a Slave, connect both drives, and boot-up the new drive to Windows. Be sure your Windows Explorer is configured to show hidden folders and files and use it to copy everything from the old drive except the root (\) directory and the Windows Directory (folder). You can also search for and copy your Internet favorites and cookies from the Windows folder on your old drive to corresponding folders on your new drive. Reinstall all of your software and Internet configuration. The software should find your data if you reinstalled in the default/same locations. Guess with a little more work I’ll have my article… I hope this helps and that others will extend their advice.

 

I would leave the old drive alone for a while until you are sure everything is working ok with the new one. You can then fdisk it (be absolutely sure you have the right drive when doing this or disconnect the new one and temporarily set the old one as a Master) for large disk support (FAT32) if it was setup with an older version of Windows/DOS (FAT16) and format it. It will then be useful for backing-up you data on the new drive with Microsoft Backup which is included with windows (you may have to install it as it not part of the default Windows install).

Windows 98 Second Edition (SE) OEM (Original Equipment Manufacture--a company that builds computers, etc.) was installed on this particular computer.  I can see no reason why any version of Windows 98 would not work.

Windows 95 should work also, but I have not tested Windows 95 with a 650 Mhz Athlon processor (old versions of Windows 95 do have a problem with AMD K6 CPUs which are faster than 350 Mhz). Besides, because of the size of the hard disk, you would want to use Windows 95 version OSR2 or later with large disk support (FAT32).

If you have an older version of Windows 95 or even Windows 3.X or Windows for Workgroups, you should be able to install the Windows 98 or Windows 98 SE upgrade on this computer.  See How to Install the Windows 98 Upgrade on a New Hard Disk for instructions.

One can use an OEM Preinstall floppy to install Windows 98 SE OEM on this computer. Or one can use a Windows 98 Startup Disk to install the OEM or upgrade versions of Windows 98/98 SE.  Windows 95 OEM and upgrade versions can also be installed in the same manner with appropriate OEM Preinstall or Startup floppies.  Finally, the Windows 98 OEM and Windows 98 SE OEM CDs are bootable and can be installed without a Preinstall or Startup Disk with this motherboard.  The CD boots to the same menu found on the Startup Disk.  The Windows 98/98 SE Upgrade CDs are not bootable.

HARD DISK PARTITIONS.  Now, we are going to jump out of basic theory into the realm of more immediately useful stuff,,,,  A third level of formatting, high-level formatting or disk operating system (DOS) formatting, as described later in this article, must be done before the drive can be used by Windows.   However, before this "high-level" format can be accomplished, the hard disk has to be defined so the operating system (Windows, etc.) can use a program to format it.  It has to be divided into one or more areas known as partitions.  When a hard disk is partitioned information defining the beginning and ending cylinder, head, and sector locations is written to the first sector on the hard disk; i.e., cylinder 0, head 0, and sector 0.

The first cylinder is physically located closest to the spindle.  Head 0  is on the top of the top platter.  The landing zone is the outermost cylinder.

The partition information is in the "boot sector," but it is also known as the boot track, boot record, or master boot record.  The master boot program is also located on the boot sector.  It reads the partition information and transfers the boot-up process in the computer to the partition on the hard disk which has been made "active."  More on that latter.   Windows partitions are made with the FDISK.EXE program which comes with Windows (and DOS, etc.).

More than one operating system can be put on a hard disk (e.g., Windows and Linux) by making more than one partition and putting an operating system on each one of them (see our Windows FAQs).  The operating system on the currently active partition is the one that will boot.

 

 

I would suggest partitioning (see below) the hard disk drive into at least two partitions for greater efficiency.   It would take an awfully long time to defrag a 27.3 GByte C: drive.  The hard disk in this computer was partitioned into a 4 GByte C: drive and the remainder of the drive was partitioned as the D: drive.

1.  Boot the computer from a Startup Floppy or Directly from the Windows 98/98 SE OEM CD...

Startup floppy.  Using the instructions for making a Windows Startup Disk (I used the manual or custom version of the floppy) make the floppy, put it in the floppy drive, and turn on the computer.  It should boot-up to the floppy drive and display a menu (see below).

I did it this way because I already have Startup Floppies as part of my shop tools.  The Toshiba DVD drive will work with the stock driver on the Startup Disk.

Win 98 CD.  This is the easiest thing to do for those you who do not have a Startup floppy .  Turn on the computer, press the Delete key to get into the CMOS Setup, select Advance BIOS Features, press the Enter Key, Select First Boot device, use the Page Up/Down keys to Select CDROM, Esc to the Main Menu, select Save & Exit Setup, put the Windows 98 CD in the DVD drive, and press the Y key to exit the CMOS Setup and reboot.  The computer should boot to the following menu:

  1. Boot from Hard Disk

  2. Boot from CD-ROM

Select 2.

The computer will boot to a second menu:

  1. Start Windows 98 Setup from CD-ROM

  2. Start Computer with CD-ROM support

  3. Start Computer without CD-ROM support

If you booted from the floppy, it should display a similar menu, depending on the method you used to make the Startup Disk.

In both cases, select 3.

If you select 1., the hard disk will fdisk'd with one giant partition.  It will reboot, format the drive, and install Windows.  This is not recommended for a drive this large or for any drive over 4.3 GB.

The computer will display the DOS prompt on drive A: (If you booted to the CD, A: is really part of the CD-ROM):

A:\>

2.  Use FDISK to create a new partition on your new hard disk as follows:

A:\>fdisk

Will produce the following screen:

Your computer has a disk larger than 512 MB. This version of Windows includes improved support for large disks, resulting in more efficient use of disk space on large drives, and allowing disks over 2 GB to be formatted as a single drive.

IMPORTANT: If you enable large disk support and create any new drives on this disk, you will not be able to access the new drive(s) using other operating systems, including some versions of Windows 95 and Windows NT, as well as earlier versions of Windows and MS-DOS. In addition, disk utilities that were not designed explicitly for the FAT32 file system will not be able
to work with this disk. If you need to access this disk with other operating systems or older disk utilities, do not enable large drive support. [this is usually not a problem]
Do you wish to enable large disk support (Y/N)...........? [Y]

3.  Push the Enter key to accept the default [Y] for FAT32.  You will get the following menu:

FDISK Options

Current fixed disk drive: 1

Choose one of the following:

1. Create DOS partition or Logical DOS Drive
2. Set active partition
3. Delete partition or Logical DOS Drive
4. Display partition information


Enter choice: [1]


Press Esc to exit FDISK

4.  Press Enter to select the default [1].  The following screen will be displayed:

Create DOS Partition or Logical DOS Drive

Current fixed disk drive: 1

Choose one of the following:

1. Create Primary DOS Partition
2. Create Extended DOS Partition
3. Create Logical DOS Drive(s) in the Extended DOS Partition


Enter choice: [1]


Press Esc to return to FDISK Options

5.  Again, press Enter to select the default.  The following will be displayed

Create Primary DOS partition

Current fixed disk drive : 1

Verifying drive integrity, xx% complete.

Current fixed disk drive: 1

Do you wish to use the maximum available size for a primary DOS partition
and make the partition active (Y/N) ....................? [Y]

At this point you can press the Enter key and make the entire drive one partition, your C: drive, or enter N and make a partition which occupies less than the entire drive.  I parted this drive into a 4 GB C: drive and allocated the rest of the drive to the D: drive.  The menus are quite self explanatory for accomplishing this task.   You will also want to create an Extended DOS partition and assign logical drive D: to it (fdisk should do that automatically after the partition is created).  You must exit fdisk and reboot after creating each partition.  Only one of the partitions can be active.  The active partition is the one which will boot after Windows is installed.  Make sure the primary partition is Active by displaying the partition information. 

HIGH-LEVEL FORMATTING.  Once the hard disk is partitioned and a partition is made active,  the partitions must be high-level formatted for the operating system that will use them.  The Windows FORMAT.COM is used to accomplish this process.   A high-level format further defines the the partition on a hard disk.

After creating the partitions and making sure the primary DOS partition is active, reboot the computer to the Startup Floppy or CD-ROM,  select Start Computer with CD-ROM support, and format the C: drive as follows:

Startup Floppy...  A:\> format c:

CD-ROM...

A:\> d:

D:\> cd win98

D:\> format c:

Do not use the /s flag with the format command.  We do not want to transfer the system files from the floppy to the hard disk.  Windows 98 will not install on the hard disk if it already has the system files on it.

Get a cup of coffee...

6.  Repeat for the D: drive.  Get two cups of coffee.

We can install Windows 98 from the CD or we can copy the requisite files to the hard disk and install it from the hard disk.  The first method saves about 110 MBytes of hard disk space.  The second has the advantage that the CD is not required every time windows needs a driver, etc. such as when changing the network configuration.

7.  First method.  To install using the first method, boot to the Startup Floppy or Windows CD as described in Part 7.  With the CD you can simply select the first choice in the second menu, but that is not the way I do it because part of that process is to make a Startup floppy which takes time.  So, select "2.  Start computer with CD-ROM support" from the menu to get to the DOS prompt. 

8.   Since we formatted two partitions on the hard disk in Part 7, the CD-ROM should now be drive E:  Change the current drive to drive E:, change directory to \win98, and start the Windows Setup as follows:

A:\> e:

E:\> cd \win98

E:\win98> setup /ie

The ie flag tells setup not to make a Startup floppy.  Don;t run setup from E:\

9.  Second method.  To install using the second method and to use a convention that is in common practice, make a windows\options\cabs directory on the hard disk, copy the files in the e:\win98 directory to it, and run setup from the hard disk as follows:

A:\> c:

C:\> md windows

C:\> cd windows

You can type cd and use the F3 key to repeat the rest of make directory command to speed up changing to a directory you just created.

C:\WINDOWS> md options

C:\WINDOWS> cd options

C:\WINDOWS\OPTIONS > md cabs

C:\WINDOWS\OPTIONS > cd cabs

C:\WINDOWS\OPTIONS\CABS > copy e:\win98\*.*

This copies a bunch of cab files, etc. to the hard disk.

C:\WINDOWS\OPTIONS\CABS > setup /ie

You may want to be non-conventional and move the cab files to the D: drive which has a lot of space; e.g., D:\win98cab.

10.  After setup runs scandisk you can simply Exit scandisk.  I wouldn't bother doing a surface scan at this point; it would take a very long time.

11.  Shortly thereafter, with this method, setup will discover there is already a windows directory and suggest installing windows in another directory: c:\windows.000.  Do not let it install windows in the c:\windows.000 directory; you want it in the c:\windows directory.  Choose select another directory, Backspace four times to remove ".000" and ignore the setup warning about overwriting stuff in the Windows directory--it won't in this case.

12.  Complete the Windows installation selecting setup defaults and following setup instructions.  I won't elaborate.  The process is simple, straight forward, and requires no cookbook instructions.  Unless something is defective, you should not encounter any Windows setup problems with this motherboard and the other items in the bill of materials.

13.  After Windows is installed and the computer has rebooted for the last time, insert the CD which came with the motherboard.  Wait until the menu is displayed and install the AM K7 INF update.

14.  This install will erroneously leave an unclosed DOS window.  Hold the Ctrl and Alt keys and press the Delete key to display the Windows Close Program window and click the End Task button to close DOS window.  This will also reboot Windows.

15.  After the reboot, Windows will install several drivers.  Just click the Next button through the process and then click Yes when it prompts for a reboot.

16.  If you were booting to the Windows CD instead of a Startup floppy, reboot the computer, press the Delete key to get into the CMOS Setup, select Advance BIOS Features, press the Enter Key, Select First Boot device, use the Page Up/Down keys to Select Floppy (or HDD-0), Esc to the Main Menu, select Save & Exit Setup.

Notes:

1.  The analogy of the hard disk heads flying like airplane is quite correct.  The heads are moving relative to the platter if the observer is on the platter.  The behavior is similar to a model airplane in a wind tunnel.  The aerodynamics are the same.

2.  From history reference "First disk drive to use low-mass heads, lubricated disks, and sealed assembly, which came to be known as Winchester drive technology and set the industry standard for the next decade. The 3340 Winchester drive featured two spindles with a storage capacity of 30 million characters each, hence 30-30, or 'Winchester.'"

3.  From Seagate  This is called STIR (seek to improve reliability). This is designed to prevent the heads from remaining in any given position for extended periods of time. Since the heads are flying a very short distance above the media, and are flying on a cushion of air, the compression of the air beneath the head does impart a small amount of heat to the media because of the friction involved. If the heads remained over a cylinder for extended periods of time, the heat build-up on the media in a small localized area could degrade the media in that particular locality. So, periodically during idle, the heads will be moved to another cylinder and the servo recalibrated for all heads. This is perfectly normal.

Larry

Please see our CONTACT page if you have any comments or corrections that would make this article better.  Please use our Forums if you need help with a computer or network problem.

References

Technical Committee T13 AT Attachment

1.  Upgrading and Repairing PCs, Sixth Edition, Scott Mueller, Que  (Believe it is in the tenth edition now; more detail than presented here)

Interesting stuff about boot sectors.

The Enhanced IDE/Fast-ATA FAQ

The Anatomy of Hard Disk Design by Albert Dayes (detailed stuff, but interesting)

Whys and wherefores of formatting hard drives by Brian K. Lewis (short and well-written)

Basic Description of Banded Sector Servo IBM

No-ID sector format IBM

The era of giant magnetoresistive heads by Jim Belleson, IBM Storage Systems Division, & Ed Grochowski, IBM Almaden Research Center

A history of IBM "firsts" in storage technology

Ultra ATA/66 Extends Existing Technology While Increasing Performance and Data Integrity Western Digital

Copyright, Disclaimer, and Trademark Information Copyright © 1996-2006 Larry F. Byard.  All rights reserved. This material or parts thereof may not be copied, published, put on the Internet, rewritten, or redistributed without explicit, written permission from the author.