# e2image: image coverage and disclosure

A metadata image can be structurally consistent while omitting file contents.
Conversely, selecting metadata does not mean that no private content remains.

## Recorded demonstration

Two fresh captures, each with 12 observations, used the installed e2fsprogs
1.47.0 tools on one Linux host. Each capture created two 32 MiB ext4 filesystems
with 4096-byte blocks: one with inline_data disabled, the other enabled.
Both held a nonzero 8192-byte file, a 34-byte file and a short symbolic link.
The fixtures were new, private regular files, never mounted or attached to a
loop device. No production device, live filesystem or user data was accessed.

Six modes per filesystem: source control, raw metadata (-r), raw metadata with
name scrambling (-rs), raw with data (-ra), QCOW2 metadata (-Q), and QCOW2 with
data (-Qa). QCOW2 outputs were converted to raw using e2image before inspection.
Creation and conversion returned zero. Every filesystem was checked with
e2fsck -f -n; debugfs read the same known inode identities and their sizes.

- Raw and QCOW2 metadata images returned 0 from the checker, but the large
  file's 8192 bytes read as zeros instead of its original nonzero payload.
- The short file was also omitted when block-backed. With inline_data enabled,
  its logical contents survived every mode, including name scrambling.
- The short symlink target survived every mode. Scrambling removed the tested
  filename from the directory listing, not the target stored in the inode.
- Raw and QCOW2 -a controls retained both file payloads.
- Scrambled raw images returned 4, with directory-checksum diagnostics. These
  are not clean-check controls and are not presented as usable backup images.

A diagnostic reader detail matters: debugfs 1.47.0 dumped 60 bytes for the
34-byte inline file. The first 34 matched its recorded logical size and content;
the extra 26 were zero. Evidence preserves both full-dump and logical-payload
lengths and hashes. Matching the logical payload is not a claim that the dump
file itself was byte-identical. The exploratory first capture, which initially
treated dump length as file length, is not part of the published pair.

## Reproduce and validate

Requires Python 3 and e2fsprogs. From this directory:

    python3 -B observe.py /absolute/path/to/a/new/output-directory
    python3 -B -m unittest discover -s . -p test_evidence.py
    python3 -B -O -m unittest discover -s . -p test_evidence.py
    python3 -B verify.py

The output directory must not exist. The observer creates and removes only its
own temporary fixture tree. It does not accept existing disk/image paths.
Tool binary hashes, version, platform, complete command transcripts, image
hashes and byte comparisons are in observations.json and repeat.json.
Images are reproducible fixtures, not redistributed user data. Image hashes
can change with creation metadata or randomized filename scrambling; compare
validated semantic outcomes, not whole-image hashes across runs.

summary.json is generated from the validated pair, not hand-entered.
publish.py regenerates the site copies and checks that published bytes agree.
The public bundle is sufficient for an offline rerun; native execution is an
explicit command, not a side effect of opening the evidence.

## Interpretation and boundaries

The e2image manual distinguishes the regular metadata format from raw and
QCOW2 output; -a requests ordinary file data in the latter formats. Raw format
preserves filesystem-relative offsets. Container choice alone says nothing
about which payload was selected. The manual warns that -I is an emergency
metadata restoration operation that can lose data if the filesystem changed.
No -I operation was attempted.

The ext4 format permits small file contents inside an inode. The e2image
implementation copies inode tables and separately selects block-backed
payloads. That explains why omission and retention coexist here. The -s
mechanism changes directory entries; it is not a demonstrated whole-image
redaction mechanism. Do not share an image merely because its filenames look
scrambled.

SQCK (OSDI 2008), sections 2.1-2.3, separates structural consistency from
information-complete repair. Its roughly 180 pointer-corruption tests are a
different population, not reproduced here. This demonstration applies the
distinction to capture coverage without injecting corruption or running repair.

One tool build and host, synthetic fixtures, no statistical sampling. No
application restore, power loss, race, encryption, deleted-file recovery,
general confidentiality certification or current-version defect is claimed.
The -a controls establish only the tested payload coverage, not a whole-system
backup or an application-consistent capture. Allocation counts describe host
file allocation, not device writes, flash wear or a performance benchmark.

## Sources and reuse

See sources.json for seven primary sources and reviewed sections. All example
payloads, scripts and recorded observations in this bundle are authored for
Hesela and may be reused under CC0-1.0. Third-party manuals and source code are
linked, not relicensed or copied into this bundle.
