Understanding Computer Hard Drives The hard drive in your computer is where you store your programs and data until you are ready to run them. If you understand them, you will appreciate them so when you want to make a change or when something goes wrong, you are better prepared. Background Over the years, hard drives have changed. Types and interfaces have changed, sizes got larger, and drives got faster. Older drives are not compatible with new ones. For this reason, you should understand some technical details, but I'll make it simple. Early hard drives used MFM interfacing. MFM hard drives required MFM controllers. MFM hard drives used 2 cables, a 20 pin and a 34 pin cable to connect them to each other. Drive sizes were usually 10, 20, 40, or 80 Megabyte in size. There were some industrial larger ones. RLL technology evolved and allowed a 50 percent increase in hard drive size if a special controller and ruggedized version of the hard drive was manufactured. These drives were usually 30 or 65 megabyte in size. They also used the same cables. Controllers were not interchangable unless you used a RLL drive on an MFM controller for base capacity. Two drives could be connected to a controller. A SCSI hard drive was the first large hard drive type. There were some small ones made for special applications. It used a 50 pin cable to interface with the controller. They usually were faster drives. Up to 7 hard drives or other SCSI devices can be connected to a single controller. An IDE hard drive is presently the most popular type of hard drive. Most of the controller electronics is actually on the hard drive and only a host or simple interface is required unless special features are added. IDE hard drives use a 40 pin cable to interface with the host interface. Only 2 drives may be connected to a host interface, a master and a slave. Makeup Hard drives have a metal platter or groups of platters that are magnetically coated. A pickup head glides over each platter, not touching them, but extremely close over them. The distance is less than a dust or even smoke partical. Drives are sealed airtight so nothing can get in or out. They should never be opened except in a "clean room". These platters spin at a very high speed. Precision electronics makes the head glide back and forth over the platter so every part of the platter can be accessed as the drive spins. Each group of heads moves back and forth over each platter in the case of multiple platters. Electronic signals indicate which head is in operation at any one time. Hard drives must be prepared electronically to use. There are several steps. The first process is a low level format. This process used to be done in the field on older drives, but should not be done in the field with newer IDE drives. It should only be done at the manufacturer. This process places an electronic address at the start of each electronic sector. Each platter and each side of each platter has electronic cylindrical tracks and tracks are divided up into sectors, each with a unique address. Data is stored in these tracks and a table or type of address book keeps track of what is stored in each sector. The second procedure in hard drive preparation is writing a partition table. Hard drives can be divided into virtual separate hard drives, each with a drive letter if desired. Even if only one large partition is desired, the partition procedure is done. This writes a master boot record at the first location of the hard drive. This record contains some vital information on how the drive is setup, which is required by the operating system. One scrambled bit of data in this record can make the drive unreadable. The third procedure is high level formatting with DOS, the disk operating system. This verifies each track and cylinder and writes a FAT or file allocation table to keep track of all files. This command is "format c:". Usually, a DOS system is also placed on the hard drive at this same time. The command "format c: /s" places the operating system on the hard drive immediately after the format. When these 3 steps are completed without trouble, the hard drive should boot to a DOS prompt. DOS, the actual system is made up of only 3 files, 2 hidden and command.com. The other files placed in a DOS directory are called utility or external commands. Each group of programs should be installed into their own separate directory on the hard drive. Directories are like file folders to separate groups of programs or data. A properly setup system will have data in a separate file so the data can easily be backed up. Hard drives are very delicate. Jaring the computer while turned on can cause a head crash. The also die from other electronic failures including surges or power supply failures. Electronic noise can also scramble data. A power interuption will also scramble data. Static electricity from a computer operator will also cause computer or hard drive failure or data scrambling. For this reason, it is the responsibility of every user to backup data to a second source. System Configuration The computer configuration or setup must know the hard drive type or specific cylinder, head, and sector count in order to communicate with it. For instance, a 528 megabyte drive has 1024 cylinders, 16 heads, and 63 sectors. If the computer does not know this exact set of numbers, it can not communicate properly to address the drive at the right specific locations. In many cases, it is possible to set up a drive with different sets of numbers and make it work. In this instance, you must know exactly how the drive was originally setup or selecting an alternate set of numbers will destroy your data. For this reason, you must know the configuration information for when the built-in battery that retains the information dies. Adding a Second Hard Drive Adding a second hard drive can either be simple or a nightmere. Obtain a second drive of the same manufacturer as the first drive. Although you can sometimes get different manufacturers drives to work together, one or both usually fail prematurely when they are connected together. Don't start anything until you have a backup of your data from the first drive. Next make sure you have jumper settings for both the original drive and the new drive. Jumpers must be set on the drives to set them as either master or slave. This is what determines which drive is the first and which is the second. Then make sure you have the CMOS settings for the old drive. They are the type number, cylinder, head, and sector per track numbers. Your new drive will come with the numbers for the new drive. Record these numbers on a sticker on your computer. You wil never find separate notes in a panic when your system fails. If you choose to let a professional install your drive, beware, it is not his responsibility for lost data. You can loose data simply by transporting your computer for many reasons. It doesn't have to be the theft of the computer or a car crash either. If your new drive is over 528 MB in size, you will have to make a decision on how it will be installed. DOS does not accept drives over 528 MB unless there is a special controller or a BIOS update that will handle it. Newer BIOS' such as in 486 DX4 and Pentium computers have LBA mode to handle large hard drives. Drives over 1024 cylinders, 16 heads, and 63 sectors (528 MB) can not be addressed with out LBA mode or special software that will break the DOS rules and allow installation of the drive. This is not the best choice. Hard drives that use this software boot and run a tad slower and more importantly, tend to get scrambled occassionally. The software driver loads before DOS so it can communicate with the computer to make up a soft configuration. If anything messes up this driver, particularly during program installation, your data is not readily accessable. A "dynamic drive overlay" loads before the computer boots. If you require to boot the computer off a floppy, you get a message as to when to hit the spacebar to boot off the floppy. If you forget and boot with the floppy containing DOS without first hitting the spacebar, the overlay file can get corrupted. If corrupted, you can no longer boot off the hard drive. You might be able to recover if you made the special emergency boot disk, but you usually don't have it and panic. If you panic, you may end up loosing your data as you start the whole procedure over. If this new drive over 528 MB is the second drive, it will become more complicated. You can make it the first drive and your old drive the second drive. In this case, your programs may have to be reconfigured, unless you copy all programs to the new first drive.Follow the instructions that came with it. You must be sure of compatibility. Most modern hard drives are IDE type. You will need to make sure that if the first is IDE that the additional one is also. If you have an old computer, you could have an MFM, RLL, or SCSI type which is not compatible. Adding an additional drive to this type system can be done with special care and equipment. There are some computers that use ESDI hard drives. Be sure you know what you have and get. Jumpers are changed on each drive to tell it whether it is a Single, Master, or Slave drive. The CMOS will need the be changed, depending on which drive is which. An installation program may do one for you automatically, but sometimes it messes up the original drive. There is a BIOS extension board that plugs into a slot that will give your BIOS the ability to run "LBA" mode. This adds the capability to access drives over 528 MB. This is the better way to do your installation. Unfortunately, some computers will not let a larger that 528 MB LBA mode drive co-exist with a smaller drive and you may have to make a choice. In any case, FDISK will need to make a partition table on the new hard drive. Whatever you do, be careful of your choices as a wrong decision can wipe out your old hard drive. Format is just a dangerous. FDISK writes a boot sector with the information on how the drive will be used. Sometimes, a utility such as Disk Manager writes this. It's not called FDISK, but does the same thing. Choosing a new partition table on the wrong drive is disasterous. The format process verifies the sector addresses on the drive and builds the file allocation table. The system is placed on the drive immediately following the format. Watch what drive is selected. Hard drives are very delicate, more so when turned on and spinning. Use care that it doesn't get moved while turned on. In no case should you do a low level format on an IDE type hard drive. This is the format utility from your BIOS setup menu in some cases and can also be done from disk manager and other programs. You could destroy the drive before you start, by doing this. Re-Partitioning / Re-doing Hard Drives Hard Drives are repartitioned when you wish to change from multiple partitions to single partitions or visa versa. There are also occassions when after a virus attack or when you get rid of double space/stacker, etc that you should also follow this procedure. 1 Have a complete backup, preferably a tape, and verify it. Keep the tape safe so that nothing happens to it. 2 Make an emergency boot disk. a Put a new floppy in drive A and from the C prompt, type format a: /s b Copy important files from the DOS directory on C to A drive by typeing from the C prompt CD\DOS and copy SYS.COM A: Copy FDISK.COM A: and copy FORMAT.COM A: You might also copy the CHKDSK RESTORE BACKUP HIMEM and other commands that you may use regularly. c Verify your emergency boot disk by placing it again in the A Drive and rebooting the computer from the A drive. If you do not boot from A and get the A Prompt, either review what you were supposed to do here or get help because if this disk doesn't work, you are in trouble before you start. d Log to C drive and copy your comfig.sys and autoexec.bat to A drive and then rename them to config.baK and autoexec.baK so that they will not be used on boot up. f Do not rely on your original DOS disks unless you test them first and verify the DOS version against the version you actually have on the computer. Its still a good idea to have a separate emergency boot disk. This Next Procedure Will Erase Everything from the Hard Drive If you have more than one physical hard drive, special care must be taken in case you are only doing just one drive. Always have working backups of everything. Make sure you know which drive you are doing. 3 Run FDISK by typing it from either the C or emergency boot disk. Choose option 3 to delete all logical drives and partitions. You may have to do this several times to get whatever you have out. You want to show no partitions. Let the computer reboot with the emergency boot disk. This will write a fresh boot sector with the necessary information. 4 Run FDISK again and choose option 1 and remake the partition. You will choose option 1 several times or enter enter enter. You will notice that at one point it tells you after making the largest available partition the actual size. Make sure this corresponds to your hard drive size. If you were to already find a partition when you ran this the second time, you did something wrong. The computer will reboot again. 5 Run FORMAT C: /s and follow directions. 6 You should be able to reload your DOS utilities, configurations, programs and data from your backups. DO NOT USE FORMAT FROM THE BIOS Selection of the computer. This is a low level format and not a DOS Format and the low level format may destroy the hard drive.