Explore Disk Images

With SEVEN 0.26

Published / Modified

  • 2020-08-31
  • 2026-07-31

Categories

Tags

Related Articles

What is SEVEN?

SEVEN is a light-weight cross-platform library to peek inside disk image files. It is written in PHP and it comes with a command-line tool seven-cli which makes it easy to explore a file's structure and content and even extract included files and folders or convert some image types into raw images. SEVEN is work-in-progress and not perfect for sure. However, it works great with all the files I have been throwing at it.

With support for Apple Partition Map (APM), Apple's Hierarchical File System (HFS and HFS Plus) as well as Macintosh File System (MFS), ProDOS and even Lisa Office System there currently is a focus on disk images related to older Apple computers. But for a wider range of platforms there already is support for File Allocation Table (FAT12, FAT16, FAT32), Extended File Allocation Table (ExFAT), New Technology File System (NTFS), Berkley Fast File System/Unix File System (FFS/UFS), ISO-9660 and Universal Disk Format (UDF).

Other systems are planned to get the attention they deserve as soon as time permits. Detailed information about future development is provided in the Roadmap section at the end of this article.

loading

Get SEVEN 0.26.07.31194 KiB

Use at your own risk (also see legal notices). For information about notable changes made to this project feel free to consult the changelog.

Compatibility – What can it read?

At the moment SEVEN can handle raw disk images including direct copies of optical discs with complete sectors (CD-ROM mode 1 & 2 and DVD-ROM) – for example created with tools like dd. Furthermore Disk Copy 4.2 disk images, 2IMG Universal Format and ImageDisk disk images are supported. Uncompressed New Disk Image Format (NDIF) and Universal Disk Image Format (UDIF) images work as well. Also MacBinary (I–III & II+) and BinHex (4.0) files. So far Disk Copy 4.2, 2IMG, ImageDisk and dd-images of optical discs can also be converted to plain raw disk images.

Multiple partition maps and file systems can be read and their contents saved locally. Also compatibility layers were introduced, which on the fly take OS-specific meta data into consideration which is stored on non-native filesystems: Seven provides support for Apple PC Exchange and its successor AppleDouble – thanks to which Apple's Mac OS was and (in the case of AppleDouble) still is able to store Finder-specific information (original name, file type and creator, etc.) as well as classic Resource Forks on media which is, for example, DOS-formated (FAT).

At the moment supported are:

Partition Maps

  • Apple Partition Maps (APM)
  • GUID Partition Tables (GPT)
  • Master Boot Records (MBR)
  • BSD Disklabel

file Systems

  • Apple's Hierarchical File System (HFS, HFS Plus, HFS Wrapper)
  • Macintosh File System (MFS)
  • Apple ProDOS (including GS/OS extended files, ProDOS- and DOS3.3-order)
  • Lisa Office System — experimental
  • File Allocation Table (FAT12, FAT16, FAT32)
  • Extended File Allocation Table (ExFAT)
  • New Technology File System (NTFS) — newly added
  • Berkley Fast File System/Unix File System (FFS/UFS)
  • ISO-9660 (including basic features of the Joliet, Rock Ridge, Apple & Amiga extensions)
  • Universal Disk Format (UDF, plain variation)

Requirements – What do you need?

  • PHP 7 or higher compiled with the enable-cli flag (default)
  • PHP extensions php-cli, php-mbstring and php-zip
  • A Unicode-capable shell like macOS Terminal or Windows PowerShell.
  • Your disk image files

File Extraction – How Does It Work?

Given SEVEN can read the image file it will attempt to read all data blocks allocated to an individual file inside that image and write their contents into a new file on your local storage. As some file systems hold additional metadata or named forks for some files, SEVEN will create additional local files in such a case.

Readers, who have exchanged files between Macs and PCs, for example, will be quite familiar with ._-files, also known as AppleDouble files, which can contain OS-specific meta data and a so called Resource Fork (Classic Mac OS relies on this heavily). If need be AppleDoubles will be created. If saved to an Apple filesystem on a modern Mac (this would be HFS Plus or APFS) their data will be merged info the local filesystem's native meta data storage at the end of the export.

 

Roadmap – What comes next?

I am currently working on

  • New Technology File System (NTFS) – testing
  • Image conversion — improvements
  • Apple Lisa Office System — improvements
  • ZIP — started

Planned support

  • BinHex — include older versions
  • Universal Disk Image Format (UDIF) — compression
  • Apple File System (APFS)
  • Extended Filesystem (ext – ext4)
  • Sidecar combos like Cue sheet (CUE/BIN) or Media Descriptor File (MDS/MDF)

And beyond

Quite high up on the wish-list is a feature for baking images from local folders, of course. Authoring your own HFS, MFS or ProDOS disks – just to mention a few – will be useful for computer emulation and getting real old hardware to run.

As long-term goals I would like to expand support to also include FAT8 (MDOS/MIDAS), CP/M and Amiga OFS/FSS, as well as additional image and archive formats, ultimately including DART and compressed NDIF images (KenCode), but I will have to do more research on the technical side before deciding if, how and when this might happen. One can dream, can't one?

If you have any questions or suggestions regarding this project, just let me know.