1 / 61

Chapter 5

Chapter 5 Introduction to Hard Drives Managing and Maintaining Your PC Chapter 5A - Introduction to Hard Drives MENU Disk Organization FAT, DEBUG, VFAT, root dir Using DOS to manage drives Using Windows 3.X to manage drives Using Windows 95 to manage drives

issac
Download Presentation

Chapter 5

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Chapter 5 Introduction to Hard Drives Managing and Maintaining Your PC

  2. Chapter 5A - Introduction to Hard Drives MENU Disk Organization FAT, DEBUG, VFAT, root dir Using DOS to manage drives Using Windows 3.X to manage drives Using Windows 95 to manage drives

  3. Hard Drives - Physical Organization • Modern hard drives have two or more platters, or disks, that are stacked together and spin in unison • Read/write heads are controlled by an actuator and move in unison across the disks’ surfaces as the disks rotate on a spindle • Data is stored in tracks and sectors

  4. Hard Drives - Physical Organization Figure 5-1 Inside a hard drive case

  5. Hard Drives - Physical Organization • Each side of a platter is called a head • Each head is divided into tracks (or cylinders) and subdivided into sectors • The entire first cylinder is filled before the read/write heads move inward to the next cylinder

  6. Hard Drives - Physical Organization Figure 5-2 A hard drive with four platters

  7. Hard Drives - Logical Organization • To the OS, data is stored in a long list of clusters that are organized into files • The OS uses 2 tables to keep track of which clusters are being used for a file along with other file information such as filename, file length, and whether the file is read-only or a hidden file • The physical location of the file is tracked by the BIOS or device driver

  8. Hard Drives - Logical Organization Figure 5-3 How the operating system views the hard drive when managing a file

  9. Hard Drives - Partitions • The OS can partition the single physical hard drive into more than one logical drive, or partition • A logical drive is a portion of a hard drive that an OS views as and manages as an individual drive • Information about the logical divisions is stored in the partition table at the beginning of the drive

  10. Hard Drives - Partitions • When the drive is partitioned, the OS assigns a drive letter to the first partition, usually C • FDISK first creates a partition, then assigns drive letters to each logical drive and creates a boot record, FAT, and root directory for each logical drive

  11. Hard Drives - Partitions Figure 5-4 A single physical drive can be viewed by the operating system as one or more logical drives

  12. Drive Capacity • The number of sectors present on the drive determines the drive capacity • All sectors in a track hold 512 bytes • Most earlier drives had 17 sectors per track • Most drives today have more than 26 sectors per track • #tracks * #sectors/track * 512 = capacity

  13. Translation • Translation converts the addressing of sectors when the hard drive addressing system does not conform to what System BIOS expects • Translation is required: • When a drive uses zone bit recording • Does not use the same number of sectors per track throughout the drive • On large-capacity drives

  14. Zone Bit Recording Figure 5-5 Floppy drives and older hard drives use a constant number of sectors per track

  15. Zone Bit Recording Figure 5-6 Zone bit recording can have more sectors per track as the tracks get larger

  16. Large-Capacity Drives • Drives that exceed 1,024 cylinders and more than 528MB are “large capacity” and require an EnhancedBIOS • BIOS supports a hard drive as: • CHS (Cylinders, Heads, Sectors) or normal mode • Large mode (504MB to 1G), translation • LBA (Logical Block Addressing) mode

  17. CHS or Normal Mode • Cylinders, heads, sectors (CHS) mode is the traditional method used by BIOS to read from and write to hard drives by addressing the correct cylinder, head, and sector • Requires no translation • Limited to 1,024 cylinders, 16 heads, and 63 sectors per track • Maximum drive capacity of 504MB

  18. Large Mode • Large mode supports drives with a capacity from 504MB to 1 GB • A translation method • The location of the data on the drive is remapped to conform to the 504MB barrier • Then the address information is passed to the OS • A CMOS setting for this mode often reads either “large mode” or “translation”

  19. Enhanced BIOS or LBA Mode • Logical block addressing (LBA) is a translation method similar to the FAT • It sends an LBA number to the OS, which is correlated with a particular cylinder, head, and sector number • LBA 0 stands for cylinder 0, Head 0, and sector 1 • The OS views the drive as a long list of LBAs

  20. When BIOS Does Not Support Large-Capacity Drives • If you want to install a large-capacity drive on a PC whose BIOS does not support it, you can • Upgrade the BIOS • Upgrade the entire system • Use software that interfaces between the old BIOS and the new drive • Some drives come with disk manager software already installed

  21. File Allocation Table • The OS manages files on the hard drive using the FAT and a 2nd FAT copy • FAT contains one entry for each cluster • A file is stored in one or more clusters • How to determine the size of a cluster • Use the CHKDSK command • Use DIR to see how much disk space is available, create and save a one-character file, use DIR again to see the difference

  22. File Allocation Table Figure 5-7 FAT showing two files

  23. DEBUG Utility • DEBUG is a utility in DOS and Windows 95 that displays the hexadecimal values of the FAT and other areas of the hard drive • It is an editor • It can look at any sector on the hard drive or disk • It is a valuable aid for recovering data on a damaged disk or hard drive

  24. DEBUG Utility Table 5-1 Notepad and DEBUG are both Editors

  25. DEBUG Utility • These DEBUG instructions created the memory dump on the next slide: C:\>DEBUG Execute DOS DEBUG -L9000:0 2 1 1 Load into memory addresses beginning with 9000 from drive 2 (drive C), starting with sector 1 and reading 1 sector -D9000:0 Dump or Display the contents of memory starting at 9000

  26. DEBUG Utility Figure 5-8 Beginning of a FAT on a hard drive

  27. DEBUG Utility Figure 5-9 Second copy of FAT

  28. Virtual File Allocation Table • The VFAT helps Windows 95 accommodate long filenames • The filename and extension are stored in the root directory or a subdirectory list • Each entry is 32 bytes long, called a block • Long filenames require more than one block in the directory • When the OS allocates blocks for long names, it stores the information in the VFAT

  29. Virtual File Allocation Table • The VFAT records how many blocks are allocated to each file listed in the directory • It is a variation of the DOS 16-byte FAT • It is a virtualized 32-bit FAT; that is, it is not a real 32-bit FAT • Some DOS-based utility programs can damage the VFAT entries • The DEL command can leave the extra blocks for long filenames unavailable for later use • SCANDISK can recover these blocks, however

  30. Root Directory • The layout of the root directories for hard drives is the same as that for floppy disks • Total number of bytes for each file is 32 • Date and time are stored as integers • The OS creates the root directory when it formats the drive • Has a fixed number of entries • Immediately follows 2nd copy of the FAT

  31. Root Directory Table 5-2 Root Directory Information for each File

  32. Root Directory Table 5-3 File Attributes as Listed in the Directory Attribute Byte (Reading from left to right across the byte)

  33. Root Directory Figure 5-10 A root directory

  34. Root Directory Table 5-4 Example of FAT Entries for First Two Files in Root Directory

  35. Using DOS to Manage Hard Drives - Subdirectories • MKDIR (MD) command - creates a subdirectory within a directory • MD C:\GAME creates a parent directory named GAME on drive C • MD C:\GAME\CHESS creates a subdirectory named CHESS under the \GAME directory

  36. Using DOS to Manage Hard Drives - Subdirectories Figure 5-11 DIR of the \GAME directory

  37. Using DOS to Manage Hard Drives - Subdirectories Figure 5-12 Dump of subdirectory table C:\GAME

  38. Using DOS to Manage Hard Drives - CHDIR • CHDIR (CD) command - changes the current default directory • CD C:\GAME\CHESS Moves you into the CHESS subdirectory of \GAME • C:\GAME\CHESS> CD.. Moves you from the child directory CHESS to its parent directory GAME

  39. Using DOS to Manage Hard Drives - RMDIR • RMDIR (RD) command - removes the named directory • The directory must not contain any files or subdirectories • The directory must not be the current directory • RD C:\GAME\CHESS Removes the CHESS subdirectory of \GAME

  40. Using DOS to Manage Hard Drives - DELTREE & TREE • DELTREE command - deletes a directory and all its subdirectories • DELTREE C:\GAME deletes the directory GAME and any subdirectories it contains • TREE command - displays the directory structure of a hard drive or disk • /A option specifies test • /F option includes filenames in the list

  41. Using DOS to Manage Hard Drives - ATTRIB • ATTRIB command - Displays or changes the read-only, archive, system and hidden attributes assigned to files • ATTRIB +H filename Hides a file • ATTRIB -H filename Unhides a file • +R and -R options change the read-only status (+R prevents changes or deletes) • +A and -A options turn the archive bit on and off, respectively

  42. Using DOS to Manage Hard Drives - MIRROR • MIRROR command - Saves partition table information to a disk • MIRROR /PARTN • UNFORMAT command - Reverses the effect of an accidental format and repairs any damage to a partition table that has been previously saved with the MIRROR command • UNFORMAT C: and UNFORMAT /PARTN

  43. Using DOS to Manage Hard Drives - Batch Files • If you have a list of DOS commands that you will want to execute several times, you can save the list of commands in a batch file with the extension .BAT • Example of a short .BAT file: C: CD\UTILITY\TOOLS COPY *.* A:

  44. Using Windows 3.x to Manage Hard Drives • Windows 3.x File Manager performs most of the hard drive management tasks • When you first enter File Manager, you will probably see only the directories under the root directory • To see their subdirectories, click or double-click the directory name • From File Manager, Click File menu to see a list of file management functions

  45. Using Windows 3.x to Manage Hard Drives Figure 5-13 File menu in File Manager of Windows 3.1

  46. Using Windows 3.x to Manage Hard Drives • To create a new directory from File Manager • Click File menu • Click Create Directory • Enter the name of the directory, following the same rules as for creating a directory in DOS • Click OK

  47. Using Windows 3.x to Manage Hard Drives Figure 5-14 Creating a directory in Windows 3.1

  48. Using Windows 3.x to Manage Hard Drives Figure 5-15 A new directory called chess is created under \GAMES

  49. Using Windows 3.x to Manage Hard Drives • To delete a directory from File Manager • Click the name of the directory • Press the delete key • If the correct directory has been selected for deletion, click OK

  50. Using Windows 3.x to Manage Hard Drives Figure 5-16 Deleting a directory

More Related