Raw disk image

A raw disk image is a file containing the raw data from a disk, which might be a floppy disk, hard disk, or optical disc. The data is simply a dump of the binary content (sequence of bytes) contained in each track and sector of the disk, with no additional metadata (except what may be part of the physical or logical format of the disk, such as control headers that are part of a physical disk format or metadata that is built into the filesystem, present on the original disk).

With the lack of metadata indicating the specific characteristics of the disk being imaged, there can be some difficulty determining how to read it, as image files may have any of a wide range of track and sector sizes and counts, contain many different filesystems, and be targeted at a variety of hardware platforms and operating systems. In addition, raw disk images may be in any of a variety of file extensions (.img is common but is far from the only extension used, and some image files might come by way of a filesystem not even using file extensions), and for that matter the .img extension has been used for a number of things other than raw disk image files. It's a mess, and some forensic digital detective work is likely to be needed.

Determining format of image file
When attempting to figure out the format of a disk image file, a good starting point is to look into where you found it in the first place. Are there any other files accompanying it, such as text files documenting its format, screenshots that give clues as to the platform involved, or metadata files designed to accompany the disk image? Is the very location of the file a clue as to its nature, for instance if it is part of an archive of downloads connected to a website devoted to early IBM PCs (and thus most likely an image of one of the PC platform's early disk formats)?

If none of this is available, and the file has reached you entirely devoid of explanatory context, the job will be harder. Try looking at it in a raw byte-based viewer (some text editors, UltraEdit for instance, have a binary mode). You may see ASCII strings within the contents, and you may also be able to figure out the sector size by finding patterns of data discontinuities occurring at regular multiples of some number (usually a "round" number in binary, such as 512). The total file size in bytes can give good hints as to what disk format is involved, since each format has a different size.

Once you figure out the platform and disk format, look for emulators or disk-image utilities pertaining to that platform; fortunately, such things exist for many "classic" computer systems, and can be found with a search (in this site, or in the entire web) for the platform name, perhaps accompanied by "emulator" or "disk utility" or such things.

Sample files

 * This PC hard disk image and this floppy image are connected with this mini-emulator (C code here).

Links

 * Wikipedia article