Studying for the A+, Network+ or Security+ exams? Get over 2,600 pages of FREE study guides at CertiGuide.com!|
Join the PC homebuilding revolution! Read the all-new, FREE 200-page online guide: How to Build Your Own PC!
NOTE: Using robot software to mass-download the site degrades the server and is prohibited. See here for more.
Find The PC Guide helpful? Please consider a donation to The PC Guide Tip Jar. Visa/MC/Paypal accepted.
|Take a virtual vacation any time at DesktopScenes.com - view my art photos online for FREE in either Flash or HTML!|
Tired of the boss? Ever wanted to be an independent freelancer? Not sure how to get started?
The all-new Online Freelancing Guide can help. Tons of useful info, and it's free! Join the online freelancing revolution today.
Drive Letter Assignment and Choosing Primary vs. Logical Partitions
Most people know that disk volumes using the DOS or Windows operating systems are accessed using drive letters, such as C:, D: and so on. However, it can be a bit confusing trying to figure out how these letters are determined! Of course, as you use more disks (and other devices) and more partitions, this can get even more difficult to understand. A common confusion encountered by someone upgrading a PC is adding a hard disk to it and finding that suddenly some their files have moved from D:, say, to E:. This happens because the operating system assigns drive letters using a specific sequence when the PC is booted. Drive letters are not permanently assigned to the drive, so adding new hard disk volumes can interrupt the previous order the next time the machine is started.
Drive letters A: and B: are reserved for floppy disks. The first disk, as determined by the physical and/or BIOS configuration of the drives is A:, and the second disk is B:. Even if there is only one floppy disk in the system, B: is still reserved for use by floppies--some other removable drives may be able to use it, but it cannot be assigned to hard disk volumes.
Hard disks are lettered starting from C:, with each partition getting a separate letter. It is essential to realize that the system will first assign a letter to all primary partitions on all hard disks in the system, before it will assign any letters to any logical volumes (in extended partitions) on any hard disk. This is the primary reason why adding a hard disk to an existing system can cause drive letters to shift. (To understand the difference between primary partitions and logical volumes, see here).
Let's take an example system that contains a single 1.2 GB hard disk broken into three partitions. The first partition is the primary, and then an extended partition is defined containing the other two partitions as logical volumes. The primary partition will be C:, and the other two D: and E:. Now let's say we add a second hard disk that has two partitions itself, one primary and the other logical (extended). When the system is booted up with the new hard disk in it, the first hard disk's primary partition will still be C:, but the primary partition in the second hard disk will grab D:. Then the extended partitions will be assigned letters. The result is that the logical partitions on the first hard disk will have their letters shift:
Having drive letters change is not only confusing, it can cause programs to malfunction, because many applications record what disk and directory they are in and expect that they will remain stationary (which stinks, but hey, that's life.) The rise in importance of the Windows registry has made this situation even worse, since programs routinely record pointers to files, including drive letters, in the registry.
There is one relatively simple way to avoid having this letter-shifting happen: don't create a primary partition on any hard disks in the system other than the first one. It is perfectly legal to only create an extended partition on a hard disk, and put all of the partitions in it. The only place that a primary partition is absolutely needed is on the first hard disk, because it is required to boot the operating system. You cannot normally boot from an extended partition volume anyway (although some motherboards may let you).
Note: One other minor
consideration is that you lose a small amount of disk space if you create only extended
partitions on a disk. The extended partition will begin using (logical) cylinder 1 of the
disk, and therefore you lose the space in cylinder 0. This will generally cost you a
handful of megabytes of storage, but is pretty much unavoidable if you want your
partitions in a sensible order.
In the example above, if our second hard disk had its two partitions both defined as logicals, then they would have been assigned F: and G:, and the partitions on the first disk would have been unchanged. This is in fact the way you will normally want to partition second and third hard disks in a system. What if you are adding a hard disk from another system that has already been set up with a primary partition? Unless you don't care about the second hard disk's primary partition being assigned D:, you have to delete the primary partition (after copying any data from it of course!) and expand the size of the extended partition to take its place. For a job of this sort, a utility like Partition Magic is indispensable: it can convert a primary partition into a logical volume. Otherwise you will basically have to wipe the second disk clean and start over.
Once all of the hard disk partitions have been assigned drive letters, the system will allocate letters for other devices that are operated using drivers. Devices like CD-ROM drives, DVD units, Zip drives, etc. are operated through software drivers that present the device to the operating system as if they were a disk, and then they are assigned a drive letter so they can be accessed. Normally, these devices are assigned a letter immediately after the last one used by hard disks, but their assignments can be changed by using different parameters for the driver software. For example, the drive letter for a CD-ROM drive under Windows can be set in software using the Device Manager. You cannot do this for hard disks under Windows 9x/ME.
Finally, some software programs can change drive letters. A very common example is the use of disk compression agents such as DriveSpace. These will often take a hard disk, say D:, change its letter to something out of the way like R:, create a compressed volume on R:, and then map the compressed volume back to D:. The net result is that the disk is compressed while appearing to still be uncompressed.