Mhdd low-level formatting command. Hard disk drive (HDD) testing. Reading sectors to a file in MHDD

Purpose of the program

The Victoria program is intended for testing various drives: HDD, flash, RAID arrays, also allows you to hide HDD surface defects, if such a possibility is present. The author of the program is Sergey Kazansky, it is distributed free of charge, you can download it http://hdd-911.com/

Brief description of the program

On Vista and older systems, the program must be run as Administrator, even if your Account has administrator rights.

The program window is divided into several tabs: Standard, SMART, Test, Advanced and Setup. The API and PIO switches change the mode of operation of the program with the disk under test. PIO mode requires support from the motherboard chipset. Modern systems Programs younger than approximately 2011 do not support this mode of operation, so we will not describe it. Let's bring short description control elements in tabs.

Standard. The window on the right shows a list of drives installed in the system. These are not only hard drives, but also USB flash drives, SD, CF and other memory card readers. They can also be tested. Selecting a device for testing is done by clicking on the desired item. Immediately on the left in the Drive ATA passport window, information about the selected device is displayed. Seek, Acoustic management & BAD"er runs the seek test, allows you to manage AAM (if supported by the disk) and simulate bad sectors on the disk.

S.M.A.R.T. When you press the Get SMART button, the SMART is read. USB drives are not supported. The remaining buttons SMART ON, SMART OFF, Auto save attributes ON/OFF allow you to enable/disable SMART monitoring and save the read attributes.

Test. The main tab that we will work with in the future. The Start LBA/End LBA windows specify the beginning and end of the tested area. By default, the entire disk is tested. Pause – pauses the test, the value changes to Continue. Start – starts the selected test, changes the value to Stop – stops the test. Diamond with green arrows - moving forward or backward along the surface of the disk. Block size – the size of the block of sectors read at a time; you can leave it alone. Timeout – time after which, if there is no response from the drive, the program will move to the next sector. End of test – what to do at the end of the test: stop the disk, start the test over again, turn off the disk or turn off the computer. The color scale shows the number of blocks with specified time reading. Switches Verify, Read, Write – test selection. Verify - check: the disk reads the sector, but does not transfer its contents to the computer. Read – reads a sector into the computer. Write – erases a sector - this test destroys user data. Switches Ignor, Remap, Restore, Erase – mode of working with bad blocks. Ignore - skip. Remap – attempt to perform the procedure of reassigning a sector from the reserve. Restore – attempts to read data and write it back (does not work on modern disks >80GB). Erase – an attempt to write to a damaged sector. It can correct it if an incorrect check sum (CRC) is written to the sector. > - test execution forward.<- выполнение теста назад: с конца диска. >?< - чтение по случайным адресам. >|< - тест «бабочка»: чтение попеременно сначала и с конца диска. Break All – отмена всех команд. Sleep – остановить диск. Recall – включить диск снова (после sleep).

Advanced. The main window shows the contents of the sector specified in the Sec field. The window below shows the contents of the partition table using the View part data button. The MBR ON/OFF buttons enable/disable the ability to recognize partitions in the operating system.

Example of working with the Victoria program For an example of testing a disk, let's take a faulty HDD WD2600BEVT, which has surface damage and bad attributes in SMART. We launch the program, select our disk and see the following: on the left we see the parameters of the selected disk.
Next, on the SMART tab, you can see the SMART of our disk. Here he is.



We see that the program interprets it as bad. Let's take a closer look.

Attribute 5 Reallocated sector count – number of reassigned sectors 1287 - the disk “crumbles”.

Attribute 197 Current pending sectors – the number of candidate sectors for reassignment; if the 5th attribute is full, it indicates that the disk is “crumbling”, the surface is quickly degrading.

This means that if you need data from a disk, you need to copy it immediately, and not try to repair such a disk. The actions that we will consider next can lead to the loss of information.



You can see errors like UNCR - these are bad, unreadable sectors - bad blocks.

You can uncheck the Grid checkbox, then a disk reading graph will be displayed. In places where there are bad spots, speed dips are visible, marked in red.



At the end of the test, you can try to hide the bad sectors by selecting the Remap mode. This can help if there are bads, but SMART does not yet have BAD status. It looks like this:



The result of the remap can be viewed by reading the smart disk. Here he is:



The value of the 5th attribute increased and became 1291. During normal operation, disks, if there are no calls to them, are started in background own procedures for checking and reassigning sectors and the number of candidates for remap, numbering in the hundreds, indicate that the disk can no longer maintain its condition and must be replaced. And the SMART status does not always adequately describe the condition of the disk - it can be severely damaged, and the SMART status is displayed as GOOD.

MHDD Program

MHDD – small but powerful free program, designed to work with hard drives at the lowest level (bypassing the BIOS). It can diagnose drives, read and write random sectors, manage the SMART system, and much more.

The program distribution can be found on the developer’s website http://www.ihdd.ru. You can download MHDD as a CD image (mhdd32verx.x.iso file) or a self-extracting floppy image. On the same site is a new version documentation for the program. By default, the program works with a hard drive connected to the Secondary IDE channel as the first device (Master). She can also work with SATA drives or SCSI. The MHDD program has many functions. Here are just a few steps.

Get disk information.

Scanning the disk surface.

Saving a disk image to a file.

These operations are united by the fact that they are not associated with writing data to the disk being checked, that is, they are non-destructive. There is no point in doing anything else with the disk from which the user intends to recover information. The main task is only to assess the situation, and not to check the disk, which is the main purpose of the MHDD program.

1. Burn the program to a CD, and then boot your computer from it. The drive selection menu will appear on the screen (Fig. 2.6). Select the drive you want to examine and enter its number from the list. You can call this menu at any time by pressing Shift+F3.

Rice. 2.6. Disc selection

2. After specifying the drive (for example, 3), press Enter. The program is ready to work with this hard drive. At the top of the screen are registers, or flags. Any IDE or SATA device must display a “DRIVE READY” and “DRIVE SEEK COMPLETE” message, that is, the DRDY and DRSC flags must be highlighted. The BUSY flag signals that the drive is performing some operation, such as reading or writing.

You can get help about commands at any time by pressing the F1 key. Nevertheless, many people prefer to print out the list of commands in advance and place this sheet of paper next to the computer - it’s more convenient.

All commands are entered from the keyboard; case does not matter. Entering any command is completed by pressing the Enter key. To cancel or interrupt the execution of a command, use the Esc key.

3. To obtain disk information, enter the ID command. Another command, EID, displays more detailed information (Figure 2.7).

Rice. 2.7. Disk information

4. To scan the surface, press F4 or enter the SCAN command and press Enter. A menu will appear where you can change some settings. By default, the starting sector number is zero (start sector). The ending sector number is equal to the maximum possible (end of the disk). All functions that can change or destroy data on the disk (Remap, Erase Delays) are disabled by default. To start scanning, press F4 again.

MHDD scans drives in blocks. For IDE/SATA drives, one block is equal to 255 sectors (130,560 bytes). As you scan, a map of blocks is built on the screen (Fig. 2.8). To the right of it is a “legend”. The shorter the block access time, the better. If problems arise when accessing a block, the time increases; if an error occurs, the corresponding symbol is displayed on the map.

Rice. 2.8. Surface scanning

Everything that is listed in the legend below the question mark (exceeding the permissible access time) is different variants of unreadable blocks. The interpretation of these errors is as follows:

UNC – Uncorrectable Error, uncorrectable error;

ABRT – Abort, command rejected;

IDNF – Sector ID Not found, sector identifier not found;

AMNF – Address Mark Not Found, address mark not found;

T0NF – Track 0 Not Found, it is impossible to find the zero track;

BBK – Bad BlocK, a “bad” block without specifying a reason.

The main thing here is to understand that all these are the results of physical defects inside the HDA. It is important to decide how to save data, not how to repair the hard drive. The caution when scanning is not to get carried away with diagnostics. However, the appearance of the map may suggest some conclusions.

Regularly repeating blocks with increased access time are the result of positioning the heads on the next cylinder. This is completely normal.

Randomly scattered blocks with various types of defects are a sign of general degradation of the drive. Plates, bearings or heads are worn. Perhaps the hard drive was “beaten” or overheated.

A “spot” in the middle of which there are completely unreadable blocks surrounded by blocks with increased access time is a sign of an increasing defect on the wafer. We urgently need to extract the image.

Strictly and regularly repeating identical groups of inaccessible blocks is a sign of a faulty head. If you wish, you can even calculate this head based on the physical geometry of the disk. If the surface of the plate served by this head contains the most important data, the hard drive must be repaired under special conditions. Perhaps the plate is not completely scratched yet.

A useful feature is acoustic noise control (Acoustic Management). The noise, of course, does not bother the user. However, the noise level produced when the heads move is reduced by reducing the speed at which they move. For a faulty hard drive, this may be a measure that can facilitate its operation.

1. Type the AAM command and press Enter. Here you can see the possible parameter values ​​supported by this hard drive.

2. Enter the value corresponding to the quietest operation and press Enter. This will help the hard drive a little, especially the head block, during further manipulations.

With these steps, the diagnostics ends and data recovery begins. The MHDD program is capable of copying individual sectors or an entire disk to a file or set of files. The program skips defective unreadable sectors.

The TOF command copies a specified range of sectors (by default, from sector zero to the last sector of this disk) into a single file. The image file size cannot exceed 2 GB. If the user decides to create a disk image larger than 2 GB, then it is better to use the ATOF command, since it can automatically divide the images into separate files.

1. Type the TOF command and press Enter. The Fast Disk Image Creator prompt will appear (Fig. 2.9).

2. Enter the starting sector number and press Enter.

3. Enter the last sector number and press Enter.

Rice. 2.9. Creating an image with the TOF command

4. Enter the path and name of the image file to be created. The name is arbitrary, and the file must be created on another physical disk.

5. To start copying, press the Enter key.

Once the copying is complete, you can disconnect the problematic disk and work not on it, but on the file - its sector-by-sector copy. This will protect the disk from further damage: if the hard drive starts to malfunction, every extra minute of operation can add new bad blocks to the platters or permanently damage the damaged head. The user should begin his communication with the problem disk with copying, and postpone diagnostics.

Which program to make the copy with is an open question. There is no definitive answer to this. MHDD program and very similar to it Victoria program create fewer problems when reading hard drives with numerous physical defects. Such problems may be the program itself or the entire computer freezing when trying to read some bad sectors. On the other side, R-Studio program somewhat more convenient, especially since you still need to extract data from the image using this program. Conclusion: you can try using several programs.

From the book Fedora 8 User Guide author

4.4.2. xsane program There is no need to perform any steps to configure the scanner in Fedora 8. Just connect the scanner to your computer and run the xsane utility (menu command Applications? Graphics). The xsane program will detect the scanner itself and after that you can start scanning by clicking

From the Linux for the User book author Kostromin Viktor Alekseevich

4.7.1. The tar program A reader accustomed to archivers like arj, which collect files into a single archive and immediately “compress” them, may have the question “Why use two programs?” The thing is that tar stands for Tape ARchiver, it does not compress data, but only combines

From book Windows Vista author Vavilov Sergey

10.2. rpm Program The name of this program (or command) is an abbreviation for Redhat Package Manager. This decoding is given in most books and manuals on Linux and seems to me more correct and logical, although Chapter 6 of “The Official Red Hat Linux Reference Guide” says: “The RPM Package Manager (RPM), is an open

From the book DIY Linux server author Kolisnichenko Denis Nikolaevich

12.2.3 The gv program The gv program (or ghostview) was developed by Johannes Plass and is designed to view PostScript and PDF files (Fig. 12.2). After launching it without specifying a file name, the main program window will be empty. To open a file, you need to click on

From the book Self-instruction manual for working on a computer author Kolisnichenko Denis Nikolaevich

13.3.2 ftp program The ftp program is user interface to the standard Internet file transfer protocol - File Transfer Protocol. The program allows you to transfer files to a remote computer and receive files from remote computer. However, by entering the ftp command, you

From the book Programming in Prolog for artificial intelligence author Bratko Ivan

Program A program is a sequence of machine instructions (a system of commands understandable to the processor) designed to perform a specific task. As a rule, the program is designed in the form of one or more executable files, which, after installation,

From the book The C Programming Language for personal computer author Bochkov S. O.

2.6.2. RPM Installation Program software in Red Hat and Mandrake distributions it is done using the rpm program. RPM (red hat package manager) is the Red Hat package manager. Even though it has "Red Hat" in the name, it is entirely intended to operate as an open source package

From the book Ubuntu 10. Quick Start Guide author Kolisnichenko D. N.

Nero Express Software The best program for burning discs Burn discs using Windows not interested. Firstly, it’s boring, and secondly, you don’t have access to any recording settings, you can’t even specify the speed, let alone select the disc format or recording method. Here

From the book The C Language - A Guide for Beginners by Prata Steven

4.5.1. Program 1 First you need to choose a way to represent the position on the board. One of the most natural ways is to think of the position as a list of eight elements, each corresponding to one of the queens. Each such element will describe that field

From the book Anonymity and Security on the Internet. From the “teapot” to the user author Kolisnichenko Denis Nikolaevich

4.5.2. Program 2 In accordance with the representation of the board adopted in program 1, each decision looked like the queens were simply placed in successive verticals. No information would be lost if the X-coordinates were omitted. That's why

From the author's book

4.5.3. Program 3 Our third program for the eight queens problem is based on the following considerations. Each queen must be placed on a certain square, i.e. on some vertical, some horizontal, and also at the intersection of some two diagonals. For that,

From the author's book

Source Program A source program is a collection of the following elements: preprocessor directives, compiler instructions, declarations, and definitions. Preprocessor directives specify the actions of the preprocessor to transform program text

From the author's book

9.3. apt-get Let's assume you have a package.deb. When installing it, I discovered that it requires the lib.deb package, which you do not have installed. Well, you find the missing package on the Internet, install it using the method described in section. 9.2 (that is, using

From the author's book

20.3. The bum program Previously, Ubuntu had a Services program (in the System | Administration program group), which allows you to enable/disable system services. Modern versions of Ubuntu do not have such a program. But you can install the Boot-Up Manager program, which is even better than

From the author's book

Program Below is a short program that allows you to find out the character code number even if your machine does not use ASCII code. main() /* determines the character code number */( char ch; printf(" Please enter a character. "); scanf(" %c", &ch); /* input

From the author's book

P1.1. AVZ program The AVZ program (Zaitsev Anti-Virus) is a very useful utility, and it has helped me out more than once since the days of Windows XP. Then I used Kaspersky anti-virus, which could not work in safe mode. It turned out like this - everything that the main antivirus missed, in

Recently, manufacturers have seriously taken up the problem of reducing the noise level emitted by drives.
Some have achieved amazing results - for example, Seagate managed to reduce the spindle noise of the fourth “barracuda” so much that it was no longer perceptible to the ear.
But rotating pancakes are not the only source of noise in hard drive mechanics.

The head drive is also noisy - its sharp movements cut through the air inside the can, generating a “grunting” positioning sound.
Of course, it can be slowed down by changing the shape of the current in the coil to a smoother one, but this will inevitably cause a deterioration in such an important hard parameter as access time - it is this that determines the performance disk subsystem in multitasking environments, and when working with many small files.

At the same time, there are tasks in which fast positioning is not needed at all, but silence is needed - for example, when working in office applications, when playing music and movies.

How can we be here?
It is this problem that was solved by hard drive developers quite recently - the ATA specification introduced the “Automatic Acoustic Management” (AAM) function - rapid adjustment of the noise level emitted by the drive as a result of the movement of the heads by reducing the speed of their movement.

AAM can be managed by proprietary utilities of some hard drives, for example IBM and Maxtor.
But they make it extremely inconvenient - the user does not have the ability to quickly assess the current noise level.

In MHDD, all this is implemented much more conveniently: just enter “AAM” into the console, and the hard drive itself will begin to crack its heads, demonstrating its noise level.
And you can change it with the keys “M” (minimum noise level), “L” (medium) and “P” (maximum).

The “D” key turns off AAM completely, while the hard drive becomes as fast as possible, but at the same time as loud as possible.
You can switch the hard drive directly from Windows 9x at any time, unlike other “branded” utilities (Fig. 3).

Figure 3. Automatic Acoustic Management

Security Options

Have you ever wanted to protect your information from strangers?
Of course, such a desire sometimes arises, especially if several people work at the computer.
Personal correspondence, documents, or even just well-functioning operating system- not far full list something that you want to protect and protect from someone else’s invasion.

The most common way to restrict access to confidential information is to create encrypted partitions on the hard drive, archiving with a password, and password-protecting all file system at the logical level ( special programs in the boot sector of the HDD), and sometimes physically changing the entire hard drive (for example, using a mobile rack).

But such protection has many disadvantages.
The information still remains on the media, and although it is not explicitly accessible (protection programs are often limited to encryption only boot entry, leaving even FAT unchanged), it can be easily extracted from such a disk by running a disk editor on it, or (which is simpler) one of the programs for saving information, for example the well-known “Easy Recovery”.

On-the-fly file encryption is more resistant to hacking, but its operation requires a permanent memory resident that intercepts part of the system API and creates a considerable load on the central processor.

And no one is immune from such a program glitching or freezing at the most inopportune moment.
And even if the encrypted partition is damaged (for example, by viruses), it will be extremely difficult to extract information from it.

Ideally, a security system should meet 3 basic requirements:
1. Be independent of the OS, file system, computer and their glitches.
2. Be reliable and difficult to break.
3. Do not take up system resources.
And it would have remained a dream if no one had thought to entrust this to the hard drive controller!

This was proposed by the developers of the ATA/ATAPI-3 standard back in 1996, but hard drives that actually support security functions appeared relatively recently.
This feature is called “Security Set”, and in common parlance - ATA password.
It allows you to protect the entire contents of the hard drive not only from reading, but also from writing, and even from low-level formatting!

This was achieved by integrating a protection program directly into the hard drive.
It communicates with the outside world through a regular IDE interface - you only need a utility that can do this correctly.
BIOSes of some motherboards they know how to set a password on modern hard drives, and on many laptops (for example, from DELL), this has long become the norm.

But now we don’t need to be the owner of a super-cool board or laptop to protect our information - this can be done on any computer using MHDD!
And not only from the BIOS, but also from DOS and Windows at any convenient time.
Let's try to figure out how it works.

We launch MHDD, and by pressing the + key combination, select the hard drive to which we want to deny access.
Click.
Pay attention to the line “Security: High, Off” - it means that the password for the hard drive is not set (Fig. 4).

Driver AMD Radeon Software Adrenalin Edition 19.9.2 Optional

A new version AMD drivers Radeon Software Adrenalin Edition 19.9.2 Optional improves performance in Borderlands 3 and adds support for Radeon Image Sharpening technology.

Cumulative Windows update 10 1903 KB4515384 (added)

On September 10, 2019, Microsoft released a cumulative update for Windows 10 version 1903 - KB4515384 with a number of security improvements and a fix for a bug that broke Windows operation Search and caused high CPU usage.

Before issuing this command, the UNLOCK command must be issued.

RPM Change spindle speed(this procedure is not guaranteed to work)

FF Write disk sectors. The data to be recorded is taken from the specified file

A.A.M. Configure the noise characteristics of the drive

MAKEBAD Generation of BAD blocks. Does not work on all drives

RANDOMBAD Generation of bad blocks, scattering them randomly across the surface

INIT Reset and recalibration

FDISK Make one partition for the entire disk. Only MBR changes

SMART / Control the SMART system and view attributes

STOP / Stop spindle

I/ Send ID commands, then INIT

ERASE Selectively erase sectors or completely erase a surface (low-level formatting)

To erase directly, bypassing the BIOS, you can disable the disk in the BIOS settings, or erase with the parameter /DISABLEBIOS.On the erasing speed this parameter does not affect.

FASTERASE Surface erasing at maximum speed (password system is used)

TOF Reading disk sectors to a file

Disk boot failure, insert system disk and press enter. An inscription that sends legions of goosebumps down your spine, each one the size of HDD. According to the law of meanness, this happens when nothing portends trouble. But don’t rush to frantically restart the system - this is a game of Russian roulette. It's better to boot from another medium and do a thorough check. A proven tool will help with this - MHDD.

Introduction

If SMART shows problems, most often this means one thing: the disk is about to start crumbling, and even an extra OS load can have an effect. The next thing you need to understand is whether it is software or hardware. If there are not so many hardware ones, then you can still try to bring the disk back to life.

I think you've heard of products like MHDD and Victoria. They are indispensable for low-level work with hard drive and will help you accomplish great feats in recovery and diagnosis. About Victoria, now it’s time to deal with the second - archaic, but still mega-useful utility.

MHDD is a small but powerful free program that is designed to work with drives at the lowest level (as possible). The first version was released by Dmitry Postrigan in 2000. It could scan the surface of an IDE drive in CHS mode. Now MHDD is much more than a diagnosis. With MHDD you can do anything: diagnose drives, read and write arbitrary sectors, manage the SMART system, password system, control system noise characteristics, and also change the size of the drive.

Despite the fact that working with MHDD is possible through installed Windows, I highly recommend burning the image to a flash drive or external (or second bootable) drive and loading bare DOS from there. Believe me, in a hardware issue it is better to eliminate as much as possible all links in the chain that can lead to glitches or freezing of the computer during operation.

Oh those interfaces

Not every interface can be correctly recognized by the program.

SATA interface. There is a possibility that the disk will not be detected in MHDD. The reason may be the operating mode of the SATA controller (IDE and AHCI) in the BIOS. MHDD, alas, does not support AHCI mode. Needs to be changed BIOS settings. The worst thing is that nowadays not all motherboards support this mode. The only way out is to use a machine with a suitable motherboard or abandon MHDD.

IDE interface. For of this interface The typical distribution of devices on the loop is master/slave. By default, MHDD hides all devices in slave mode. There are two ways to fix this. The first is to change the location of the hard drive (switch the jumper to master) and check that the settings in the BIOS match. The second way is to try changing the disk number in MHDD to 2 or 4. Well, don’t forget about configuration file mhdd.cfg, which is located in the CFG folder. In this case, the parameter PRIMARY_ENABLED=TRUE is important.

SCSI interface. The SCSI controller driver may not be detected.

USB interface. It is theoretically possible to connect a drive via USB using an additional driver and program settings. The driver emulates the operating mode via SCSI. You also need to disconnect all unnecessary USB drives. The target drive must be connected before MHDD can boot. In config.sys you will need to write: device=X:\USBASPI.SYS /w /v , where X:\ is the path to the disk.

So, I'm taking one of the broken disks off the shelf (I usually put the broken label on them) and now I'm going to try to resurrect it to show you how it works in practice. I ended up with a WDC WD7500BPVX-60JC3T0 screw with a vinaigrette instead of the system and all the files on it.

Since the situation is so sad, I can format the disk inside and out with a clear conscience, which greatly simplifies my task. But first, let's look at a little theory and recovery plan.

Getting ready

Initially, the disk must be initialized by the program, which is quite logical. After this, a surface scan is performed, which gives an understanding of the current state of affairs: MHDD will show the condition of the hard surface. Then you will need to format the disk and check again. Usually at this stage the soft bads disappear, and only the hard ones remain. Next, you can perform the REMAP procedure to reassign the bad blocks to the service area.

The main problem is that the service area is not rubber, and even after all operations the disk needs to be looked after. If bad blocks continue to appear, then the disk, no matter how hard you try, is no longer alive. But in more successful cases, this method should help. As practice shows, after a remap the disk can last for a very long time and even outlive its neighbors in the basket. Other times he dies immediately after the reboot - it depends on your luck, and it is almost impossible to predict the effect.

Thou shalt not kill

It is much easier to destroy a disk than to restore it. For example, everyone knows (or should know) that disconnecting the cable during operation leads to dire consequences. We also strongly discourage you from thoughtlessly switching flags and executing commands in MHDD. Read the documentation carefully and don’t start doing something if you don’t fully understand what it might lead to.

Well, we can get down to business! First, let's create bootable USB flash drive. For this I recommend - complete instructions and DOS itself is there. When the media is ready, all that remains is to drop MHDD into its root, so as not to once again climb through directories from the command line.

In order for the disk connected to the first channel to be accurately displayed, you need to edit the mhdd.cfg config, which is located in the CFG folder.

PRIMARY_ENABLED=TRUE

As I already said, scanning any device is only possible if it is identified by the ID or EID commands (or by pressing F2).


Scanning

To scan, type SCAN and press ENTER or use F4. A menu will appear from which you can change some of the settings. By default, the starting sector is zero (start sector). The final sector is equal to the maximum possible (end of the disk). All functions destructive to user data (Remap, Erase Delays) are disabled by default.


Let's go through the scanning parameters.

  • Start LBA- the initial sector for scanning, by default 0, that is, the beginning of the disk.
  • End LBA- sector of scanning completion, by default the end of the disk. Sometimes it is more convenient to scan not the entire surface (especially when the disk volume exceeds several terabytes), but only the work area where the OS is located. For example, disk C is 50 GB, then the final area will be 2 * 50 * 1024 * 1024 = 104,857,600th sector. You can calculate it more simply: (volume * 2) * 1,000,000, total 100,000,000.
  • Remap marks the sector as bad in a special service area, after which the disk does not access it.
  • Timeout- delay time for reading a sector, after which the check proceeds to the next sector.
  • Spindown after scan- stop the hard drive after scanning.
  • Loop test/repair- carry out scanning or testing cyclically.
  • Erase Delays- erase sectors in which read delays are detected.

Press F4 again to start scanning. MHDD scans drives in blocks. For IDE/SATA drives, one block is equal to 255 sectors (130,560 bytes).


Here's how scanning works:

  1. MHDD sends the VERIFY SECTORS command with the LBA number (sector number) and sector number as parameters.
  2. The drive raises the BUSY flag.
  3. MHDD starts the timer.
  4. After the drive has completed the command, it lowers the BUSY flag.
  5. MHDD calculates the time spent by the drive and displays the corresponding block on the screen. If an error (bad block) is encountered, the program displays a letter that describes the error.

MHDD repeats steps 1–5 until the final sector. If you need a scan log, it can always be found in the log/mhdd.log file. During scanning you can see many rectangles of different colors. So that you don’t get too scared, here is an excerpt from the certificate:

The presence of red (>500 ms) blocks on a completely healthy drive is unacceptable. If they exist, it is necessary to erase the entire surface of the disk and, if this does not help, get rid of the delays, we can conclude that this drive is no longer reliable enough. Letter-character blocks, such as x , S , etc., are not allowed: they indicate the presence of bad blocks on the surface.

The first thing to be done is to completely clean the surface with the erase command. If this does not help, then scan with the EraseWaits option enabled. If the bad blocks still do not disappear, you should run scan with the Remap option enabled.

We restore

If the scan reveals errors, the first thing you need to do is copy all the data from the drive (if, of course, you need it). In my case this was irrelevant. Then you need to completely clear the surface using the ERASE command, which erases every sector on the drive.


The drive will recalculate the ECC fields for each sector. This helps get rid of the so-called soft-bad blocks. If erasing does not help, run the scan with the REMAP option enabled.


If you see that every block contains an error, do not try to erase the drive or scan with the REMAP option enabled. Most likely, the drive's service area is damaged, and this cannot be fixed with standard MHDD commands.

An attentive reader, looking at the pictures of the disk scan, probably whistled and shook his head sadly. Yes, my disk completely died while I was writing the article. The number of hardware bads exceeded all permissible limits, and by the time the last lines of the article were typed, it was already crunching like a Belarus tractor. By the way, if a disk starts to crumble, you can’t trust it, especially if hardware problems appear. Remap can help when the disc has not yet begun to actively crumble, but defects have appeared on the surface. In any case, even if you managed to fix it, use such a disk only for non-critical data and in no case as the main one.

What do the indicators signal?

  • BUSY- the drive is busy and does not respond to commands;
  • WRFT- recording error;
  • DREQ- the drive wants to exchange data with the outside world;
  • ERR- an error occurred as a result of some operation.

When ERR lights up, look at the top right of the screen: the type of the last error will be displayed there:

  • AMNF- Address Mark Not Found - access to a specific sector failed. Most likely means that the sector is damaged. However, immediately after turning on the drive, just the opposite - it indicates the absence of problems and reports the successful completion of internal diagnostics;
  • T0NF- Track 0 Not Found - zero track was not found;
  • ABRT- Abort, command rejected;
  • IDNF- Sector ID Not found;
  • UNCR- Uncorrectable Error, an error not corrected by the ECC code. Most likely, there is a logical bad block in this place.

Two more indicators may appear at the top: PWD signals that a hardware password has been set, HPA appears if the drive size has been changed using the HPA command (usually used to hide bad blocks at the end of the disk).