Disk formatting
From Wikipedia, the free encyclopedia
(Redirected from Disk format)
Jump to: navigation, search
Formatting a hard drive using MS-DOSDisk formatting is the process of preparing a hard disk or other storage medium for use, including setting up an empty file system. A variety of utilities and programs exist for this task; pictured to the right is the iconic FORMAT.COM of MS-DOS and PC-DOS.
Large disks can be partitioned, divided into logical sections that are formatted with their own file systems. This is normally only done on hard disks because of the small sizes of other disk types, as well as compatibility issues.
A corrupted operating system can be reverted to a clean state by formatting the disk and reinstalling the OS, as a drastic way of combatting a software problem or malware infection. Obviously, important files should be backed up beforehand.
Contents [hide]
1 Two levels of formatting
1.1 Low-level formatting of floppy disks
1.2 Low-level formatting of hard disk drives
1.3 High-level formatting
2 Formatting in DOS
3 Recovery of data from a formatted disk
4 References
5 See also
6 External links
[edit] Two levels of formatting
Formatting a disk involves two quite different processes known as low-level and high-level formatting. The former deals with the formatting of disk surfaces and installing characteristics like sector numbers that are visible to, and used by, the disk controller hardware, while the latter deals with file system specific information written by the operating system.
[edit] Low-level formatting of floppy disks
The low-level format of floppy disks (and early hard disks) is performed by the disk drive hardware.
The process is most easily described with a standard 1.44 MB floppy disk in mind. Low-level formatting of the floppy normally writes 18 sectors of 512 bytes each on each of 160 tracks (80 on each side) of the floppy disk, providing 1,474,560 bytes of storage on the floppy.
Sectors are actually physically larger than 512 bytes as they include sector numbers, CRC bytes, and other information required in order to identify and verify the sector during reading and writing. These additional bytes do not add to the overall storage capacity of the disk.
To complicate matters, different low-level formats can be used on the same media; for example, large records can be used to cut down on interrecord gap size.
Several freeware and shareware programs (e.g. GParted, FDFORMAT, NFORMAT and 2M) allowed considerably more control over formatting, allowing the formatting of high-density 3 1/2" disks with a capacity up to 2 MB.
Techniques used include:
head/track sector skew (moving the sector numbering forward at side change and track stepping to reduce mechanical delay),
interleaving sectors (to minimize sector gap and thereby allowing the number of sectors per track to be increased),
increasing the number of sectors per track (while a normal 1.44 MB format uses 18 sectors per track, it's possible to increase this to a maximum of 21), and
increasing the number of tracks (most drives could tolerate extension to 82 tracks – though some could handle more, others jammed).
Linux supports a variety of sector sizes, and DOS and Windows support a large-record-size DMF-formatted floppy format.[citation needed]
[edit] Low-level formatting of hard disk drives
User instigated low-level formatting of hard disks was common in the 1980s. Typically this involved setting up the MFM pattern on the disk, so that sectors of bytes could be successfully written to it. With the advent of RLL encoding, low-level formatting grew increasingly uncommon, and most modern hard disks are embedded systems, which are low-level formatted at the factory and thus not subject to user intervention.
Early hard disks were quite similar to floppies, but low-level formatting was generally done by the BIOS rather than by the operating system. This was a fairly bizarre process that involved using the MS-DOS debug program to transfer control to a routine hidden at different addresses in different BIOSs.
Starting in the early 1990s, low-level formatting of hard drives became more complex as technology improved to:
use RLL encoding,
store a higher number of sectors on the longer outer tracks (traditionally, all tracks had the same number of sectors, as is still the case with floppy disks),
encode track numbers into the disk surface to simplify hardware, and
increase the mechanical speeds of the drive.
Rather than face ever-escalating difficulties with BIOS versioning, disk vendors started doing low-level formatting at the factory. Today, an end-user, in most cases, should never perform a low-level formatting of an IDE or ATA hard drive; disk reinitialization of an IDE or ATA hard drive is much more common. [1]
[edit] High-level formatting
High-level formatting is the process of setting up an empty file system on the disk, and installing a boot sector. This alone takes little time, and is sometimes referred to as a "quick format".
In addition, the entire disk may optionally be scanned for defects, which takes considerably longer, up to several hours on larger harddisks.
In the case of floppy disks, both high- and low-level formatting are customarily done in one pass by the software. In recent years, most floppies have shipped preformatted from the factory as DOS FAT12 floppies. It is possible to format them again to other formats, if necessary.
[edit] Formatting in DOS
Under MS-DOS and PC-DOS, disk formatting is performed by the FORMAT program. FORMAT usually asks for confirmation beforehand to prevent accidental removal of data, but some versions of DOS had an undocumented /AUTOTEST option; if used, the usual confirmation is skipped and the format begins right away. The WM/FormatC macro virus uses this command to format the C: drive as soon as a document is opened.
There is also the undocumented /U parameter that performs an unconditional format which overwrites the entire partition [1], preventing the recovery of data through software (but see below).
[edit] Recovery of data from a formatted disk
As with regular deletion, data on a disk is not fully destroyed during a high-level format. Instead, the area on the disk containing the data is merely marked as available, and retains the old data until it's overwritten by new files.
To prevent the recovery of sensitive data through software, the data must either be overwritten with random data before the format, or the format program must perform this overwriting.
[edit] References
^ The NOSPIN Group, Inc. (n.d.). Low level formatting an IDE hard drive. Retrieved December 24, 2003.
[edit] See also
Data remanence
File wiping
[edit] External links
How to Format a Hard Drive in Windows XP
Secure Deletion of Data from Magnetic and Solid-State Memory by Peter Gutmann
Differences between a Quick format and a regular format during a "clean" installation of Windows XP from Microsoft Help and Support. Useful for anyone setting up their own computer and needing advice on the subject!
Retrieved from "http://en.wikipedia.org/wiki/Disk_formatting"
fdisk
From Wikipedia, the free encyclopedia
Jump to: navigation, search
The correct title of this article is fdisk. The initial letter is shown capitalized due to technical restrictions.
Many partition table manipulators are known as fdisk. Before hard disks can be used, they must be divided into one or more logical disks called partitions. This division is described in the partition table found in sector 0 of the disk.
Contents [hide]
1 DOS FDISK
1.1 Caution:
2 UNIX, Linux & Unix-derived fdisk
3 OS/2 fdisk
4 External links
4.1 All
4.2 DOS
4.3 UNIX
4.4 Linux
4.5 FreeBSD
4.6 Not (yet) categorized
[edit] DOS FDISK
All of the many DOS operating systems, including MS-DOS, PC-DOS and DR-DOS use a partition table manipulator known as FDISK.EXE. The name derives from IBM's habit of calling hard drives fixed disks[citation needed]. Most DOS FDISK programs, including the FDISK program that came with the original Windows 95, are only capable of creating FAT partitions of type FAT16.
A derivative of the MS-DOS FDISK was provided with Windows 95, Windows 98, and later Windows Me. Only those FDISK versions shipping with Windows 95B or later are able to manipulate FAT32 partitions.
FreeDOS has its own official Free FDISK which has many advanced features and is free software.
[edit] Caution:
Unlike the fdisk programs for UNIX, Linux and their derivatives, the FDISK programs for DOS and Windows 9x/Me not only alter data in the Partition Table, but will also overwrite many sectors of data in the partition itself! So be sure the correct disk/partition has been chosen before using a DOS/Windows FDISK for partitioning.
[edit] UNIX, Linux & Unix-derived fdisk
Linux needs at least one partition, namely for its root file system. It can use swap files and/or swap partitions, but the latter are more efficient. So, usually one will want a second Linux partition dedicated as a swap partition. On Intel compatible hardware, the BIOS that boots the system can often only access the first 1024 cylinders of the disk. For this reason people with large disks often create a third partition, just a few MB large, typically mounted on /boot, to store the kernel image and a few auxiliary files needed at boot time, so as to make sure that this stuff is accessible to the BIOS. There may be reasons of security, ease of administration and backup, or testing, to use more than the minimum number of partitions. See also: cfdisk.
[edit] OS/2 fdisk
OS/2 shipped with two partition table managers up until version 4.0. These were the text mode fdisk and the GUI-based fdiskpm. The two have identical functionality, and can manipulate both FAT partitions and the more advanced HPFS partitions.
OS/2 versions 4.5 and higher (including eComStation) can use the JFS filesystem as well as FAT and HPFS, and replace fdisk with the Logical Volume Manager (LVM).