Explore Disk Images

With SEVEN 0.24

Published / Modified

  • 2020-08-31
  • /
  • 2024-02-27

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) and ProDOS 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), Berkley Fast File System/Unix File System (FFS/UFS), ISO-9660 and 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 section at the end of this article.

loading

Get SEVEN 0.24.02.27147 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.

Apple Partition Maps (APM), GUID Partition Tables (GPT), BSD Disklabel and Master Boot Records (MBR) can be read – as well as the following file systems: File Allocation Table (FAT12, FAT16, FAT32), Extended File Allocation Table (ExFAT), Berkley Fast File System/Unix File System (FFS/UFS), Apple's Hierarchical File System (HFS, HFS Plus, HFS Wrapper), ISO-9660 (including basic features of the Joliet, Rock Ridge, Apple & Amiga extensions) and Universal Disk Format (UDF, plain variation) as well as Macintosh File System (MFS) and Apple ProDOS (including GS/OS extended files, ProDOS- and DOS3.3-order).

Compatibility layers were introduced recently, thanks to which OS-specific meta data stored on non-native filesystems is taken into consideration on the fly: Seven now comes with 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 DOS-formated media (FAT).

Requirements – What do you need?

  • PHP 7 or higher compiled with the enable-cli flag (default)
  • 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

  • Image conversion — improvements
  • BinHex — include older versions
  • Media Descriptor File (MDS/MDF) — just started
  • ZIP — just started

Planned support

  • Universal Disk Image Format (UDIF) — compression
  • Apple File System (APFS)
  • Extended Filesystem (ext – ext4)
  • New Technology File System (NTFS)
  • Cue sheet (CUE/BIN) — sidecar file
  • 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, Amiga OFS/FSS and LISA Office System, 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.