As I prepare for CompTIA's A+ Certification I will post my revision notes here.

Friday, February 03, 2006

DOS System Tools

DEFRAG - Microsoft includes a Disc Defragmenter utility with its operating systems. Disc fragmenters are used to help arrange the data on hard discs in chronological order, this makes reading data from disc faster due to the way the hard drive read-write heads need to pass over the disc to read the data stored. An update was made in Windows 98, which placed most commonly accessed data nearer the beginning on the drive to speed up access even more.

C:\>defrag /?
Usage:
defrag [-a] [-f] [-v] [-?]
volume drive letter or mount point (d: or d:\vol\mountpoint)
-a Analyze only
-f Force defragmentation even if free space is low
-v Verbose output
-? Display this help text


FORMAT - Windows includes a format utility used to prepare a floppy disc or hard drive for use with Windows. Formatting a drive will effectively erase any data or programs stored on the disc. You have been warned!

The Format command has a fair number of switches to enable it to correctly format a disc, whether it be a floppy disc or hard disc, on Windows XP or in DOS. The format command will allow you to format a drive in a number of file systems, FAT16, FAT32 or NTFS (Until I cover this topic see this link for more information on choosing a file system). It will allow you to create compressed drives if it is supported by the file system. Here is the full FORMAT help in Windows XP:

C:\C>format /?
Formats a disk for use with Windows XP.

FORMAT volume [/FS:file-system] [/V:label] [/Q] [/A:size] [/C] [/X]
FORMAT volume [/V:label] [/Q] [/F:size]
FORMAT volume [/V:label] [/Q] [/T:tracks /N:sectors]
FORMAT volume [/V:label] [/Q]
FORMAT volume [/Q]

volume Specifies the drive letter (followed by a colon),
mount point, or volume name.
/FS:filesystem Specifies the type of the file system (FAT, FAT32, or NTFS).
/V:label Specifies the volume label.
/Q Performs a quick format.
/C NTFS only: 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 would no longer be valid.
/A:size Overrides the default allocation unit size. Default settings
are strongly recommended for general use.
NTFS supports 512, 1024, 2048, 4096, 8192, 16K, 32K, 64K.
FAT supports 512, 1024, 2048, 4096, 8192, 16K, 32K, 64K,
(128K, 256K for sector size > 512 bytes).
FAT32 supports 512, 1024, 2048, 4096, 8192, 16K, 32K, 64K,
(128K, 256K for sector size > 512 bytes).

Note that the FAT and FAT32 files systems impose the
following restrictions on the number of clusters on a volume:

FAT: Number of clusters <= 65526
FAT32: 65526 <>

Format will immediately stop processing if it decides that
the above requirements cannot be met using the specified
cluster size.

NTFS compression is not supported for allocation unit sizes
above 4096.

/F:size Specifies the size of the floppy disk to format (1.44)
/T:tracks Specifies the number of tracks per disk side.
/N:sectors Specifies the number of sectors per track.


FDISK and DISKPART - Both FDISK and DISKPART allow users to create or delete partitions on their hard disks. Creating or deleting partitions on a drive will erase all data on those partitions.

Paritions allow you to logically divide up your hard disk. These partitions will appear as different drives in Windows and are very useful for allowing you to separate your operating system and your data, which is useful if you ever need to reinstall your operating system and leave your data intact. Click here for more information on partitioning.

FDISK is available for use in MS-DOS, Window 95, 98 and Windows ME. FDISK was replaced in Windows 2000 and XP in favour of DISKPART which is more powerful allowing the user to run scripts to create predefined partitions.

ComputerHope.com provides some examples for using both FDISK and DISKPART commands.


SYS - The SYS command will copy the Windows systems files to a volume to allow that volume become bootable. This command is only available on MS-DOS, Windows 9x operating systems.

The SYS command is useful for making a bootable floppy disk that has already been formatted without the /S FORMAT switch. If you need to format the disk as well then the FORMAT /S command will format and then copy the system files in one command.

The following DOS command would copy:

  • command.com
  • io.sys
  • msdos.sys
  • drvspace.bin
from the C drive to the A drive providing the disk in A: is Windows formatted.

C:\>sys a:


0 Comments:

Post a Comment

<< Home

 
Privacy Policy | Terms and Conditions