Beginners Guides: Flash Memory Data Recovery and Protection
Stuck with
lost data on a USB memory key or Flash card and don't know what to do?
Recovering data from flash memory devices is possible, and not too complex, so
follow along and we'll help you get those pictures back! -
Version 1.4.0
The flash memory-based USB key has become commonplace faster than just about
any other computer peripheral in recent memory. It was only three years
ago that a 32 or 64MB USB flash memory key was a rare and interesting item that
would easily set you back a couple of hundred dollars. Now they are
affordable enough that almost everyone who uses a computer has one.
They've become boring and reliable, just like floppies and CDs before them.
Flash memory devices have few major advantages over other forms of portable
storage which easily account for their popularity. They have far greater
capacity and access speed than the now antique (but not quite extinct) floppy
disk, and are much more durable than either floppies or CDs. With the USB
drivers now built into recent versions of Windows and other operating systems
like Linux, they function just like a little portable hard disk, without the
bulk and fragility associated with mechanical portable drives. In short,
they're just about perfect.
Just about...? That's right. Despite all their obvious advantages,
USB drives and other flash memory devices like compact flash and SD cards are
not without some problems and pitfalls of their own.
In this Beginners Guide, PCSTATS is going to look at how flash memory works, what can go
wrong with it, and how to recover and protect your data in case the worst does
happen.
What's special about Flash Memory?
Flash memory's defining characteristic is its non-volatile nature. Traditional
dynamic (volatile) computer memory needs a constant electrical charge in
order to retain data, but the various types of flash
memory do not. Like the EEPROM chips used to store computer motherboard BIOS information,
flash memory needs electricity to write or read data from its banks, but
retains the data when the current is gone.
This makes it invaluable
for use in portable devices with power constraints. This characteristic
is achieved by using transistors as data storage devices. The
transistors within flash memory can be induced to change their state (from a '1'
value to a '0' value and vice-versa) with electrical current, but will retain
that state in the absence of electrical current.
Almost all modern flash memory devices use NAND flash memory, named for the
internal logic arrangement of its memory chips. NAND flash chips are
extremely compact and capable of fast read/write operations. A typical
NAND flash memory device will contain one or more memory chips, very similar in
appearance to those seen on memory modules or videocards, and a controller which
handles the mediation between the memory and the interface connecting it to
other devices.
Almost all flash memory uses either the FAT-16 or FAT-32 file system,
depending on the size of the drives. 'Card' based flash devices tend to use FAT
16, while USB memory keys are generally FAT 32. Most digital cameras and
other devices will not read FAT 32 formatted flash memory.
It may surprise you to know that FAT-16 is the exact same file system that
has been used on floppy disks since time immemorial. No wonder the average PC
finds it easy to read and write from flash devices... Once the USB drivers have
done their work, it's essentially just a big floppy disk.
Like all FAT formatted devices (FAT 32 is a file system often used
on hard disk drives), flash devices must contain a Master Boot Record (MBR),
Boot Sector (BS) and File Allocation Table (FAT).
The File Allocation Table contains a list of the files on the flash memory device, their sizes
and their actual location in memory. Anything reading from or writing to
the device must read and update the FAT each time. Anything damaging the
FAT causes serious data integrity issues for the device, which is why two copies
are always present in different areas of the device's memory.