Hard Drives and Operating Systems

 < Day Day Up > 



For it to store and retrieve data on a hard drive, and keep track of multiple partitions and multiple drives, significant portions of OSs have to be dedicated to managing hard drives. A partition is a portion of a hard drive recognized by the OS as a separate and complete entity; it is not the divider between these portions as the name suggests.

File Systems

The OS has to have a method of storing and organizing files on a drive. There are different file systems used by Windows and DOS to serve that purpose:

File Allocation Table (FAT): Better known today as FAT16 for its 16-bit file storage, this is the original DOS and Windows file system. Its storage efficiency is the lowest of all file systems in use and it is highly susceptible to fragmentation (portions of files spread out all over the drive resulting in slow performance and additional wear). Additionally, FAT16 limits file names to eight characters plus a three-character extension. The maximum partition size for FAT16 is 4GB. FAT16 is the only file system accessible in all versions of Windows and DOS, and is the only file system usable by the original version of Windows 95 and older. It is also the file system for floppy disks.

FAT32: FAT32 stores files more efficiently than FAT16 and has support for long filenames. FAT32 drives can be read by every version of Windows since the second version of Windows 95 (except for NT 4.0), and is the default file system for 98 and Me. The maximum partition size for FAT32 is very large, although there is a 32GB limit in Windows XP.

NTFS: The original version of NTFS was introduced with Windows NT. A newer version was introduced in Windows 2000, and it is the default file system for 2000 and XP. NTFS is somewhat resistant to fragmentation and allows for many of Windows 2000 and XP's security features not available in FAT16 or 32. The maximum size for an NTFS partition is two terabytes (TB), which is 240 bytes, or 2048GB. Windows 9x and DOS cannot use NTFS.

To select a file system for a hard drive, you have to format the drive. When installing Windows 9x, you can use the DOS program FDISK, covered later in this chapter. When installing 2000 or XP, the OS setup program provides this service. You'll be shown a graphical display of all the hard drives installed on the system, and you'll be given your choice for installation of the OS. You'll also have the choice of file systems, and NTFS will be recommended.

Partitions and Drive Letters

Here are definitions of the terms used in this area:

Active partition: This is the partition that needs to contain the OS's boot files because the BIOS looks to this partition for them. You can, however, designate any partition as the active partition; if it is the wrong one, the computer won't be able to boot from the hard drive.

Basic disk: A physical disk that is accessible by any version of Windows.

Dynamic disk: A disk used in 2000 or XP that can use special features such as logical disk volumes that span more than one physical disk.

Extended partition: A partition that can exist only on a drive containing the master boot record. An extended partition does not get a drive letter. To use an extended partition, you must create one or more logical drives on it; logical drives are assigned drive letters. There can be only one extended partition on a physical disk and you cannot install an OS on an extended partition. The only reason to create an extended partition is if you want to have more than four partitions on a physical hard drive.

Logical drive: A partition created on an extended partition. A logical drive can be assigned a drive letter.

Master boot record (MBR): The area on a hard disk that contains boot files; this is the first sector on the disk.

Physical disk: A hard drive.

Primary partition: A partition that functions as a physically separate disk. You can create up to four primary partitions on a physical disk that contains the MBR, or three if you create an extended partition also. Primary partitions normally are assigned a drive letter by the OS.

Volume: Any area on a hard drive that has a drive letter assigned to it.

The most important thing to know here is that you must designate a partition as active in order to boot from it. However, the other items are likely to come up at some time or another.

Drive Letters

In a PC, physical disks are designated a number starting from 0. Primary partitions, logical drives, optical drives, and network drives are assigned drive letters between C and Z (a network drive is a folder or drive on another computer on a network that can be accessed as if it were a local partition on the hard drive). A and B are reserved for floppy drives. The order of automatic letter assignment is as follows:

  1. The first primary partition on drive 0 gets C.

  2. Subsequent primary partitions on any drive get D, and so on.

  3. Logical drives get the next available letters.

  4. Optical drives get the next available letters.

  5. Network drives get any available letters.

    Note 

    This lettering system can cause the following complications: suppose drive 0 has one primary and one extended partition with one logical drive. Drive 1 has one primary partition. Because primary partitions come first, the primary partition on drive 0 is C, the primary partition on drive 1 is D, and the logical drive on drive 0 is E. Furthermore, if you add a second hard drive to a system with a logical drive on drive 0, the new primary partition takes the drive letter formerly held by the logical drive.

OS Hard Drive Control and Configuration

There are several Windows and DOS programs and commands to use to control and configure hard drives. When you are dealing with the only hard drive on a system, you are limited to what you can do in Windows. The reason for this is that Windows files are in use. In many cases, major changes won't be made until the computer is rebooted. The following sections are overviews of the programs.

FDISK

FDISK is a program that runs in DOS, and is useful mainly in 9x. Very old versions of FDISK aren't compatible with FAT32; if you run into this problem, it shouldn't be difficult to obtain a newer version from a Windows 98 or Me boot disk. No version of FDISK is compatible with NTFS. FDISK allows you to view partition information, create or delete a partition or logical drive, and set a partition to active status. FDISK is available on all 9x boot floppies, and in 95 and 98 by booting to DOS from the hard drive. When you get the command prompt, type FDISK. The first thing you'll see, unless you have a tiny hard drive, is a message asking if you want to enable support for large disks (larger than 504MB). Always answer yes (Y) to this prompt. The main menu then appears. You should usually start by viewing partition information by selecting number 4 from the menu. If you are installing a new hard drive, partition the drive as desired. Unless you have a compelling reason to have multiple partitions, such as setting up a dual- or multiple-boot system, create a single partition.

Note 

Partitioning with FDISK effectively deletes all data on the drive. If you are working with a used drive, make sure that the data is either backed up or unneeded before doing anything with FDISK other than viewing partition information or setting the partition as active.

FORMAT

Once you have completed partitioning with FDISK, your drive is not yet usable. The drive must be formatted with a file system. You do this with the FORMAT command. From the DOS command prompt, type FORMAT. For a list of switches, type FORMAT /?. Here is the syntax to use when formatting the C drive as FAT32:

FORMAT C: /FS:FAT32

After you press <Enter>, drive C, as shown in FDISK's partition information, will be formatted as a FAT32 partition. This will take some time, but when it is done, the partition will be usable. If you have set it active, you can install Windows on it. If you haven't set it to active, you can always run FDISK again and do so.

Note 

Any time you format a partition you necessarily delete all data on it. There are, however, programs such as Norton Unformat that can sometimes retrieve data from a formatted drive.

CONVERT (2000 and XP Only)

CONVERT is a command available in 2000 and XP that is used to convert a partition from FAT or FAT32 to NTFS. This is done in Windows at a command prompt. This cannot be undone in Windows without formatting the drive and deleting the data, although third-party software such as PartitionMagic® can be used to convert the file system back to FAT or FAT32 while preserving the data. The syntax to convert drive C to NTFS is as follows:

CONVERT C: /FS:NTFS

Press <Enter> and if the drive is in use, the conversion will occur at the next reboot; otherwise, it will start immediately.

My Computer

My Computer is available in all versions of Windows. If you select a partition and right-click it, you can perform a few tasks, which vary a bit from version to version. If you select Format from the menu that appears, you can format a partition. Naturally, you won't want to do this on a drive that you want to continue using, as this will delete all data on it. If you select Properties from the menu, the General tab shows you a pie chart showing used and free space on the drive. If you see a check box to enable DMA support, select it. DMA is a system that increases performance by reducing the amount of work done by the processor). If the drive doesn't support DMA, the box will be cleared at the next reboot. The Tools tab gives you access to error checking (ScanDisk), backup, and defrag programs.

Disk Management (2000 and XP Only)

All available disk-related tasks can be done in Disk Management. You can get there through Administrative Tools in Control Panel, and opening Disk Management from Computer Management, or by right-clicking My Computer, selecting Manage from the menu that appears, and opening Disk Management from Computer Management. This will show you a graphical depiction of all disks and partitions on your system. Note that by right-clicking a drive, you have access to certain commands, as shown in Figure 6.3.

click to expand
Figure 6.3: Disk Management on a simple Windows 2000 system.

If you make any changes in your disk configuration, make sure to edit the boot.ini file to match your changes. This can be a complicated procedure, but if you don't, the computer probably won't boot afterwards. The only way to boot the computer after this happens is to use a Windows XP/2000/NT boot disk, with the boot.ini file on it edited to match the new disk configuration. Fortunately, Windows will remain intact. For information on making a boot disk for 2000 and XP, and on editing the boot.ini file, see Chapter 11, "Troubleshooting."

Disk Tools: ScanDisk, CHKDSK, and Defrag/Disk Defragmenter

We discussed these tools in Chapter 2, "System Configuration and Computer Hygiene."



 < Day Day Up > 



PC Repair and Maintenance(c) A Practical Guide
PC Repair and Maintenance: A Practical Guide (Charles River Media Networking/Security)
ISBN: 1584502665
EAN: 2147483647
Year: 2004
Pages: 175

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net