Skip to content

Show HFS+ volume names and GPT partition names; stop listing GPT tables as unpartitioned space - #174

Merged
switch-nz merged 1 commit into
mainfrom
claude/volume-labels-and-gaps
Oct 1, 2026
Merged

switch-nz merged 1 commit into
mainfrom
claude/volume-labels-and-gaps

Conversation

@switch-nz

Copy link
Copy Markdown
Owner

Found by comparing the volume tree for a GPT disk image against FTK Imager's. Three differences, each fixed here.

What changes for examiners

  • HFS+ volume name was never shown. The tree titled an HFS+ partition only "Partition N"; NTFS, exFAT, FAT and ext volumes show their label. The name is now read from the catalog's root folder record, which sorts first in the catalog, so it is read from the first leaf node without indexing the whole catalog (a large volume's catalog is not walked just to name it).
  • GPT partition names were only in the details panel. The tree now shows the partition table's own name for the partition beside size and filesystem ("GPT name “…”"), apart from the filesystem's label in the title.
  • The GPT's own tables counted as unpartitioned space. The first gap started at sector 1, so it included the GPT header and entry array, and the backup header and array at the end of the disk produced a trailing "Unpartitioned (trailing)" entry even on a disk with no spare room. Gaps are now bounded by the GPT's usable LBA range; gaps between partitions and spare room inside the usable range are still reported (hidden data can sit there).

Verification

  • New tests/imagebuild_gpt.py and tests/test_volume_gpt.py (8 tests: names, HFS+ label, label without indexing the catalog, damaged catalog gives no label rather than an error, gap boundaries, trailing gap, no gaps on a full disk). Five fail and one errors on the old code.
  • Checked in a browser on a synthetic GPT disk: title shows the HFS+ name, detail line shows the GPT name, no table gaps.
  • Full suite 1306 tests OK (14 skipped).
  • Not changed, but noted: Strata lists the small alignment gaps between partitions that FTK Imager does not; that is deliberate. APFS volume names are still not shown.

🤖 Generated with Claude Code

https://claude.ai/code/session_017DPjyZZHvaivtvJ3N4hZhz


Generated by Claude Code

…he GPT tables as unpartitioned space

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017DPjyZZHvaivtvJ3N4hZhz
@switch-nz
switch-nz merged commit 8923346 into main Oct 1, 2026
32 checks passed
@switch-nz
switch-nz deleted the claude/volume-labels-and-gaps branch October 1, 2026 10:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants