Skip to content

kernel: brand fastfetch as Pagh-OS and report the real disk - #180

Merged
ccclosed merged 2 commits into
devfrom
feat/fastfetch-pagh-identity
Nov 22, 2026
Merged

ccclosed merged 2 commits into
devfrom
feat/fastfetch-pagh-identity

Conversation

@ccclosed

@ccclosed ccclosed commented Nov 22, 2026 •

Copy link
Copy Markdown
Owner

fastfetch: Pagh-OS identity (figlet PAGH logo, no "Linux" branding) + real Disk (/) statfs

User report: fastfetch showed the Linux penguin, Kernel: Linux 6.1.0-pagh read as the OS name, and Disk (/) equal to Memory (fake 16 GiB) because statfs fell back to PMM frame counts.

Identity (display only; UTS ABI unchanged)

  • Provision /etc/fastfetch/{config.jsonc,pagh-logo.txt} via write_once (user edits survive): ASCII figlet "PAGH" wordmark (5 rows, width 33, fits 80-col console + summary), logo.color=light_cyan.
  • kernel.format = "Pagh-OS {release}" → Kernel: Pagh-OS 6.1.0-pagh. No word "Linux" anywhere in the config. uname(2).sysname stays Linux — that is the UTS/ABI identity, not the OS name (docs/os-identity.md §3).
  • OS: comes from /etc/os-release NAME="Pagh-OS" → OS: Pagh-OS 2.24.0 x86_64.
  • Memory 16 GiB kept (reporting unchanged).

Real disk

  • resolve_path: guest root / maps to the ext2 root /mnt (same chroot mapping every other guest path already used) so statvfs("/")/stat("/")/ls / see the distro root; symlink target / maps the same (vfs::link_walk::map_guest_target).
  • build_statfs_for(None): pseudo-FS (/dev,/proc,ramfs /tmp) report RAMFS_MAGIC zero capacity instead of masquerading RAM as disk; real ext2 capacity from FsStat. → Disk (/) = real ext2 volume (255.75 MiB on the test image), ≠ Memory.

Tests / gates (all green)

  • cargo fmt --all -- --check, build.py build, build.py build --release, check_safety.py, check_agents_md.py — OK.
  • host_tests.py: 904 passed / 0 failed (incl. fastfetch_is_branded_as_pagh asserting the exact art + no "Linux", root-symlink mapping).
  • Live e2e.py termwindow: PASS (exit 0) — OS: Pagh-OS 2.24.0 x86_64, Kernel: Pagh-OS 6.1.0-pagh, Disk (/) … 255.75 MiB ≠ memory=16.00 GiB.

Evidence

fastfetch-evidence.png — figlet PAGH logo top-left, Pagh-OS OS/Kernel lines, Memory 16 GiB, real Disk (/). (Untracked artifact.)

Note: fastfetch prints from the current cursor — run clear first for a top-left, neofetch-style showcase. tools/e2e.py termwindow now sends clear right before fastfetch so the evidence frame is top-left; cosmetic for the screenshot only.

Known limitations (documented, not blockers)

  • Disk (/) … - rootfs suffix: label from /proc/mounts (size is real ext2); relabeling to ext2 needs a guest mount-table procfs contract — separate change.
  • Memory counts the PCI hole (PMM top-of-usable), pre-existing, untouched.
  • No disk mounted → guest / = ENOENT (unreachable: compat processes only exist with ext2 userland mounted).

agent-4/coder-fastfetch-id added 2 commits November 22, 2026 18:05
fastfetch showed the Linux penguin and "Kernel: Linux 6.1.0-pagh" (read as
the OS name), and its Disk (/) row reported the guest's RAM instead of the
ext2 volume: on a 256 MiB image it printed "6.00 GiB", the same number as
Memory, because statfs fell back to PMM frame counts.

* provision /etc/fastfetch/{config.jsonc,pagh-logo.txt}: the "PAGH"
  wordmark in figlet "standard" style (ASCII only — the kernel-session
  console font has no Unicode blocks, and the same bytes go to serial) plus
  kernel.format "Pagh-OS {release}". The Kernel line no longer prints the
  word Linux at all; uname(2).sysname still returns Linux, which is the
  UTS/ABI identity and is documented separately (docs/os-identity.md §3).
* resolve_path: map the guest root "/" to the ext2 root at /mnt — the same
  chroot mapping every other guest path already used — so statvfs("/"),
  stat("/") and `ls /` see the distro root instead of the synthetic rootfs.
  A symlink to "/" maps the same way in vfs::link_walk::map_guest_target.
* statfs: pseudo filesystems (fs_stat() == None: /dev, /proc, ramfs /tmp)
  report RAMFS_MAGIC with zero capacity instead of PMM frame counts; real
  ext2 capacity comes from FsStat. Without this, Disk (/) and Memory were
  the same number by construction.
* tests: host properties fastfetch_is_branded_as_pagh (exact wordmark, no
  "Linux" anywhere in the config) and the root symlink mapping; e2e
  termwindow asserts OS/Kernel name Pagh-OS and that the Disk (/) total
  differs from Memory.
* docs: os-identity (§2.1 configuration, §2.2 statfs), vfs README statfs
  contract, README identity section, tools README e2e assertions.

Evidence: tools/e2e.py termwindow PASS (857 s); fastfetch in the desktop
terminal window (fastfetch-evidence.png) shows the figlet Pagh logo,
OS: Pagh-OS 2.24.0 x86_64, Kernel: Pagh-OS 6.1.0-pagh, Memory 16.00 GiB
and Disk (/) 255.75 MiB.
The termwindow acceptance now sends `clear` right before `fastfetch`, so the
compat VT starts at the top of the session and the figlet PAGH block prints
top-left like neofetch. Without it fastfetch starts at the prompt cursor at
the bottom — normal terminal output behaviour — and the evidence frame showed
the block there.

Cosmetic for the captured screenshot only: the identity/kernel/disk
assertions and their serial checks are unchanged. The VT-repaint-hides-
console-history behaviour stays out of scope (logged as a separate follow-up).
@ccclosed
ccclosed merged commit 133249e into dev Nov 22, 2026
8 checks passed
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.

1 participant