In general, identifying a file format by the file extension can be misleading. Many files carry an extension that does not correspond to the actual format of their contents (just for one example, many DOS executables with the extension .COM
are actually in the MZ format), while some formats have no single standard extension at all. Raw disk images in particular may carry any of numerous different extensions: .IMG
, .IMA
, .DSK
, or as we see here, .360
(I also remember seeing .720
or .144
, depending on the underlying disk geometry). To discover what format a file is in, one may use a utility such as file
:
$ file *.360
ATDOS331.360: DOS/MBR boot sector, code offset 0x34+2, OEM-ID "IBM 3.3", sectors/cluster 2, root entries 112, sectors 720 (volumes <=32 MB), Media descriptor 0xfd, sectors/FAT 2, sectors/track 9, dos < 4.0 BootSector (0x0), FAT (12 bit by descriptor), followed by FAT
ATDOS332.360: DOS/MBR boot sector, code offset 0x34+2, OEM-ID "IBM 3.3", sectors/cluster 2, root entries 112, sectors 720 (volumes <=32 MB), Media descriptor 0xfd, sectors/FAT 2, sectors/track 9, dos < 4.0 BootSector (0x0), FAT (12 bit by descriptor), followed by FAT
ATDOS333.360: DOS/MBR boot sector, code offset 0x34+2, OEM-ID "IBM 3.3", sectors/cluster 2, root entries 112, sectors 720 (volumes <=32 MB), Media descriptor 0xfd, sectors/FAT 2, sectors/track 9, dos < 4.0 BootSector (0x0), FAT (12 bit by descriptor), followed by FAT
ATDOS334.360: DOS/MBR boot sector, code offset 0x34+2, OEM-ID "IBM 3.3", sectors/cluster 2, root entries 112, sectors 720 (volumes <=32 MB), Media descriptor 0xfd, sectors/FAT 2, sectors/track 9, dos < 4.0 BootSector (0x0), FAT (12 bit by descriptor), followed by FAT
If file
outputs ‘DOS/MBR boot sector’ it is probably safe to assume that it is a raw sector image of either an MBR-partitioned disk or a FAT floppy. Some particularly old raw disk images may fail to be detected by this method, though: as raw images have no discriminating signature of their own, they have to be identified by the signature of the contained file system, but sufficiently old FAT versions do not have those either. The worst-case scenario is that file
outputs ‘data’ or something completely bogus, like ‘dBase III DBT’.
For disk images in particular, utilities from the LIBDSK project may be helpful. Among them there is dskid
, which can identify both the underlying low-level disk format (i.e. the way the surface of the disk is supposed to be divided into sectors) and the container format of the file (called a ‘type’ by LIBDSK to distinguish it from the former). Although this one in turn may be too eager to identify files as raw images; it will do so for any image type that LIBDSK does not support.
LIBDSK also includes dskdump
, dsktrans
and dskconv
, which can transfer sectors from one container format to another, and even to and from a physical disk drive. There is source code and binaries for DOS and for Windows available to download (and they do run under Windows 9x too).