PC Hacks 100 Industrial-Strength Tips and Tools Free Open Book

PC Hacks 100 Industrial-Strength Tips and Tools

Previous Section  < Day Day Up >  Next Section

Hack 51 Format Your Disk

figs/beginner.gif figs/hack51.gif

Lay down some awesome data tracks on diskettes, hard drives, Zip disks, or LS-120 cartridges with FORMAT.

Logical drives and drive letters are created by the process of formatting a partition so that it is ready to accept files. Formatting is done by either the DOS FORMAT program, within the Windows 9x-2003 setup processes, or within the Disk Management console in Windows NT-2003. FORMAT provides limited options: it either creates nonbootable disk space, creates a bootable disk, or it can quick-format (erase) a diskette. For hard drives, FORMAT will lay out either NTFS, FAT-16, or FAT-32 file structures, depending on the filesystem of the partition. For 3.5" diskettes, Zip, and LS-120 media, the filesystem will always be FAT-16.

FORMAT also establishes a single partition for portable media such as diskettes, Zip (100 and 250), and LS-120 media because they have limited storage capacity well below 512 MB.


In the process, FORMAT also establishes the logical drives or drive lettering scheme we use to refer to our drives. Although the FORMAT program has more options applicable to various diskette capacities, it is also a very powerful utility when applied to hard drives.

To use all of the features of the FORMAT program, you need to be at a DOS or command prompt. Then follow these steps:

  1. Boot with DOS or a startup diskette, boot CD, or bootable USB FLASH drive or hard drive containing the version of the operating system you wish to repair. A Windows 98 or Me startup diskette will do nicely.

  2. At the command prompt, type in FORMAT followed by the parameters necessary to establish the type of format you want to create. To format a hard drive, the parameters would be:

    FORMAT 
    
    C:
    
     /S

  3. The program will advise you that formatting will overwrite all of the datafiles on the drive (which isn't a problem on a new drive) and ask you to confirm that you really want to format the drive. Press the Y key for Yes and then press the Enter key and allow the program to start.

  4. Formatting a drive can take quite a bit of time depending on its size and the speed of the computer. At the end, you will be prompted to give the drive a name or label (optional), and you're done.

You have to format every partition you want to use for the operating system or data. FORMAT establishes the FAT filesystem and directory space. FORMAT is typically not used on NTFS partitions, which are instead formatted as part of the operating system setup process or with the Disk Management console within Windows (NT, 2000, XP, and 2003 only).

FORMAT provides the following command-line options:

FORMAT drive: [/V[:label]] [/Q] [/F:size] [/B | /S] [/C]

FORMAT drive: [/V[:label]] [/Q] [/T:tracks /N:sectors] [/B | /S] [/C]

FORMAT drive: [/V[:label]] [/Q] [/1] [/4] [/B | /S] [/C]

FORMAT drive: [/Q] [/1] [/4] [/8] [/B | /S] [/C]

The purposes of these options are as follows:


/V[ :label]

Specifies the volume label.


/Q

Performs a quick format.


/F :size

Specifies the size to format the disk to (such as 160, 180, 320, 360, 720, 1.2, 1.44, or 2.88).


/B

Allocates space on the formatted disk for system files.


/S

Copies system files to the formatted disk.


/T :tracks

Specifies the number of tracks per disk side.


/N :sectors

Specifies the number of sectors per track.


/1

Formats a single side of a floppy disk.


/4

Formats a 5.25-inch 360 K floppy disk in a high-density drive.


/8

Formats eight sectors per track.


/C

Tests clusters that are currently marked "bad."

FORMAT under Windows 2000 and XP offers some additional command-line options:


/FS :filesystem

Specifies the type of the filesystem (FAT, FAT32, or NTFS).


/C(for NTFS only)

Indicates that files created on the new volume will be compressed by default.

/X

Forces the volume to dismount first if necessary. All opened handles to the volume will no longer be valid.


/A :size

Overrides the default allocation unit size. The following default settings are strongly recommended for general use:

  • NTFS supports 512, 1,024, 2,048, 4,096, and 8,192 bytes; 16 K, 32 K, and 64 K.

  • FAT supports 512, 1,024, 2,048, 4,096, and 8,192 bytes; 16 K, 32 K, and 64 K (128 K or 256 K for sector size greater than 512 bytes).

  • FAT-32 supports 512, 1,024, 2,048, 4,096, and 8,192 bytes; 16 K, 32 K, 64 K, (128 K or 256 K for sector size greater than 512 bytes).

Examples of common uses of FORMAT are:


format a:

Erases all the contents of a disk. Commonly used on a diskette that has not been formatted or on a diskette you wish to erase.


format a: /q

Quickly erases all the contents of a floppy diskette.


format a: /s

Formats and makes a diskette bootable.


format c:

Erases all the contents of your hard disk drive. Unless you wish to erase all of your computer's information, this command should not be used. It is also the command used to format a hard drive partition for data use, without being bootable.


format d: /FS:NTFS /A:2048

Formats drive D: with the NTFS filesystem and forces the cluster size to 2 KB. You can accomplish the same thing in the Disk Management console of Windows 2000, XP, and 2003 systems.

5.13.1 Logical Drive Assignments Under DOS

While your system BIOS sees hard drives in the order they are attached to their interface cables and configured by jumpers, DOS dynamically assigns drive letters in a most unusual but quite logical order, alternating between physical/electronic order and partitions found. Drive letter assignments by default first follow physical and then logical/partition order.

For systems with only one partition, it's simple: DOS assigns drive letter C: to the first partition it finds on that drive. If there are more partitions it assigns them drive letter D:, E:, and so on.

For systems with two hard drives, if the first hard drive has only one partition that is assigned drive letter C:, then the first partition on the second hard drive is assigned drive letter D:, and if the second hard drive contains more partitions they are assigned drive letters E:, F:, and so on. Simple enough.

For systems with two hard drives, where the first hard drive has two or more partitions, grab a pencil and paper or head to the nearest white board to map out what happens, or you can refer to Table 5-4. The first partition on the first hard drive is assigned drive letter C:—again, simple enough. The first partition on the second hard drive is assigned drive letter D:—nothing complicated so far. If you have two or more partitions on the first hard drive, they are then assigned drive letters E:, F:, and so on until you run out of partitions or letters. Now that's interesting! If the second hard drive has two or more partitions, the drive letters for the second and all subsequent partitions are assigned in order after the last letter used for the partitions on the first hard drive.

Table 5-4. Logical drive assignments on multiple drives and partitions

Drive letter

One hard drive

(any number of partitions)

Two hard drives,

(two partitions each)

Two hard drives,

(three partitions each)

C:

First partition

First partition of first hard drive

First partition of first hard drive

D:

Second partition

First partition of second hard drive

First partition of second hard drive

E:

Third partition

Second partition of first hard drive

Second partition of first hard drive

F:

Fourth partition

Second partition of second hard drive

Third partition of first hard drive

G:

Fifth partition

None

Second partition of second hard drive

H:

Sixth partition

None

Third partition of second hard drive


Under Windows NT/2000/XP you cannot change the drive letter of the Active boot or system partition, but you may change the drive letters for subsequent partitions within the Disk Management console [Hack #52] .

    Previous Section  < Day Day Up >  Next Section
    Index: [SYMBOL][A][B][C][D][E][F][G][H][I][J][L][M][N][O][P][Q][R][S][T][U][V][W][X][Z]


         Main Menu
    PC Hacks
    Table of Contents
    Copyright
    Credits
    Preface
    Chapter 1. Basic System Board Hacks
    Chapter 2. Basic System Board Setup
    Chapter 3. CPU Hacks
    Chapter 4. Memory Hacks
    Chapter 5. Disk Hacks
    Introduction: Hacks #40-57
    Hack 40 Partition and Format Wisely
    Hack 41 Determine Your Filesystem
    Hack 42 Create a New Partition with NT, 2000, XP, and 2003
    Hack 43 Create a New Partition with PartitionMagic
    Hack 44 Merge Partitions with PartitionMagic
    Hack 45 Convert FAT to NTFS
    Hack 46 Create or Delete NTFS Partitions from the Recovery Console
    Hack 47 Fix the Master Boot Record on FAT Partitions
    Hack 48 Fix the Master Boot Record on NTFS Partitions
    Hack 49 Fix the Partition Boot Sector on NTFS Partitions
    Hack 50 Fix GRUB or LILO Boot Problems
    Hack 51 Format Your Disk
    Hack 52 Change Logical Drive Letters
    Hack 53 Restore DOS Bootability
    Hack 54 Rescue a Blown 2000 or XP Installation
    Hack 55 Fix the Windows 95 File-Caching Bug
    Hack 56 Avoid the Delayed-Write-Caching Blues
    Hack 57 Detect Drive Failure Before It Happens
    Chapter 6. Disk Drive Performance Hacks
    Chapter 7. Video Hacks
    Chapter 8. I/O Device Hacks
    Chapter 9. Boot-Up Hacks
    Chapter 10. Configuring a New PC
    Colophon
    Index


    More Books
    PHP Hacks
    Processing Xml With Java - A Guide To Sax, Dom, Jdom, Jaxp, And Trax
    The Koran (Holy Qur'an)
    Macromedia Flash 8 Bible
    Search Engine Optimization for Dummies
    YouTube Traffic
    PHP 5 for Dummies
    Harry Potter and The Chamber of Secrets
    Harry Potter and the Sorcerer's Stone
    The Pilgrim's Progress
    Wireless Hacks
    Flash Hacks. 100 Industrial-Strength Tips & Tools
    PayPal Hacks. 100 Industrial-Strength Tips and Tools
    Amazon Hacks
    Pdf Hacks
    The Da Vinci Code
    Google Hacks
    The Holy Bible
    Windows XP For Dummies
    Harry Potter and the Half-Blood Prince
    Seo Book
    Upgrading and Repairing Networks
    Macromedia Dreamweaver 8 UNLEASHED
    Windows XP Annoyances
    Windows XP Hacks
    Microsoft Windows XP Power Toolkit
    Teach Yourself MS Office In 24Hours
    iPod & iTunes Missing Manual
    PC Hacks 100 Industrial-Strength Tips and Tools
    PC Overclocking, Optimization, and Tuning - 2th Edition
    PC Hardware In A Nutshell 3rd Edition
    PC Hardware in a Nutshell, 2nd Edition
    Upgrading and Repairing PCs
    Google for Dummies
    MySQL Cookbook
    Teach Yourself Macromedia Flash 8 In 24 Hours
    PHP CookBook
    Sams Teach Yourself JavaScript in 24 Hours
    PHP5 Manual
    Free Games Paper Airplanes
    500 Juegos Gratis 500 Giochi Gratis 500 Jeux Gratuits 500 Jogos Gratis 500 Kostenlose Spiele