How to convert RAW to FAT32?
Before editing metadata, you need to clearly understand that such actions can lead to even more data loss,
as well as complications in data recovery, if you still decide to try this way.
Let's first look in general at the metadata on the FAT volume: what they are and editing what metadata leads to what consequences.
Sector 0 on a FAT drive usually has a FAT boot sector, which looks like this on a healthy volume (we use free ReclaiMe Disk Editor to view a RAW disk content):
In Disk Management, the disk looks like this:
Let's edit the last two bytes in the boot sector, where the signature 55 AA is located: write zeros there.
The disk immediately becomes inaccessible:
We return the signature 55 AA to its place and immediately get a healthy logical disk:
So, let's continue our experiment, this time we will edit the metadata of the file system itself,
namely the pointer to the FAT table, which is stored in the boot sector. We reset the pointer like this:
After such editing of the offset to the FAT table and reconnecting the disk, we get a message: "The volume doesn't contain a recognized file system. Please make sure that all required file system drivers are loaded and that the volume is not corrupted".
Disk Management finally displays the RAW file system for our disk:
Thus, we got a disk with the RAW file system at the moment when the pointer to the FAT table turned out to be incorrect.
As soon as we return everything as it was, the volume will become available again. Where can we get the correct value of this pointer on the failed volume?
The answer is obvious - from the backup boot sector.
However, there are subtleties: In FAT, unlike NTFS, the backup sector is not located at the end of the volume,
but is usually located at the beginning of the volume, not far from the main one, in our case in sector 6.
This arrangement often leads to the fact that in case of damage to the main boot sector,
the backup one also turns out to be damaged, since it is located nearby.
Therefore, in the event of a failure, there will often be nowhere to get metadata from in order to try to edit the main boot sector.
How to guess the sector in which the FAT table is located?
Let's open the FAT table on a healthy volume, click the blue field FAT # 0 in ReclaiMe Disk Editor and go to sector 2206:
this is the value written in the boot sector, only in hexadecimal, that is, 9E 08 (actually 0x89E = 2206,
but the bytes are stored in the Big Endian format, that is, as if inverted, when the high byte is written first).
Note that on FAT volumes, the value of this sector is not a constant,
which means that you cannot use this value and you need to find out the sector number of the beginning of the FAT table in your particular case.
So, let's go to sector 2206:
This is how the FAT table looks like, it is located at the beginning of the volume,
and often it contains sections like FF FF FF 0F.
Moreover, the beginning of the table will be on the border of the sector with data and the sector with zeros,
so there are zeros in the previous sector:
That is, one of the approaches to searching for the FAT table manually is to use the disk editor to look for a sector on the border between zero and non-zero,
and see that, starting from such a sector, there are some FF FF FF 0F groups.
Note that if your RAW disk was quite full of data, then there may not be FF FF FF 0F blocks,
then it is still better to rely on data recovery software that has complex algorithms for searching and recovering FAT metadata.
Other FAT metadata
Let's take another look at a healthy FAT boot sector:
In general, everything that is parsed into fields (on the right) in the screenshot is important, as we have already shown:
- The last two bytes with the signature 55 AA are generally important for the operating system
to recognize the disk as having a volume, and therefore possibly having a file system.
- The starting offset for the FAT table, the master control entry for the FAT file system.
If it is incorrect, then the volume will not open.
- The number of bytes in the sector, usually 512. If it is different, then all pointers to the metadata will be incorrect,
which means that the volume will not open.
- The number of sectors in the cluster. Should be a power of 2. The usual value for small flash drives is 8.
- Total number of sectors. When multiplied by the number of bytes in the sector, should give the approximate size of the disk.
We see that in our case it is 512 * 15679488 = 8027897865 bytes, which is equal to 7.48 GB.
- The number of sectors per FAT determines the beginning of the second FAT table in this case.
- Sector number of the backup boot sector. Generally, some parameters can be taken from it if the main boot sector is damaged.
Thus, we have considered what basic metadata is on a RAW disk that was previously formatted in FAT32,
and what can be edited to convert raw to FAT back.
Still have questions?