Thursday, 21 May 2015 00:00

HDD Low Level Format in BIOS

Rate this item
(0 votes)

b2ap3_thumbnail_iStock_000015515512XSmall.jpgHDD service information.

The information stored on HDD is divided into user information (that is what for this device is made) and service information to ensure the possibility of storing user information. Service information is divided into the following:

• service information of the storage device, required for its operation on the hardware level (sector read/write), hereinafter referred to as the service information of HDD;

• service information of operating system (required to arrange information in such a way that is convenient for operating system to process), hereinafter referred to as the service information of OS.

Service information of HDD in its turn is divided into three levels:

1. Information meant for arranging feedback of servo-system of head-actuator assembly, i.e. for positioning heads on tracks and maintaining this position. In modern HDDs it is done by putting servo markings on all surfaces – fields allowing servo motor to be updated on the current head position. Disk spinning speed is also stabilized according to that factor (by controlling signal repetition period). Servo markings are put not only on the track area but between tracks as well. Servo markings are applied when HDD is being produced on a special device ensuring external HSA positioning — Servowriter. Record or recovery of servo markings with HDD tools (without external positioning) is impossible.

2. Information which serves to address sectors with user data and data integrity control. It includes sector identifier fields (descriptor) which identifies sector and ECC check bytes, designed to control integrity of data recorded in the sector’s data field. This is what is usually understood under low level formatting. Earlier HDD models (with ST506/412 interface), as well as in FDD, low level format writing was a standard operation. With the release of IDE media and transfer of main functions of working with hardware into the controller of HDD, the unification of internal format has lost its meaning. Distribution of sectors in modern HDDs is individual for each model, ZBR is used (Zone Bit Recording, different number of sectors per track depending on the physical length), and real location of sector is known only to the internal manager. That is why low level formatting can be performed only by the media’s controller and is implemented in the majority of HDDs as autoformat – procedure activated by process command (vendor specific, undocumented service command).

3. Information necessary for operation of HDD’s control processor and special controller’s microchips — Firmware, or storage medium’s service software. It represents a set of programs ensuring performance of HDD functions and tables containing all necessary data for operation (storage medium parameters, serial number etc., addresses of replaced bad sectors, SMART attributes etc.). This information is located on specially designated service cylinders not accessible in HDD user mode. It is recorded also with the help of process commands.

2. Service information of OS (DOS,Windows)

Operating system creates its service data structure on HDD to ensure a possibility to manipulate stored information according to the rules accepted by the OS. From the OS’s point of view, the drive is just a collection of randomly addressed blocks (sectors) regardless of the device structure.

OS tools create logical partition tables (by fdisk), tables of partition parameters and file location (by format), and write OS loaders. Logical formatting is all about writing these tables and programs as well as checking accessibility of data sectors, part of logical partition. If during check inaccessible sectors are detected (when sector verification command returns error code), they are marked in FAT as bad. This procedure has not relation to sector identifiers as well as low level format. Writing is performed only in sectors allocated for OS loader, FAT and root catalog.

3. What is Low Level Format from BIOS?

ATA standard (AT attachment) has a command 50h (Format Track), that remained as ‘legacy’ from ST506/412. At present, this command is supported by some HDD manufacturers ‘for compatibility’, and the real storage device’s action upon receiving it varies from simple ignoring to writing zeroes in specified sectors. Real low level formatting in user mode is impossible due to the fact that internal program of HDD controller’s translator hides the real sector addressing. The result of carrying out low-level formatting from BIOS could be the following:

1. No result. I.e. HDD ignores this procedure. Positioning will be fairly done but no actions on disks.
2. Zero-write to all sectors, which means user data is wiped off.
3. Problems with older versions of HDD which do not provide reliable protection against user errors. Some older HDDs (40-80 MB) can reply to 50h with an error, which subsequently might lead to marking all sectors as bad or vice versa, they can zero part of service tracks leading to crash of storage medium .

At the same time track formatting command provides quite useful possibilities. The command itself looks like the following (AT Attachment Interface for Disk Drives, Revision 4p, 1994):

• Number of sectors per track is recorded in the sector count (logical, usually 63).
• Number of storage medium and head is recorded in the storage medium/head register.
• Number of cylinder is recorded in the cylinder number registers.
• 50h is recorded in the command register.

Then sector buffer is filled (100h words) with data block, in which every 16-bit word is sector’s descriptor and contains the number of sector in lead byte and in lower byte – descriptor which can adopt the following values:

• 00h — Format sector as good;
• 20h — Unassign the alternate location for this sector;
• 40h — Assign this sector to alternate location;
• 80h — Format sector as bad

Buffer’s ‘tail’ is filled with zeroes. After buffer is filled, the command is executed.

Therefore, with the help of Format Track command you can replace bad sectors with reserve. Such option is supported in the majority of modern IDE HDD. Unfortunately, LLF BIOS procedure (at least the majority of them) is not implemented by them. That is why it is better to use special programs to hide defects, like: mhdd, Victoria (MS-DOS), HDDScan (Windows 2000/XP).
And final remark: LLF from BIOS can lead to positive result as well, like, for example, in case with wrong checksum sector data field. When such sector is read, an error will appear "Uncorrectable by ECC" until new record in it will correct ECC bytes. It can be done by BIOS LLF as well (if only drive doesn’t ignore it).

As far as modern storage media are concerned (capacity over 1-2 Gb per platter), they have differences in sector format – absence of identification field. Such format is called id-less or no-id, and it is identified not by the record in its header but by the location of sector relative to the servo marking, which allowed increasing usable capacity and simultaneously left formatting useless. If earlier during the sector recording there still remained a non updated part – descriptor, now a simple recording overwrites an entire physical sector, including data field and ECC field.

Therefore, a separate function of low level fomratting became useless and it was subsequently excluded from new editions of ATA standard. Distributed by HDD manufacturers services utilities still might contain a menu item ‘Low Level format’, but behind it is the same sector-by-sector zeroing.

The changes also touched defect management system (system of hiding surface defects). In any modern HDD this system includes a mechanism of defect sector automatic replacement during read/write operations, that is why there is no need in special commands to initiate this replacement.

Hence, the procedure HDD Low Level Format implemented in BIOS of many system boards can be called as harmless for the most part (for the drive, but not for the information it contains), although virtually useless. It means that using it can bring benefits that can be brought by an irdinary zero-writing in all sectors of logical disk space. It would be easier to do it with the help of above mentioned programs and utilities which can be downloaded from official websites of HDD manufacturers.

Last modified on Thursday, 21 May 2015 18:43
Data Recovery Expert

Viktor S., Ph.D. (Electrical/Computer Engineering), was hired by DataRecoup, the international data recovery corporation, in 2012. Promoted to Engineering Senior Manager in 2010 and then to his current position, as C.I.O. of DataRecoup, in 2014. Responsible for the management of critical, high-priority RAID data recovery cases and the application of his expert, comprehensive knowledge in database data retrieval. He is also responsible for planning and implementing SEO/SEM and other internet-based marketing strategies. Currently, Viktor S., Ph.D., is focusing on the further development and expansion of DataRecoup’s major internet marketing campaign for their already successful proprietary software application “Data Recovery for Windows” (an application which he developed).

Leave a comment

Make sure you enter the (*) required information where indicated. HTML code is not allowed.