-Does your computer fail to bootup?
-Does your computer freeze and reboot?
-Cannot access your data due to the lost password?
-Does your computer contain critical data?
-Don't have a recent backup?
-Reformatted your harddrive?
-Accidentally deleted files?

Our blog will provide the relevant information on free tools, techniques, and approaches to recover your computer and get your valuable data back.

Showing posts with label harddrive data recovery. Show all posts
Showing posts with label harddrive data recovery. Show all posts

Data Recovery Basics

File Storage: Sectors and Clusters: File Recovery

When you purchase a new hard drive and before it has any data on it, it is has usually already undergone a ’low level format’. The purpose of a low level format is to divide all the magnetic space on the hard drive into small storage areas. These storage areas are known as ’sectors’, however for efficiency purposes the Operating System (e.g. Windows XP) groups sectors together into ’clusters’.

A cluster is the smallest unit of storage space with which the Operating System (e.g. Windows XP) will deal. If you save a very small file to your computer it will all fit within 1 storage cluster on the hard drive. If you save a very large file it may fill up many clusters, that is, as many clusters as it takes to hold all the content of the file.

File Allocation Table (FAT) or Master File Table (MFT): NTFS recovery and FAT recovery

On older Operating Systems such as Windows 98 there is a storage area known as the ’Root Directory’. This is the place which stores the name of a file, the location of its starting cluster, and the size of the file. In order to find a file the Operating System uses this information to get to the first storage cluster of a file. It then uses a special table at the start of the disk know as the File Allocation Table or FAT to identify the remaining clusters that are used to store the file. It is important to realize that this information is stored completely separate from your file data and is why FAT data recovery is possible.

In newer Operating Systems the FAT and Directory Entry method has been merged and replaced by a single table known as the Master File Table or MFT. Whilst an MFT is more complex, the principal of locating the start of a file and its subsequent storage clusters is essentially the same.

What happens when I delete a file?

Lets look to see what happens when you intentionally delete a file and why it may be possible to bring that file back. When you select a file and press the delete key on a Windows computer the file is sent to the Recycle Bin. You may think of the Windows Recycle Bin as just another fancy storage folder on your hard drive. The ’real’ deletion (at least as far as this article is concerned) is what happens when the Recycle Bin is emptied or the deletion bypasses the Windows Recycle Bin altogether.

When a file is deleted the Operating System marks the file name in the MFT with a special character that signifies to the computer that the file has been deleted. The computer now looks at the clusters occupied by that file as being empty and therefore available space to store a new file. What the Windows Operating System does NOT do is go out to the clusters on the hard disk where the files data is actually stored and wipe the contents of these clusters. The deleted file data is still there, but the Computer Operating System no longer knows it exists.

This in fact is the underlying principal of data recovery. It is about finding data that still exists on the hard drive but which currently can’t be located by the Operating System. If the clusters containing the data have are, corrupted or physically damaged, then recovering the data they once contained is impossible.

Ok, so my data is still there, but for how long? The answer to this question is completely up to you. The only way that your deleted MFT record or your file data itself will permanently be destroyed is if it is overwritten by other data. This means that any computer activity after the deletion has the potential to permanently erase otherwise recoverable files.

If you are attempting data recovery from your hard drive, if possible connect it to another computer as the slave drive so that the operating system wont be doing a merry dance over you deleted files when you attempt the recovery process. If you use data recovery software, don’t install it on the drive on which the files were lost. Better yet, use a floppy disk or CD version if available. If you send your hard drive to a professional data recovery service they should not be working on the original hard drive. They should take a sector copy (an exact copy including all deleted information) of your hard drive and work on this. You may consider doing this yourself. There are a number of programs that will do this, the most common being Norton GHOST. But remember, you must make a complete sector copy of your hard drive to make sure the image includes all the deleted areas of the drive.

Data Recovery by Searching for Deleted MFT Records

Most data recovery programs search for deleted MFT entries to undelete files or unformat drives. These programs usually give a give a probability or hard drive data recovery rating of ’good’, ’medium’ or ’poor’. What they are actually doing is locating the MFT record for a deleted file and then checking the rest of the MFT records to determine if the clusters that the deleted file occupied are being used by any other file stored on the computer. As only one file can occupy any one cluster on a hard drive, if other files are using your deleted files storage space then it is likely that the original data has been overwritten and permanently destroyed. This recovery technique is usually relatively fast, as all the recovery program has to do is find the deleted file entries in the MFT and then go directly to that location of the hard disk to perform the data recovery. You will see an MFT search when you execute a "Fast Search" using Recover My Files Data Recovery Software.

However, if your MFT is corrupt, defective or has itself been overwritten, this method isn’t going to help you get data back even though the file data still remains out on the disk waiting to be found. What you need to do is search unallocated clusters.

Things get a bit more complicated by the fact that a single file does not have to reside within contiguous clusters. It may be that the Operating System stores a single file in clusters on different parts of the hard disk. This is called a ’fragmented’ file. The problem with a fragmented files is that it can slow your computer down as it needs to spend time and resources sending the actuator arm to different parts of the hard disk to read the complete file. This is why many people regularly use a defragmentation program. The amount of fragmentation in a file can also reduce your ability to recover deleted files as we will explain later in this article.

So we can now think of our hard drive as being broken down into many clusters which hold the contents of our files. A cluster that is being used to store a file is called an ’allocated cluster’, and if it is not being used to store a file an ’unallocated cluster’.

The next question is, ’how does the computer know where to look when it wants to find a specific file?’. Well, if you wanted to find a specific chapter in a book the best thing to do would be to go and look up the Table of Contents. A computer does much the same thing, which is also important if you want to recover data, recover a file, or undelete.

Data recovery software

Most data recovery program search for deleted MFT entries to undelete files. These programs usually give a give a probability of recovery rating of ’good’, ’medium’ or ’poor’. What they are actually doing is locating the MFT record for a deleted file and then checking the rest of the MFT records to determine if the clusters that the deleted file occupied are being used by any other file stored on the computer. As only one file can occupy any one cluster on a hard drive, if other files are using your deleted files storage space then it is likely that the original data has been overwritten and permanently destroyed.

This recovery technique is usually relatively fast way to get data back, as all the recovery program has to do is find the deleted file entries in the MFT and then go directly to that location of the hard disk to perform the data recovery. You will see an MFT search when you execute a "Fast Search" using Recover My Files Data Recovery Software.

However, if your MFT is corrupt, defective or has itself been overwritten, this method isn’t going to help you even though the file data still remains out on the disk waiting to be found. What you need to do is search unallocated clusters.

Searching Unallocated Clusters for Deleted Files

A good data recovery program will have the option to ignore the MFT (or lack there of) and to search all the unallocated clusters to try and find and recover files. This means we need to know what a deleted file looks like. Luckily most file types have a unique file header and footer. This means that if you look inside a Microsoft Word document for example, the first characters and the last characters of the file are always the same. So therefore a data recover program can search the entire hard drive and identify files by their unique header and footers. You will see this technique used in Recover My Files Data Recovery Software when you select a ’Complete Search’. Recover My Files recognizes more than 160 different file types using this technique.

Why are Some Files Partially Corrupt after a software File Recovery?

Remember that a computer will only use as many clusters as it needs to store a complete file. This means that your original data may only have been partially overwritten. You may still be able to retrieve some of the clusters containing the file. Unfortunately, in most cases that won’t be helpful, as most programs need a file to be complete before they will process it. Rebuilding partially damaged files is a another area of data recovery. It requires specialized knowledge about the particular file types one is dealing with. Some links to software for repairing specific file types are provided above.

Data Recovery from a Formatted Hard Drive

When you run the format command you are simply erasing the Root Directory Entries and FAT, or MFT. It is possible to run the format command and wipe the entire hard drive but format must be executed with special options. There are a number of tricks that data recovery programs use to recover from format commands. This includes searching for deleted Directory Entries which are in fact stored as files on the computer. If a directory entry is located, then we now know the name, starting cluster location, and size of the files. Of course you can also search the data area of a formatted drive for file header and footers and locate individual file types by this method.

What is the problem with File Fragmentation?

The problem of file fragmentation is that most of the data recovery techniques available must work on the assumption that all files are contiguous, that is, that they are stored in consecutive sectors one after the other from the beginning to the end of the file. The information to track fragmentation of a file is overwritten when the FAT or the MFT records are destroyed.

Source: http://www.recovermyfiles.com/data-recovery-software.php

Repair Master Boot Record (MBR)

Problems with the master boot record (MBR) of a system may prevent the system from booting. The MBR may be affected by malicious code, become corrupted by disk errors, or be overwritten by other boot loaders when experimenting with multiple operating systems on a host. When your BIOS detects a damaged MBR or boot sector, you’ll see ominous messages like Invalid partition table, Error loading operating system, or Missing operating system.

As you know, the Master Boot Record (MBR) will be created when you create the first partition on the hard disk. It is very important data structure on the disk. The Master Boot Record contains the Partition Table for the disk and a small amount of executable code for the boot start. The location is always the first sector on the disk.

The first 446 (0x1BE) bytes are MBR itself, the next 64 bytes are the Partition Table, the last two bytes in the sector are a signature word for the sector and are always 0x55AA.

The example of the NTFS MBR disk layout:

Physical Sector: Cyl 0, Side 0, Sector 1
000000000 33 C0 8E D0 BC 00 7C FB 50 07 50 1F FC BE 1B 7C 3AZ??.|uP.P.u?.|
000000010 BF 1B 06 50 57 B9 E5 01 F3 A4 CB BE BE 07 B1 04 ?..PW?a.o¤E??.±.
000000020 38 2C 7C 09 75 15 83 C6 10 E2 F5 CD 18 8B 14 8B 8,|.u.??.aoI.‹.‹
000000030 EE 83 C6 10 49 74 16 38 2C 74 F6 BE 10 07 4E AC i??.It.8,to?..N¬
000000040 3C 00 74 FA BB 07 00 B4 0E CD 10 EB F2 89 46 25 <.tu»..?.I.eo‰F%
000000050 96 8A 46 04 B4 06 3C 0E 74 11 B4 0B 3C 0C 74 05 -SF.?.<.t.?.<.t.
000000060 3A C4 75 2B 40 C6 46 25 06 75 24 BB AA 55 50 B4 :Au+@?F%.u$»?UP?
000000070 41 CD 13 58 72 16 81 FB 55 AA 75 10 F6 C1 01 74 AI.Xr.?uU?u.oA.t
000000080 0B 8A E0 88 56 24 C7 06 A1 06 EB 1E 88 66 04 BF .Sa?V$C.?.e.?f.?
000000090 0A 00 B8 01 02 8B DC 33 C9 83 FF 05 7F 03 8B 4E ..?..‹U3E?y..‹N
0000000A0 25 03 4E 02 CD 13 72 29 BE 46 07 81 3E FE 7D 55 %.N.I.r)?F.?>?}U
0000000B0 AA 74 5A 83 EF 05 7F DA 85 F6 75 83 BE 27 07 EB ?tZ?i.U…ou??’.e
0000000C0 8A 98 91 52 99 03 46 08 13 56 0A E8 12 00 5A EB S?‘R™.F..V.e..Ze
0000000D0 D5 4F 74 E4 33 C0 CD 13 EB B8 00 00 00 00 00 00 OOta3AI.e?......
0000000E0 56 33 F6 56 56 52 50 06 53 51 BE 10 00 56 8B F4 V3oVVRP.SQ?..V‹o
0000000F0 50 52 B8 00 42 8A 56 24 CD 13 5A 58 8D 64 10 72 PR?.BSV$I.ZX?d.r
000000100 0A 40 75 01 42 80 C7 02 E2 F7 F8 5E C3 EB 74 49 .@u.B€C.a?o^AetI
000000110 6E 76 61 6C 69 64 20 70 61 72 74 69 74 69 6F 6E nvalid partition
000000120 20 74 61 62 6C 65 00 45 72 72 6F 72 20 6C 6F 61 table.Error loa
000000130 64 69 6E 67 20 6F 70 65 72 61 74 69 6E 67 20 73 ding operating s
000000140 79 73 74 65 6D 00 4D 69 73 73 69 6E 67 20 6F 70 ystem.Missing op
000000150 65 72 61 74 69 6E 67 20 73 79 73 74 65 6D 00 00 erating system..
000000160 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
000000170 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
000000180 00 00 00 8B FC 1E 57 8B F5 CB 00 00 00 00 00 00 ...‹u.W‹oE......
000000190 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
0000001A0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
0000001B0 00 00 00 00 00 00 00 00 A6 34 1F BA 00 00 80 01 ........¦4.?..€.
0000001C0 01 00 07 FE 7F 3E 3F 00 00 00 40 32 4E 00 00 00 ...?>?...@2N...
0000001D0 41 3F 06 FE 7F 64 7F 32 4E 00 A6 50 09 00 00 00 A?.?d2N.¦P....
0000001E0 41 65 0F FE BF 4A 25 83 57 00 66 61 38 00 00 00 Ae.??J%?W.fa8...
0000001F0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 55 AA ..............U?

What will happen if the first sector has been damaged (by virus, for example)?

If the first line numbers will be overwritten: the first 16 bytes are now zeros.

000000000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
000000010 BF 1B 06 50 57 B9 E5 01 F3 A4 CB BE BE 07 B1 04 ?..PW?a.o¤E??.±.

When you try to boot after hardware testing procedures, you will see just blank screen without any messages. It means the piece of code at the beginning of the MBR could not be executed properly. That’s why even error messages could not be displayed. However, if you boot from the floppy, you can see FAT partition, files on it and you are able to perform standard operations like file copy, program execution... It happens because in this example only part of the MBR has been damaged which does not allow the system to boot properly. However, the partition table is safe and you can access our drives when you boot from the operating system installed on the other drive.

What will happen if sector signature (last word 0x55AA) has been removed or damaged?

If there are zeros in the sector signature.

Physical Sector: Cyl 0, Side 0, Sector 1
0000001E0 41 65 0F FE BF 4A 25 83 57 00 66 61 38 00 00 00 Ae.??J%?W.fa8...
0000001F0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................

When you try to boot now, you see an error message like "Operating System not found".

Fixing Master Boot Record (MBR) with standard tools

For the earlier Operating systems, as MS-DOS, Windows 95, 98, ME, the simplest way to repair or re-create MBR is to run Microsoft’s standard utility called FDISK with a parameter /MBR, like

A:’> FDISK.EXE /MBR

For the later Operating systems, like Windows NT, 2000, XP, Vista, you can repair the MBR using the Recovery Console.
1. Boot with the XP installation CD.
2. When prompted, press R to repair a Windows XP installation.
3. If repairing a host with multiple operating systems, select the appropriate one (XP) from the menu. If you have only one operating system, enter 1 to select it.
4. Enter the administrator password if prompted.
5. To fix the MBR, use the following command:

fixmbr

This assumes that your installation is on the C:’ drive. You will be presented with several scary warning lines the reading of which will make you want to say no. Microsoft is exceptionally vague regarding the conditions under which fixmbr can cause problems although they are clear about the consequences (losing all data on the hard drive), so use this at your own risk.

6. Type y and ENTER to fix the MBR.
7. Type exit to leave the recovery console and reboot.

If you do not feel comfortable enough using built-in standard tools, or the operation was not successful, you can try to use the available free and commercial software utilities from our collection.

Additional Reading:
http://www.tech-recipes.com/rx/483/xp_repair_fix_master_boot_record_recovery_console/
http://askbobrankin.com/fix_mbr.html
http://www.ntfs.com/mbr-damaged.htm

Data Recovery Techniques © 2008. Template by Dicas Blogger.

TOPO