The ISO that wasn't corrupt...

I had one of those things over the weekend that should have taken a couple of minutes. I wanted to share an old Microsoft MCITP training image from 2008 with a colleague which was sitting in my training archive folder.
Easy right?! Well no, Windows would not mount it and 7-Zip could see the file, but refused to recognise it as an archive. At 255 MB it looked plausible for an old training disc, so the obvious explanation was that the ISO had been damaged or truncated somewhere across eighteen years of copying, backups and moves.
The disc itself was hardly mission critical. It contains Windows Server 2008 exam material, sample chapters, practice tests and a collection of old WMV webcasts. The interesting part was the failure mode. Nothing about the file looked obviously empty or destroyed. It was simply unreadable by the tools that should have understood an ISO. What follows is a textual form of the process I went throug with ChatGPT.

Figure 1. The starting point. 7-Zip could see the file, but not a valid ISO archive. Terminal captures in this article are recreated from the session output for readability.
It looked like corruption
The first useful decision was to stop trusting the file extension. A normal ISO9660 image has recognisable structures at predictable sector boundaries. In particular, its primary volume descriptor normally appears at sector 16 and contains the identifier CD001. When I inspected that location in the file, it was not there.
The beginning of the file was more interesting. Its first two bytes were 78 9C, a common zlib/DEFLATE header. Treating the file as compressed data rather than as an ISO produced something much more recognisable. The first decompressed stream began 01 43 44 30 30 31 01. In ASCII, that is CD001 in exactly the position expected for an ISO9660 Primary Volume Descriptor.
The descriptor also contained a sensible volume name, WS08EACOREREQ_TK, and declared an image containing 151,910 sectors. At 2,048 bytes per sector that works out at exactly 311,111,680 bytes, about 297 MiB. The file on disk was smaller because what I had was compressed.

Figure 2. The first hard evidence that the ISO data was present. The original file begins with zlib data; decompression reveals the expected ISO9660 signature and a coherent Microsoft volume label.
At this point the problem changed. The question was no longer whether useful data remained in the file. It was how the original disc image had been encoded around it.
Following the bytes
The source turned out to contain a large number of separate zlib streams. Early chunks decompressed to 61 sectors, 50 sectors, 29 sectors and smaller regions. Once into the main body of the image, many chunks expanded to exactly 128 sectors, or 262,144 bytes. Between them were regions that appeared to be stored without compression.
I was working through this with ChatGPT, and the useful part was not a one-shot answer. It did not identify the format at the beginning. We formed a hypothesis, turned it into a small test, looked at the output and changed the hypothesis when the evidence disagreed. A couple of our assumptions were wrong. One decoder assumed every compressed chunk represented 128 sectors. Another assumed compressed chunks would always be smaller than the raw data they represented. Both sounded reasonable and both failed against the actual file.
Those failures were useful because they were precise. We could see the exact source offset where the interpretation stopped making sense, inspect the bytes at that point and test the next boundary. That revealed sequences such as one raw 128-sector block followed by compressed chunks representing 64 sectors, 32 sectors and then 128 sectors. The file was structured, but not according to the simple rules we had initially imposed on it.

Figure 3. The pattern became visible in the offsets and sector counts. Compressed chunks could represent different numbers of sectors, while some regions were stored raw.
This is the part of AI-assisted technical troubleshooting I find more useful than the polished demo version. The model was good at turning an observation into a diagnostic, writing the small scripts needed to test it and keeping track of the arithmetic. It was still possible for an apparently sensible assumption to be wrong. The value came from keeping the process falsifiable rather than treating the first explanation as authoritative.
The footer changed everything
Eventually the decoder made it almost to the end of the 255 MB source and stopped with just 11,196 bytes remaining. Those final bytes did not look like more disc content. Sixteen bytes into the tail was another zlib stream, preceded by a small header containing the text blhrt+.
Decompressing that stream produced exactly 31,872 bytes. Another value in the header was 1,328. The division was exact: 31,872 divided by 1,328 is 24. Treating the result as 1,328 records of 24 bytes each exposed a block allocation table for the entire image.
Each record contained a source offset, a stored length, a destination sector, a sector count and a type value. The final record made the interpretation difficult to dismiss as coincidence. Its source offset plus its stored length landed exactly on the first byte of the footer. Its destination sector plus its sector count landed exactly on sector 151,910, the declared end of the original ISO.

Figure 4. The embedded block table removed the remaining guesswork. Its final record closes exactly on both the source footer and the declared end of the reconstructed ISO.
At that point I searched for the unusual structure names rather than for generic ISO corruption. That led to Luigi Auriemma's old open-source uif2iso utility. Its source code defines the same BLHR block table and BBIS footer we had just recovered. It also defines the record types we were seeing: type 1 for uncompressed data, type 3 for zero-filled regions and type 5 for compressed data.
That finally answered the original question. The file was not a damaged ISO. It was a MagicISO UIF, or Universal Image Format, image that had somehow acquired an .iso extension. UIF was a proprietary compressed CD/DVD image format. With the original identity lost, modern tools were being asked to interpret a compressed container as though it were already the ISO stored inside it.
The age mattered because UIF has largely disappeared from normal workflows and the software that created it belongs to a different period of desktop tooling. The decisive problem, though, was not age on its own and it was not bit rot. The bytes were still coherent. What had gone missing was the context that said what those bytes meant.
Reconstructing the original image
Once the embedded index was understood, there was no reason to infer chunk boundaries any more. The reconstruction script preallocated an ISO of the declared size and processed all 1,328 records. Type 5 records were decompressed with zlib and written to their recorded destination sectors. Type 1 records were copied directly. Type 3 records described sparse regions and remained zero-filled.
The table contained 937 compressed records, 243 raw records and 148 sparse records. After reconstruction the output was 311,111,680 bytes, exactly the size declared by the ISO itself. The difference was zero bytes.
The more useful test was not the size. 7-Zip then parsed the rebuilt image as a normal ISO, recognised the original Microsoft volume metadata, enumerated all 46 files and completed an integrity test with the message Everything is Ok. The PDFs, WMVs and practice-test installers were back as ordinary files rather than entries in a directory tree that could not be read.

Figure 5. The reconstructed image passes 7-Zip's full archive test. The original Microsoft volume metadata and all 46 files are readable again.
Digital Archives are not just about the Archiving....
We tend to talk about long-term retention as though preserving the bytes is the whole problem. Sometimes it is. Storage fails, media degrades and files are genuinely corrupted. This was a different failure mode. The file had survived. Its structure was internally consistent and the embedded index was intact. Yet without the format identity and a decoder, it was operationally indistinguishable from a corrupt file.
That is relevant well beyond an old training CD. Organisations retain engineering artefacts, security evidence, application exports, backup sets, virtual machine images and regulatory records for periods that routinely outlive the products that created them. A checksum can prove that a file has not changed. It cannot prove that anyone will still know how to interpret it when it is needed.
For genuinely long-lived information, I think the practical question has to include the interpretation layer. Is the format documented? Is the conversion path retained? Does the organisation preserve the tooling or source needed to read proprietary archives? Are old backups ever restored far enough to prove that the application data inside them is still usable, rather than simply proving that the backup file itself can be copied?
None of that means every proprietary format needs to be migrated immediately. There is a cost and risk in transformation too. It does suggest that retention decisions should record more than a path, a date and a hash. The dependencies required to make sense of the artefact are part of what is being retained, whether they are written down or not.
There is also a useful point here about troubleshooting with AI. The satisfying version of this story would be that I handed the file to an AI and it instantly recognised an obscure image format from 2008. That is not what happened. The useful version was slower. We inspected bytes, made mistakes, checked boundaries, used the failures to narrow the model, and only searched for the historical implementation once the evidence had given us something specific enough to search for.
The mildly ridiculous outcome is that I can now open the Windows Server 2008 MCITP material again. I am not yet sure that eighteen-year-old exam preparation was worth this much digital archaeology, but I am quite pleased that the answer turned out to be 'wrong format' rather than 'lost data'.
Technical references
- Luigi Auriemma, UIF2ISO source code. The implementation defines the BLHR/BBIS structures and the compressed, raw and zero-filled block types matched during the recovery. GitHub mirror
- Ubuntu uif2iso manual page. Describes UIF as Universal Image Format generated by MagicISO and the utility as converting UIF images back to their original image format. Ubuntu manpage
- Note: terminal figures are recreated from the command output captured during this recovery session. Formatting has been normalised for legibility; the values and messages shown are from the session.
#digitalhoarder #archive #digitalarchaeology
Continue exploring