Recovering a Disk Using mhdd 4.6. Hard disk drive (HDD) testing

In the course of their work, they will certainly wear out. Deterioration can be manifested by slow computer performance and freezes. And all due to the fact that unreadable sectors appear on the surface of the hard disk, or as they are also called BAD blocks.

There is a very good and free MHDD program for checking the hard disk for bad sectors. With its help, you can not only find bad sectors, but also try to fix them (reassign).

How to use the MHDD program?

First, we need to write the MHDD boot image to a USB flash drive, since the program runs from DOS.

We insert the USB flash drive into the USB connector of a computer or laptop and, or known to you, write the downloaded MHDD image, thereby creating a bootable USB flash drive.

After the flash drive is written, you need to firstly work the hard disk with ACHI in the IDE. If this is not done, then MHDD will not see your hard drive.

If you did everything correctly and booted from the USB flash drive, then you will see a window like this:

MHDD boot initial window

In it you need to press "Enter", after which the main window of the MHDD program will appear:

Selecting a hard disk by entering the corresponding number

We type a number and press "Enter".

To display the window with the settings for checking the hard disk, click F4 on keyboard.

Verification settings

Here, use the arrows to go down to the line "Remap", press "Enter" and select "On". This enabled us to remap the bad sectors. So that MHDD not only finds them, but also marks them as unused.

Now we press again F4 after which the check of the hard disk itself for bad sectors will start.

In terms of time, the check lasts from 20 minutes to 4 hours, depending on the size and speed of the hard disk. A 1TB disk is checked for about 2-3 hours.

The window on the right displays the test results. Sectors with a response time of 500MS or more (brown and red) are considered before bad, and the more, the worse. UNC (red crosses) these are bads - unreadable sectors.

Check Results - BAD Sector

Since at the beginning of the check the option was enabled Remap- reassigning the BAD sides from the reserve area, it is possible that after a complete check of the hard disk with the MHDD program, the bads will be removed and the hard disk will work for some time.

If, at the end of the check, at the top right there is no sector below 150MS (green), then this means that the surface of your hard disk is in perfect order and there are no BAD sectors on it.

Now you know how easy and simple it is to use MHDD and how to use it to check the hard disk for bad sectors of bad blocks.


The best way to thank the author of the article is to repost to your page

Before issuing this command, you must issue the UNLOCK command

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

FF Write disk sectors. Data for writing is taken from the specified file

AAM Adjust drive noise characteristics

MAKEBAD Generation of BAD blocks. Doesn't work on all drives

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

INIT Reset and recalibration

Fdisk Make one partition for the whole disk. Only MBR changes

SMART / SMART System Management and Attribute View

STOP / Stop spindle

I / Send commands ID, then INIT

ERASE Selective sector erase or full surface erase (low-level formatting)

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

FASTERASE Erasing the surface at maximum speed (using a password system)

TOF Reading disk sectors to a file

Purpose of the program

The Victoria program is designed to test various drives: HDD, flash, RAID arrays, and also allows you to hide defects on the HDD surface, if such an opportunity is present. The author of the program, Sergey Kazansky, is distributed free of charge, you can download 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: Standart, SMART, Test, Advanced and Setup. The API and PIO switches change the mode of operation of the program with the tested disk. PIO mode requires support from the motherboard chipset. Modern systems younger than about 2011 do not support this mode of operation of the program, so we will not describe it. Here is a brief description of the controls in the tabs.

Standart. The window on the right shows a list of drives installed in the system. These are not only hard drives, but also USB sticks, SD, CF and other memory cards readers. They can also be tested. The choice of a device for testing is done by clicking on the desired item. On the right-hand side of the Drive ATA passport window, information about the selected device is displayed. Seek, Acoustic menegment & BAD "er runs the seek test, allows AAM control (if supported by the disk) and simulates bad sectors on the disk.

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

Test. The main tab, with which we will work in the future. The Start LBA / End LBA windows define the beginning and end of the area under test. 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. Rhombus with green arrows - moving forward or backward along the surface of the disc. Block size - the size of a block of sectors read at a time, you can leave it alone. Timeout - the time after which, if there is no response from the drive, the program will transfer to the next sector. End of test - what to do at the end of the test: stop the disk, start the test from the beginning, turn off the disk or turn off the computer. The color bar shows the number of blocks with the specified read time. 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 - erase sector - this test destroys user data. Switches Ignor, Remap, Restore, Erase - work with bad blocks. Ignor - skip. Remap - try to perform the sector reassignment procedure from the reserve. Restore - try to read data and write back (does not work on modern drives> 80GB). Erase - an attempt to write to a bad sector. It can fix it if an incorrect CRC is written to the sector. > - forward test execution.<- выполнение теста назад: с конца диска. >?< - чтение по случайным адресам. >|< - тест «бабочка»: чтение попеременно сначала и с конца диска. 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 by the View part data button. MBR ON / OFF buttons enable / disable the ability to recognize partitions in the operating system.

An example of working with the Victoria program For an example of testing a disk, let's take a faulty WD2600BEVT HDD with 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.
Further, on the SMART tab, you can see the SMART of our disk. Here it is.



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

Attribute 5 Reallocated sector count - the number of reassigned sectors 1287 - the disk is "crumbled".

Attribute 197 Current pending sectors - the number of sectors-candidates for reassignment, when the 5th attribute is full, it means that the disk is "crumbled", the surface is rapidly 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.



Errors of the UNCR type are visible - these are bad, unreadable sectors - bad blocks.

You can uncheck the Grid checkbox, then the disk reading graph will be displayed. In places of bads, 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 bad, but SMART does not have the BAD status yet. It looks like this:



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



The value of the 5th attribute increased and became 1291. During normal operation, disks, in the absence of access to them, launch their own procedures for checking and reassigning sectors in the background, and the number of candidates for remap, in the hundreds, indicates that the disk can no longer maintain a conditional condition and to be replaced. And not always the SMART state "but adequately describes the state of the disk - it can be badly damaged, and the SMART status is displayed as GOOD.

The book outlines methods for recovering data from various storage media - hard drives, RAID arrays, CDs, DVDs, flash memory cards, camera cards and mobile phones. Repair of damaged equipment is considered in the publication only as one aspect of the entire data extraction process. The main topic is the extraction of data damaged due to physical or logical irregularities in the operation of the computer system or incorrect user actions. The book deals with the recovery of accidentally deleted files, the extraction of valuable information from broken hard drives; describes programs and methods for recovering data from damaged RAID arrays, which is critical for the operation of corporate computer systems.

The book does not require special training of the reader: simple step-by-step data recovery procedures are preceded by a description of the principles of their storage on various media.

Book:

MHDD is a 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 arbitrary sectors, manage the SMART system, and much more.

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

Retrieving disk information.

Scanning the surface of the disc.

Saving a disk image to a file.

These operations are united by the fact that they are not associated with writing data to the checked disk, that is, they are non-destructive. It is not worth doing anything else with the disk from which the user is going 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 menu for selecting drives will appear on the screen (Fig. 2.6). Select the disk you want to examine and enter its number from the list. You can invoke this menu at any time by pressing Shift + F3.


Rice. 2.6. Disk selection

2. After specifying the drive (for example, 3), press the Enter key. 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 should issue the message "DRIVE READY" and "DRIVE SEEK COMPLETE", that is, the DRDY and DRSC flags should be highlighted. The BUSY flag signals that the drive is performing some kind of 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 put this sheet next to the computer - this is more convenient.

All commands are entered from the keyboard, the register 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. Enter the ID command for disk information. Another command, EID, displays more detailed information (Figure 2.7).


Rice. 2.7. Disc information

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

MHDD scans drives in blocks. For IDE / SATA drives, one block equals 255 sectors (130,560 bytes). As the scan progresses, 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 the block, then the time increases, but 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 (time exceeded) is different variants of unreadable blocks. The decoding of these errors is as follows:

UNC - Uncorrectable Error, unrecoverable 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, "bad" block without giving 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 the data, not how to repair the hard drive. The caution when scanning is not to get carried away with diagnostics. However, the view of the map may suggest some conclusions.

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

Randomly scattered blocks with various kinds of defects are a sign of a general degradation of the drive. Plates, bearings or heads are worn out. The hard drive may have been "beaten" or overheated.

The "spot", in the middle of which there are absolutely unreadable blocks, surrounded by blocks with extended access times, is a sign of an increasing defect on the plate. We urgently need to extract the image.

Strictly and regularly repeating identical groups of inaccessible blocks are 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 most important data is located on the surface of the plate served by this head, the hard drive must be repaired under special conditions. The plate may not be completely scratched yet.

A useful feature is Acoustic Management. Noise, of course, does not bother the user. However, the level of noise emitted by the movement of the heads is reduced by reducing the speed of their movement. For a faulty hard drive, this may be a measure that can facilitate its operation.

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

2. Enter the value corresponding to the quietest (silent) operation and press the Enter key. This will help the hard drive a little, especially the head unit, for the duration of further manipulations.

At these steps, the diagnostics ends and data recovery begins. MHDD 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 the specified range of sectors (by default from zero to the last sector of this disk) into one file. The image file size cannot exceed 2 GB. If the user decided to create a disk image larger than 2 GB, then it is better to use the ATOF command, since it can automatically divide images into separate files.

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

2. Enter the starting sector number and press the Enter key.

3. Enter the last sector number and press Enter.


Rice. 2.9. Create an image with the TOF command

4. Enter the path and file name of the image you want to create. The name is arbitrary, and the file must be created on a different physical disk.

5. Press Enter to start copying.

After copying is complete, you can disconnect the problem disk and deal with it not with it, but with 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 work can add new bad blocks to the platters or completely ruin the damaged head. The user should start his communication with the problem disk with copying, and postpone diagnostics.

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

Disk boot failure, insert system disk and press enter. The inscription, from which the procession of legions of goosebumps begins on the back, each itself the size of a hard drive. According to the law of meanness, this happens when nothing portends trouble. But do not rush to frantically restart the system - this is a game of Russian roulette. Better to boot from a different media and take on a thorough check. A tried and tested tool - MHDD - will help.

Introduction

If SMART shows problems, most often this means one thing: the disk is about to begin to crumble, and even an extra load of the OS may affect. The next thing to understand is the software "bad" or hardware on it. If there are not so many hard drives, 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 hard drive work and will help you accomplish great feats of recovery and diagnostics. About Victoria, now is the time to deal with the second - archaic, but still mega-useful utility.

MHDD is a small but powerful freeware program that is designed to work with drives at the lowest possible level. 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 whatever you want: diagnose drives, read and write arbitrary sectors, manage the SMART system, password system, noise management system, and change the size of the drive.

Despite the fact that working with MHDD is also possible through the installed Windows, I highly recommend writing the image to a USB flash drive or external (or second bootable) disk and loading bare DOS from there. Believe me, in a hard question, it is better to exclude as much as possible all the 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 chance that the drive will not be recognized in MHDD. The reason may be in the operating mode of the SATA controller (IDE and AHCI) in the BIOS. MHDD, alas, does not support AHCI mode. BIOS settings need to be changed. The worst part is that nowadays not all motherboards support this mode. The only way out can be using a machine with a suitable motherboard or abandoning MHDD.

IDE interface. This interface is characterized by the distribution of devices on the loop - master / slave. By default, MHDD hides all devices in slave mode. There are two ways to fix this. The first one is to change the location of the hard disk (switch the jumper to master) and check if the setting in the BIOS matches. The second way is to try in MHDD to change the disk number to 2 or 4. And do not forget about the mhdd.cfg configuration file, 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 disk via USB using an additional driver and program settings. The driver emulates the SCSI mode. You also need to unplug any unnecessary USB drives. The target disk must be connected before loading the MHDD. In config.sys, you need to write: device = X: \ USBASPI.SYS / w / v, where X: \ is the path to the disk.

So, I take one of the broken disks from the shelf (I usually put the broken label on them) and now I will try to resurrect it to show you how it works in practice. I got 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 up and down with a clear conscience, which greatly simplifies my task. But first, let's figure out a little theory and recovery plan.

Getting ready

Initially, the disk must be initialized by the program, which is quite logical. After that, a surface scan is performed, which gives an understanding of the current state of affairs: MHDD will show the state 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 hardware ones remain. Then 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 the operations, the disk needs to be looked at. If bad blocks continue to appear, then the disk, no matter how hard you try, is no longer a tenant. But in more successful cases, this method should help. As practice shows, after remap, the disc can work for a very long time and even outlive the neighbors in the basket. At other times, he dies immediately after the reboot - here you are lucky, and it is almost impossible to predict the effect.

Do not kill

It is much easier to ditch a disk than to restore it. For example, everyone knows (or should be aware) that the disconnection of the loop during operation leads to dire consequences. It is also highly discouraged to thoughtlessly switch flags and execute 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, you can get down to business! First, create a bootable USB flash drive. For this I recommend - there is a complete instruction and DOS itself. When the media is ready, all that remains is to throw 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 of any device is possible only if it is determined 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 (starting sector). The ending sector is equal to the maximum possible (the end of the disk). All functions destructive with respect to user data (Remap, Erase Delays) are disabled by default.


Let's go through the scan options.

  • Start LBA- the starting sector for scanning, by default 0, that is, the beginning of the disk.
  • End LBA- sector of completion of scanning, by default the end of the disk. Sometimes it is more convenient to scan not the entire surface (especially when the disk capacity exceeds several terabytes), but only the working area where the OS is located. For example, drive C is 50 GB, then the end area will be 2 * 50 * 1024 * 1024 = 104 857 600th sector. It can be calculated 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 hard disk after scanning.
  • Loop test / repair- scan or check 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 equals 255 sectors (130,560 bytes).


This is how scanning works:

  1. MHDD sends a VERIFY SECTORS command with LBA number (sector number) and sector number as parameters.
  2. The drive raises the BUSY flag.
  3. MHDD starts a timer.
  4. After the drive has completed the command, it omits 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 outputs a letter that describes the error.

MHDD repeats steps 1-5 until the final sector. If a scan log is needed, 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 scared too much, here is an excerpt from the certificate:

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

The first thing to do is to erase the entire surface with the erase command. If this does not help, then scan with the EraseWaits option enabled. If the bad blocks have not disappeared, you should run scan with the Remap option enabled.

We restore

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


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


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

The attentive reader, having looked at the pictures of the disk scan, probably whistled and shook his head in sorrow. Yes, my disk, while I was writing the article, died completely. The number of hardware badges exceeded all permissible limits, and by the time the last lines of the article were filled, it was already crunching like a tractor "Belarus". This is by the way that if the disc starts to crumble, then you cannot trust it, especially if there are hardware bads. The remap will be able to 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 the indicators signal

  • BUSY- the drive is busy and does not respond to commands;
  • WRFT- recording error;
  • DREQ- the drive is eager 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, it is just the opposite - it indicates that there are no problems and informs about the successful completion of internal diagnostics;
  • T0NF- Track 0 Not Found - zero track was not found;
  • ABRT- Abort, the command is rejected;
  • IDNF- Sector ID Not found;
  • UNCR- Uncorrectable Error, error not corrected by ECC code. Most likely, there is a logical bad block in this place.

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