SoFunction
Updated on 2025-04-14

Necessary for newbies: super practical and low-level formatting method

The function of low-level formatting of hard disk 

Low-lattice formatting of hard disks is the most thorough initialization method for hard disks. After the low-lattice hard disk, all the data protected will be lost. Therefore, generally speaking, low-lattice hard disks are very undesirable. Only when it is very necessary can low-lattice hard disks be used. There are two kinds of so-called necessary ones. One is that before the hard disk leaves the factory, the hard disk factory will perform a low-level formatting on the hard disk; the other is that when a certain type of bad channel appears in the hard disk, using low-level formatting can play a certain role in alleviating or blocking.

For the first case, there is no need to say more about it, because only hard drive engineers will get access to low-level work before the hard drive leaves the factory. For ordinary users, there is no need to consider this aspect at all. As for the second case, what type of bad path is needed to be low-level? Before explaining this key issue, let’s take a look at the types of hard drive bad channels.

In general, bad paths can be divided into physical bad paths and logical bad paths. Among them, the logic bad path is relatively easy to solve. It refers to the long-term interference of the hard disk during writing, resulting in ECC errors. From a process perspective, it means that when the hard disk writes data, it will use ECC logic to recombine the data. Generally, the operating system needs to write 512 bytes, but in fact, the hard disk will write dozens of bytes more, and all of these bytes must be checked and encoded with ECC. If the ECC correction code calculated by the original byte is different from the ECC calculated by the read byte, an ECC error will occur. This is the so-called physical bad channel.

As for physical bad channels, it is more fatal to damage to hard disks. It also has the difference between soft and hard physical bad channels. Physical damage to the disk surface is hard, which cannot be repaired. When data writing errors are caused by external influences, the system will also consider it a physical bad path, which can be repaired using some hard disk tools (such as detection and repair software provided by hard disk manufacturers). In addition, for slight hard disk surface damage, some hard disk tools (such as Western Data's Data Lifeguard Tools) can be redirected to a good reserved sector to correct the error.

For these bad path types, hard physical bad paths are definitely irreparable. They are the most direct damage to the hard disk surface, so they cannot be repaired even if they are low-level or hard disk tools (unless they are very minor damage, some tools can keep these bad paths without using this to achieve the purpose of solving the problem).

For the occurrence of logical bad channels or soft physical bad channels on the hard disk, users can try to use low-level formatting to achieve the effect of blocking bad channels. However, it should be pointed out here that blocking bad channels does not mean eliminating bad channels. A low-lattice hard disk can delete all partitions in the original hard disk, but the bad channels still exist. Blocking only hides the bad channels and prevents users from using these bad channels when storing data. This can ensure the reliability of user data to a certain extent, but bad channels will spread with the increase of hard disk partitions and formatting times.

Therefore, the author does not recommend that users lower the hard disk. How to warranty the hard disk or find a dealer to change it during the warranty period is the best solution and the most thorough solution. If the hard drive is not allowed to be replaced after the warranty period, you can try a low-grid hard drive to prevent data loss caused by storing data to a bad channel.

For how to use low-lattice hard disks, generally speaking, low-lattice tools are used to operate. This will be introduced in detail in the following chapters, and here are some related topics. That is, low-lattice tools are essentially different from hard disk detection tools. Low-lattice tools are used to perform low-lattice functions on hard disks. Hard disk detection tools are generally launched by hard disk manufacturers to detect hard disks and detect hard disk errors early to remind users to back up important data or repair hard disks. They are not used for low-lattice hard disks.

Low-level formatting using Debug assembly language

Low-level formatted hard disks can destroy data in the hard disk, so be careful before operation. There are many ways to low-lattice hard disks, such as using assembly language to low-lattice hard disks, and the most common one is to use some tool software to low-lattice hard disks. Common low-lattice tools include lformat, DM and various hard disk tools launched by hard disk manufacturers.

Assembly is a relatively low-level programming language. It can operate hardware very conveniently and has high operating efficiency. If you need to operate hardware directly in a software system, assembly language is often used. The hard disk can also be formatted in low-level ways using assembly. It is more flexible than tool software such as DM. The specific application is to use debug programs, and the specific operation is to call low-level formatting programs stored in the BIOS in the debug environment (this low-lattice program is also called in CMOS directly with low-lattice hard disk). There are usually three implementation methods:

(1) Directly call low-level programs in BIOS ROM

There are low-lattice programs stored in the BIOS ROM of many computers. The storage address starts from the C8005H address. The specific operations are as follows:

A:\>Debug

-G C800:0005 (//The screen displays information at this time (the information displayed by different versions of BIOS may be different), prompt after entering:)

Current Interleave is 3 select new interleave or Return for current (//This requires the user to select the cross factor. Press Enter to indicate the default value of 3. You can also enter the new cross factor value. The cross factor of the hard disk is generally 3, so just enter the carriage directly. The screen will prompt:)

Are you dynamically configuring the drive-answer Y/N t

Press "Y" to begin formatting the drive C: with interleave 03 (// After typing "Y" starts to low-level the hard disk)

Formatting… (//After completing it, ask if it is handled with bad tracks)

Do you want to format bad track-answer Y/N?

If not, answer with "N". Screen display:

Format Successful,system will new restart,Insert Dos diskette indrive A:

Insert the system disk to drive A, and you can perform partitioning, advanced formatting and other operations to install the system.

(2) The hard disk is low-level by calling the No. 7 function of INT 13H interrupt

The operation is as follows:

A:\>DEBUG

-A 100

-XXXX: 0100 MOV AX, 0703; (//The cross factor is 3)

-XXXX: 0103 MOV CX, 0001; (From 0 sectors of 0 tracks)

-XXXX: 0106 MOV DX, 0080; (//C disk 0 track)

-XXXX:0109 INT 13

-XXXX:010B INT 3

-XXXX:010D

-G 100

In this way, the hard disk will be low.

(3) Calling the No. 5 function of INT 13H interrupt

The No. 5 function that calls INT 13H interrupt to the hard disk only has low grid 0 side 0 channel 1 sector, without having to low grid the entire hard disk, so that the low grid is completed in a very short time. The specific operations are as follows:

A:>DEBUG

-A 100

-XXXX: 0100 MOV AX, 0500; (//Call function No. 5)

-XXXX: 0103 MOV BX, 0180; (//Set the buffer address)

-XXXX: 0106 MOV CX, 0001; (From 0 track 1 sector)

-XXXX: 0109 MOV DX, 0080; (//C disk 0 track)

-XXXX:010B INT 13

-XXXX:010D INT 3

-E 0180 0 0 0002; (//Write parameters)

-G 100

Low-level formatting with DM

The full name of DM is Hard Disk Management Program, which can perform low-level formatting, verification and other management of hard disks, and can improve the efficiency of hard disk usage. In general, DM has the following functions: low-level hard disk formatting, partitioning, advanced formatting, hard disk parameter configuration and other functions.

In actual application, the DM tool is the same as the ordinary DOS command (such as fdisk or format), and its command format is: A:>DM [parameters]. The parameters can take the following values:

<> /M DM software enters manually. If there is no such parameter, the DM runs automatically, and INITIALIZE.PARTITION.PREPARAFION is executed in turn.

<> /C DM software is executed in color, that is, it runs on a color display.

<> /P DM software manages hard disks in PC/XT mode.

<> /A DM software manages hard disks in PC/AT mode.

<> /2 DOS version method.

<> /3 DOS version method.

<> /4 DOS version method (only DM version 5.01 has this parameter).

<> /V DM runs in ways that can change the cluster length and root directory entry.

In actual use, the following two methods are commonly used to start:

1. A:>DM (automatic method. When initializing hard disk, many parameters use default values ​​and do not interfere with them manually).

2. A:>DM (manual method. Some parameters must be manually specified when formatting).

After starting the DM tool, users can choose the corresponding operation according to their needs. Since it is also stored in the form of a DOS user interface, it is also very simple and clear to use.

Other low-level formatting methods

In addition to the two low-level tools introduced above, there are many other low-level formatting methods.

1. Direct operation in CMOS

If the motherboard supports it, users can directly format the hard disk in CMOS. This method is very simple and convenient. Therefore, if possible, the author recommends using this method to low-level hard disk. Specific operation method: When booting up, enter CMOS Setup according to the system prompts (if it is a BIOS such as Award, you will be prompted to press DEL to enter CMOSSetup. If it is an Intel motherboard, you usually press F2 to enter CMOS Setup). Then select low formatted HardDisk Drive in the CMOS menu menu, and then wait for a low-level hard disk according to the program prompts. At the same time, answer some program questions to perform low-level formatting of the hard disk.

2. Program low-size hard disk

In addition to the DM tool, another relatively common low-lattice program is that it is a low-level formatted hard disk tool launched by Maitto. After running in DOS state, the program starts the warning interface as shown in Figure 3-3-43. The general meaning of this screen is that if the user uses this tool, all data in the hard disk will be lost. Therefore, it is recommended to back up the necessary data before running it, and to remove all other hard disks. If the user forgets to back up the data and wants to exit the program, you can press any key except Y. If the user confirms that the hard disk is low, press the "Y" key.

If "Y" is selected, the program will ask the user to select the hard disk or perform a low-level formatting on the current hard disk. Then, ask a few questions and start the low-level formatting process of the hard disk.