A common problem with disks, or memory chips is when the start of the disk is overwritten. The following notes show how to recover such a disk.
The first stage is to identify the type of disk for the program to process. If there is no boot sector, when the Recover function is selected, the partition analysis screen will be displayed with a message requesting that analysis should be run. Once the analysis function is run, the operating system should be displayed on the screen - top left hand corner of the dialog box. For many disks, it is possible to cancel the analysis, and still get the correct operating system. For a FAT disk, it will display either FAT32 or FAT16
After the partition details have been set up FAT options menu will be displayed, typically with all figures set at zero. These values need to be filled in, and an element of trail and error may be required.
Cluster size and Cluster 2 location
The first function to use is the "Analyse disk parameters" function. This will try and determine the cluster size, and the location of Cluster 2. It does require there to be at least 2 sub directories on the disk, so there may be problems on the odd memory chip with no subdirectories. Fortunately, most cameras do store files in subdirectories, so this function will work.
The cluster size is the minimum number of sectors that are allocated to a file. With a large disk, there can be many hundreds of thousands of sectors which would be a large job for an older style computer to track. (FAT was developed with MS-DOS in about 1980). To make the job simpler, sectors are allocated in groups, or clusters. Typical values may be 4, 8, or 16. On FAT16 disk, there can only be 65536 clusters. So for a 1GB disk, you would need 32 sectors per cluster.
A very important value on a FAT disk is the location of cluster 2. This is normally calculated by allowing for the following bits of information
Operating parameters system sector
FAT map 1
FAT map 2
Directory - on FAT12 and FAT16. FAT32 root directories can be located anywhere
On a disk with missing boot sectors etc, this value may need to be entered by hand, but the analyse function will often calculate it for you.
FAT start and FAT length
It is possible to restore files without a FAT, but this will give problems with very large files, or when the files are fragmented. CnW Recovery will operate with just a single FAT (there are normally 2).
The FAT is always stored near the start of the disk and will normally start with the hex bytes F8 FF followed by numbers that typically increment by one. he numbers are 2 bytes long for FAT16, and 4 bytes long for FAT32. They are also little endian. Sometimes the only way to work out the value for the FAT is to look through the start of the disk for nicely ordered numbers.
If the FAT start value is entered for what is actually the second FAT, the program will still work. If both FATs are known, but FAT 1 is corrupted, the check box for Use Fat 2 can be checked.
The directory start is and important parameter. When ever possible, the directory start should be set to the start of the Root directory. Where this is not possible, if the program looks at any subdirectory start, it will then attempt to restore the complete tree from that node.
Directories are based on 32 byte entries, the first 11 bytes giving filename (in 8.3) format. The remaining bytes store location, file size, date etc. A directory may also contain other entries which are the long file name description. Details of this are beyond the scope of this documentation, so please look in links for pointers for further reading.
A subdirectory entry, is the same as aroot directory, except the first 2 entries are always ". " and ".. "