Prior to understand what is formatting, it is essential to know how a hard disk is. Many people do not distinguish the low-level format (also known as physical format) and high-level format (also known as formatting logic).

Hard drives, however small they are, contains millions of bits which we must organize in order to locate information. This forms the basic purpose of formatting. The surface of each cylinder is uniformly divided when formatting in small parcels which can be more easily identified by any operating system.

The low-level format

The aim of low-level format is to divide the surface into basic elements:
  • tracks
  • Sectors
  • cylinders

A disk drive consists of several circular plates around an axis and covered on both sides by a magnetic oxide, which are polarized, which will be able to store data.


The tracks are written in concentric zones on both sides of a plateau.


Finally, these tracks are cut into quarters called sectors.


The tracks are in thousands and each have 60 to 120 sectors around.

It is also called as cylinder since all data is stored on the same plateau but in different tracks (i.e. vertical to each other) forming a cylindrical shape of data.


The physical format is to organize the surface of each tray entities called tracks and sectors, thanks to the polarizing heads writing areas of discs. The tracks are numbered from 0, then heads concentrically polarize the surface of the tray. When we move to the next track, the head leaves a hole (called gap) and so on. Each track is itself organized in sectors (numbered starting from 1) separated them by gaps. Each of these begins with an area reserved for information system called prefix and ends in an area called suffix
The low-level format therefore aims to prepare the surface of a disk host of data (it does not depend on operating system) and allows through tests conducted by the manufacturer of bad sectors marked.

When you buy a hard disk, it has already suffered a low-level format, IT IS NOT NECESSARY TO MAKE A low-level format!

Checksum

Indeed, during formatting control tests (algorithm to test the validity of sectors with money control) are made and whenever a sector is defective, the checksum (invalid) is entered in the prefix, it can then be used thereafter, it is said to be "marked defective".

When the disk reads data, it sends a value that depends on the content of the package sent, and which is initially stored with them. The system calculates the value based on data received, and then compared with that which was stored with the data. If these two values are different, the data are not valid, there is probably a problem with the disc surface.

The cyclic redundancy check (CRC), is based on the same principle to control the integrity of a file.

The analysis utilities such as "scandisk" or "chkdsk" operate differently:
they write data on sector priority marked valid, then read and compare. If they are similar happening in the utility sector following, if they mark the bad sector.

High-level formatting

The formatting logic takes place after the low-level format, it creates a file system on the disk, which will allow an operating system (DOS, Windows 95, Linux, OS / 2, Windows NT, ... ) Use disk space to store and use.

Operating systems use different filesystems, and the type of formatting logic depends on the operating system you are installing. So if you format your disk into a single file system, this naturally limits the number and type of operating system you install (because you can install operating systems using the same file system).

Fortunately, the solution to this problem is to create partitions. Each partition can actually have its own file system, therefore you can install operating systems of various kinds.