Bad sectors – no problem!
09.04.09My Computer, No. 05 (436), 01/22/2007
“…They have no reliability, they have a warranty card…”
From a conversation in the service center.
What is good and what is bad
At the factory, when manufacturing hard drives, after many hours of testing (it lasts from 2 to 12 hours), which is carried out in technological mode, all faulty areas are entered into a table called P-List (primary), after which low-level formatting is performed and the translator is rewritten taking into account bad sectors.
There are strict criteria for selecting high-quality plates, and if the P-List after testing “grows” more than acceptable, the disk will be rejected. In cases where the majority of bad sectors occur at the very beginning of the disk or at its end, this part is simply blocked, and the size of the HDD becomes slightly smaller. A striking example of this is the WD2700 series of drives, essentially stripped down WD2850. (By the way, in service centers the reverse procedure is also possible, so rumors about increasing the HDD capacity have some basis).
The HDD will not write data to bad areas; it simply will not notice them. This is all good, you say, but what to do if bad things appear during the operation of the disk? I will answer: manufacturers have equipped the HDD not only with the already mentioned P-List, but also with a temporary Pending-List (please do not confuse it with primary), a growing G-List (Grown) and a table of servo mark defects.
If during operation of the disk there is a delay in reading a sector (the delay value is determined by the manufacturer), then the sector is placed on a temporary defect list until the circumstances are clarified, and then, with an additional test, it is either declared good and continues to work, or is placed in the G-List and more does not take part in the work. In its place is a sector whose address is in the reserve area of the disk, physically located at the end (i.e., at the center). All this is done by the “smart” HDD logic and controller.
This is a way out, but it also has several disadvantages: firstly, there are delays when writing/reading, and secondly, the reserve area is not dimensionless and has only a few hundred sectors.
But, if errors continue to appear for any reason, the G-List becomes full over time and further filling is impossible. There are two ways out of this situation, the first is to take the disk to a service center, and specialists will rewrite the G-List into a P-List, giving it low-level formatting, the second is to remove the disk and make a stylish cigarette case out of it.
It’s more difficult with servo tags. A servo system is a very complex technology for positioning heads on tracks. The recording density is constantly growing, and the servo system is constantly becoming more complex and improved (it’s not for nothing that disks with a capacity of 200 GB or more began to be made on hydrodynamic bearings, this is also part of the improvement of the drive’s servo system).
If there is a defective servo mark, the head cannot be accurately positioned on the track and “jumps” from side to side. Also, in some cases, the voice coil (head positioner) makes an unpleasant squeak. Another defective servo tag may look like a series of bad blocks, one after another. The hard drive electronics are not able to restore the servo tag on their own.
Defective servo marks are not replaced from the reserve area, and if there are a lot of them, then in the service center these tracks are simply turned off, low-level formatting is performed and the translator is recalculated. In the worst case, entire sides of the plates are turned off.
* * *
There are two groups of bad blocks, physical and logical, let’s look at each of them.
Physical are defects in the surface of the plates. They usually arise due to dust getting between the head and the plate, aging of the magnetic layer and its shedding due to overheating. Unfortunately, physical defects cannot be corrected at home, and some of them cannot be corrected even in service centers.
Logical problems usually arise due to malfunctions of both electronics and mechanics, some of which are fixable, others are not.
Correctable logical defects most often arise due to incomplete writing to the sector, when data was written, but the checksum was not written. The reason for the appearance of such bad problems is trivial – it usually happens when there is a sudden loss of power, and is “treated” at home by “zeroing” the disk.
Uncorrectable logical problems rarely occur in those HDD models in which sectors have headers. The reason for the appearance of such bad problems can be, for example, the drive entering a strong magnetic field. The sector headers are destroyed and the controller is unable to see them. They are called irreparable for the reason that they can only be corrected by low-level formatting in service centers. On new disk models, sector headers are not used, and soon this type of defect will disappear as a class.
Adaptive defects. Adaptives are variables that are generated during disk testing at the factory; they are individual settings for each disk and are written either to the disk ROM or in the service area of the HDD. If the adapter is damaged (static electricity, power failures), many bads may appear on the disk, although the surface itself is fine, and they appear here and there, they are also called ghosts. They can only be treated in service centers by synchronizing the hardware part of the “screw” and the software part.
You can find out about the number of remapped sectors of your disk from the SMART report using the Reallocated Sector Count and Reallocated Event Count parameters; ideally, they should be equal to zero.
A short phrasebook
A translator is a table of disk address space, usually located in a ROM chip on the HDD. The translator is created at the end of the Low Level Format operation, taking into account the bad blocks located in the P-List, and during the disk operation it works in tandem with the controller. Using this table, the physical geometry of the HDD is interpreted into logical (virtual) geometry. Some drive defects occur precisely because of a damaged translator.
Up Date Defects – hiding defects and then recalculating the translator. This type of hiding defects is the most “honest” and is performed only in serious service centers, on special equipment such as the PC-3000 hardware and software complex. It is not easy to find such centers in small towns. In most cases, the disk will be remapped, and the money will be a little less than for Up Date Defects from a reputable company.
A sector is the smallest portion of a hard drive’s surface into which data can be written. Each sector consists of several areas such as the address marker, address checksum, 512 byte data, and error correction codes. Sectors are combined into blocks (clusters) at the file system level, depending on the block size that was specified when it was created.
Remap – replacing defective sectors with intact ones from a special area, which is usually located at the end of the disk (at the center).
In practice, a remap happens something like this: first, the disk surface is read, and if during the process the controller “sees” a read delay that is beyond acceptable limits, then it will attempt to write to this sector (also according to a certain scenario – maybe one, or maybe ten). If the rewrite is successful, the sector remains in working condition and continues to serve, but if writing to it is unsuccessful, the controller enters a relocation flag in the identification field of the bad sector, and the address of the backup one from the G-List in the data field of the same sector. The bad sector address and its identification information are placed in the G-List table.
Now, when a drive accesses a bad sector, it reads the “bad” flag, then the address of the reserve and moves the heads to this area.
On some HDD models, spare sectors are located not at the end of the disk, but directly on the tracks. This method is good because the head does not jump to the end of the disk, and thereby increases the speed of access to remapped sectors.
Remap can be performed without deleting the file system and damaging files; only the file that is in the cluster with this sector can be damaged.
Reassign (assign) is the same as remap. It’s just that the term remap is used when talking about the disk as a whole, and the term assign-reassign is applicable to a single sector.
Automatic Defect Reassignment is an automatic assign that occurs during the hard drive self-test and is invisible to the user.
Low Level Format is performed at the factory when the hard drive is manufactured. During this process, sectors of 512 bytes of data and all headers with error correction codes are created on the bare magnetic surface. Once formatting is complete, a translator is created. At one time, the BIOSes of AT and TX machines had a low-level formatting option, but this was necessary to synchronize the HDD controller, motherboard and the HDD itself. Nowadays, this procedure is no longer advisable, and the manufacturer has excluded this possibility in the normal mode of HDD operation.
And this operation is not as harmless as it seems at first glance: firstly, it is only possible if the disk is switched to technological mode, and, secondly, it lasts more than one hour, and if the electricity is lost during the formatting process, the translator is overwritten will not be and the HDD will have to be taken to a service center for restoration.
Out of ignorance, many users call low-level formatting that is performed in the DOS environment when creating a file system. This is wrong. This type of formatting is called logical or high-level (or more correctly, creating a file system), and this type of formatting differs little from that performed by Windows tools or external programs such as Partition Magic, Acronis Partition Expert, etc.
Victoria Program
The program is designed for diagnostics, testing and minor repairs of hard drives with P-ATAS-ATA interfaces and many types of external IDE controllers. Can work in LBA 28 and 48 bit modes. The program’s requirements are so low that it’s inconvenient to say; the only thing that wouldn’t hurt is good cooling and a high-quality power supply.
Victoria is located on the website http://hdd-911.com, has freeware status and an archive size of approximately 200 Kb. Written in Assembly language. The author of the program is data recovery specialist Sergei Kazansky.
Version 4.2 API Edition has appeared on the program website, which, without any tricks, can work directly with the system disk in the Windows NT2000XP environment via the API. But we will look at version 3.4, which runs in a DOS environment.
It is possible to install version 3.4 on Windows 9xXP, but in this case you need two HDDs (one system, the other patient) and some shamanic dances. I once dealt with version 3.4 installed on Windows XP, but, alas, it blocked access to the HDD in the OS and before reinstalling the system, neither Partition Magic nor Acronis Partition Expert could gain access to the system HDD.
The version for single-tasking mode is the most optimal, because only it accesses the disk, and there will be minimal delays during testing and identifying defects.
After you have downloaded the archive with the program, you need to unpack it and, by inserting a blank floppy disk into the drive, run the MAKEDISK.BAT file, it will prepare a boot floppy disk. It is advisable to save it and create a copy; in the event of an accident, it would be a shame to receive an inoperative version.
On the site you can also download an ISO image for burning to CD. But when loading from a CD, it is no longer possible to take text screenshots (Fig. 1), which are written to a floppy disk in txt format in the SCR folder.
Victoria cannot ruin your hard drive. It sends only standard ATA hexadecimal commands to the controller, such as E2h to stop the spindle motor, and ECh to identify the disk. The 50h (Low Level Format) command has been removed. The only thing you need to be careful with is setting passwords and changing the physical size of disk space.
Here is a list of some of the program’s features:
- Remap using several methods.
- Selecting a channel or controller with an installed HDD manually.
- Setting and removing a password on the HDD.
- Acoustic noise level control. It is achieved by reducing the speed of movement of the block of magnetic heads to the tracks. Reduces noise, heat generation and data access time.
- Tests of mechanics, coating, thermal properties of the drive and its speed characteristics.
- Transferring data from damaged areas of the drive to working ones.
- Resetting the drive. Zeros are written to the surface in blocks of 265 sectors.
- Erasing a disk without the possibility of data recovery (some distant relative of Low Level Format).
- View SMART hard drive.
- Ability to “shrink” the hard drive. That is, there was a 120 GB screw, but it became 100 GB. And neither Partition Magic nor Fdisk will see it. Some motherboard manufacturers do this too, placing a BIOS backup in such areas for recovery. In this area you can store data and open it at the right time, without fear that it has been damaged by a virus or a user (which in some cases is a synonym).
- Reading a disk area to a file and writing from a file to disk from the beginning of the LBA to the end of the file (the maximum file size should not exceed 2 GB).
Test setup
I’ll make a reservation right away: due to the lack of a “bad” disk and the dubious quality of the pictures from the digital digital camera, all the screenshots were taken on Virtual PC 2004. But this does not change the essence of the matter.
Before starting, Victoria offers to choose a download between the Notebook and Desktop platform types, but after thinking for a few seconds, it selects the default, Desktop.
After loading, a program window appears in front of us (Fig. 2).
Our task now is to test the disk and, if there are suspicious sectors on it, try to restore them or transfer them to the G-List. While working with the program, you can use help by pressing F1 (Fig. 3). In general, the program is equipped with a very powerful help system, which can be either context-sensitive or context-independent. You can also create a hint file for yourself and, having recoded it into CP-866, throw it into the root of the floppy disk. You can read files using the built-in file manager (Fig. 4).
First, you need to select the hard drive installed in the system (if there is more than one J). This is done by pressing the P (Latin alphabet) key. If you have an external IDE controller or the drive has an S-ATA interface, then you need to select the lowest Ext item. PCI ATA/SATA and indicate there which channel the HDD is on. One caveat: the channel number must be entered not from the additional digital block, but from the top one, above the QWERTY.
To start scanning the surface, you need to press F4, and the menu for working with the surface will appear in front of us (Fig. 5). In this menu you can select the scanning method, remap type, erase disk, write from file and PIO read to file, as well as interface check.
I will briefly describe the purpose of each of the five fields:
In the Start LBA field, the initial sector from which the check will begin is selected, and in the End LBA field, the sector at which the check will be completed is selected. We choose this way: move the cursor with the arrows to the top field, press Enter, enter which sector to start from, and confirm with Enter. The same procedure applies to the next field, but only here we indicate the end sector of the test.
In the next field, select the reading type:
Linear Read – During these tests, the space is divided into blocks of 256 sectors. In this case, the access time to each block is measured. During a linear read, data is read from the disk, but is not transmitted over the interface. This test is the fastest one presented in Victoria.
Random Read – Block addresses are selected by a random number generator. Access to the blocks takes a little longer due to the chaotic movement of the magnetic heads. This type of reading emulates the behavior of a disk when working with a multitasking operating system and has no ending.
BUTTERFLY – reading occurs in blocks of 256 sectors, alternately. First, a block is read from the end of the disk, then a block from the beginning of the disk, and so on until the blocks “meet” in the center. By the way, this method is professional and is used during HDD testing at the factory.
This field also allows you to select options such as PIO read, PIO read to file, write (zero), interface check, and write from file.
After choosing a reading method, you need to choose one of four types of remapping:
Ignore Bad Block – Remap disabled.
BB Classic Remap is a very controversial type of defect hiding, for the reason that a single attempt to write to a sector occurs (and this may not be enough to correct the defect). More complex verification algorithms make more than one attempt to rewrite a sector. Overwrites the data of only one sector, so that no data is lost, except for the file that was located in the defective sector and was already partially damaged.
BB Advanced Remap is a more advanced method of hiding defects. The main difference from Classic Remap is that this method is more sensitive and makes not one, but ten attempts to write a sector. If everything goes well, then Victoria will write data to this sector and it will not end up in the G-List. Well, if it is not possible to rewrite this sector, then it will be declared defective and an assign will be made to it.
BB Fujitsu Remap – Remap Fujitsu hard drives of certain models. This remapping method contains algorithms that improve work with HDD drives from this company, and even only some models.
BB Erase 256 Sect – erases a selected area of the disk, in blocks of 256 sectors, and writes zeros there. In some cases, it helps to get rid of logical problems when there are a lot of them. This is the “zero” of the disk.
Flaw detector – used mainly for in-depth analysis of the surface and interface and serves to distinguish regular errors from random ones; we won’t need it for now.
To achieve better remapping results, the author of the program, Sergei Kazansky, recommends combining the BUTTERFLY scanning mode with Advanced Remap.
Have you set it up? Let’s start the test!
Before starting a surface check or remapping, we need to mark the boundaries of the LBA space that we will scan, or leave the entire disk space for scanning. Then select the BUTTERFLY mode and the Advanced Remap remapping option. After making your selection, press Enter or F4. That’s it, test or test plus Remap in progress (Fig. 6).
When the program finds sectors in which delays occur, it will draw a rectangle in the lower right window, the color of which will indicate the time of this delay. Bads will be displayed with red crosses, and the “Defects” field will indicate the address of the defective sector and the type of error that the controller returned (for example, a logical bad has an UNCR error code). If you run a scan in combination with remapping, then a blue patch will appear in place of the bad that the controller moved to the G-List.
In practice, it’s rare to find drives with no 50ms latency, so don’t despair when Victoria found even a 200ms latency on the platter surface. They can arise due to many factors, because the HDD does not operate in a technological mode. The main thing is that there are no more significant delays. For example, when the cooler was running almost right next to the hard drive, Victoria produced nineteen delays of 50 ms, and when I turned off the cooler, their number decreased to four.
Lastly
For more serious actions, I strongly recommend that you carefully study the help, fortunately it is very detailed and professional, otherwise one of my friends put a User password on the disk, and then paid money to specialists to remove it. Passwords and changing the disk size are a very responsible matter and you do it at your own peril and risk, no matter how trivial it may sound.
Using this wonderful program, I was able to hide defects on four “bad” screws. If defects continue to appear, it is advisable not to use the drive at all, or to store data on it that is not critical to errors during recovery – for example, video, sound, text files. You most likely will not be able to launch the executable or archive.
The article was prepared using the Victoria (free) program, all rights to the program belong to Sergei Kazantsev
Maxim DERKACH aka Astra
Web-droid editor
Don't miss interesting news
Subscribe to our channels and read announcements of high-tech news, tes
Acer Nitro V 14 ANV14-61 (N9.QTFWW.001) gaming laptop review: ice and power
Acer Nitro V 14 ANV14-61 looks elegant, despite its gaming credentials. It has a good screen, a processor and a graphics card with sufficient performance. What else is interesting about it?
Realme Neo7 smartphone gets Mediatek Dimensity 9300+, 6000 nit screen and 7000 mAh battery MediaTek Realme smartphone
Realme has introduced its new smartphone Realme Neo7, offering good specifications at a competitive price
YouTube adds voiceover feature for videos in other languages video YouTube
YouTube has introduced an automatic video dubbing feature based on artificial intelligence, which allows you to create audio tracks in multiple languages