Skip to content

spec: rebuild-and-carry design, relocate first (old-XFS CentOS 7) - #68

Merged
TusanHomichi merged 5 commits into
mainfrom
claude/project-thread-btwg94
Oct 13, 2026
Merged

TusanHomichi merged 5 commits into
mainfrom
claude/project-thread-btwg94

Conversation

@TusanHomichi

Copy link
Copy Markdown
Member

Requested by Peter · project thread

What this adds

Route: none. Design doc for a spec change: docs/rebuild-and-carry.md, plus open question 13 in SPEC.md pointing at it.
New fixes: none.
Claims issue: none (follows wend#67, which stops CentOS 7 boxes with XFS v4 at alma9).

Before: a CentOS 7 box installed from 7.0-7.2 media (XFS v4 on / and /boot, no in-place conversion exists) has no way to Alma 10. Preflight caps it at Alma 9.

After: a written plan for getting it there. A second root beside the old one, done first as relocate: copy the root onto a fresh v5 filesystem (made by EL7's own mkfs so both kernels mount it), flip the boot through a stub on the untouched old /boot with a one-shot trial boot (UEFI: BootNext), keep the old root as rollback, then walk the existing in-place centos7-lamp route on the copy. State movers for a fresh target root (Foresight, EL7 to Debian) are sketched as the second stage so the first doesn't block them.

How: the doc covers where the new root lives (free extents, or a disk the owner names; refuse otherwise), which filesystems move, the copy, BIOS and UEFI flips, rollback and commit, preflight's checks, the VM proof (new el/centos7-lamp-xfsv4 VM box, a trial-boot reset, a rollback boot), and the order of work. It also names a gap the in-place EL7 route already has: nothing reinstalls GRUB on BIOS, so EL7's 2.02 core.img would meet EL9's BLS entries.

Model

None: hand-written by Claude (claude-code) from the CentOS 7 route, wend#67 and the dep-lab notes.

Evidence

No route or fix changes, so nothing to replay. python3 wend check passes.

Self-review (AGENTS.md step 5)

  • Every precondition is as narrow as I can make it, and ./wend verify found no decoy hits (no fixes)
  • Every fix fixes the real problem, not the symptom a check inspects (no fixes)
  • One problem per fix; load-bearing steps (like repair) kept (no fixes)
  • No edits to tools/, adapters/, SPEC.md, .github/, other boxes' roles, or other people's fixes: this is a spec PR and adds open question 13 to SPEC.md
  • Commits are signed off (git commit -s)

🤖 Generated with Claude Code

https://claude.ai/code/session_017K4daGyJmuJf8k4B9HJ7yw


Generated by Claude Code

CentOS 7 installed from 7.0-7.2 media has XFS v4 on / and /boot, which
AlmaLinux 10's kernel can't mount and nothing converts (wend#67 stops
those boxes at alma9). Design for a second root beside the old one:
placement, the BIOS/UEFI flip with a one-shot trial boot, rollback,
commit and preflight, done first as relocate (copy the root onto a
fresh v5 filesystem, then walk the existing in-place route). State
movers for a fresh target root are sketched as the second stage.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_017K4daGyJmuJf8k4B9HJ7yw
Signed-off-by: Claude <[email protected]>
@TusanHomichi TusanHomichi self-assigned this Oct 13, 2026
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 13, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-13T14:07:33.757362Z 4bf3797 New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@github-actions github-actions Bot added the needs-claude-review Waiting on the Claude review layer label Oct 13, 2026
…, offline relabel (review)

EL7 updates never rerun grub2-install, so a 7.0/7.1 box's core.img
can't read XFS v5: relocate refreshes GRUB in place first. The stub
keeps wend_default/wend_next instead of the configs' saved_entry and
next_entry, and sets prefix so each config reads its own grubenv.
Labels are fixed with setfiles, since EL7's autorelabel reboots and
would end the trial. Plus: flush the old /boot's XFS log, boot-disk
choice for the EL8 GRUB reinstall, sticky rollback once the prefix is
on LVM, dracut for every listed kernel, sizes, UEFI traps, movers need
op proposals.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_017K4daGyJmuJf8k4B9HJ7yw
Signed-off-by: Claude <[email protected]>

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 6fe0d5b8c5

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread SPEC.md Resolved
Comment thread docs/rebuild-and-carry.md Resolved
Comment thread docs/rebuild-and-carry.md Resolved

Copy link
Copy Markdown
Member Author

Independent Claude review: SIGN-OFF at ef82cb66c07059c8a31ad1f3219a589b8f57aed9.

Three review rounds. Round 1 found three blocking problems, all fixed in e35e078:

  • An old core.img can't read XFS v5. Relocate now refreshes GRUB with 7.9's grub2-install at the same prefix.
  • The stub's grubenv variables collided with EL7's. The stub now keeps its own wend_default/wend_next and sets prefix per entry.
  • /.autorelabel reboots, which would undo the trial. Labels are now fixed offline with setfiles -r.

Round 2 found one more: the new root carried old GRUB modules that don't match the refreshed core.img. Fixed in ef82cb6 by running the refresh before the copy. Round 3 found no blocking issues.

Facts checked: no in-place XFS v4->v5 conversion; xfsprogs 4.5 v5 mounts on 3.10 and on EL10; GRUB's XFS v5 reader (c7 patch 0170); search --set=root; save_env refused on LVM/md; the XFS log flush before GRUB reads /boot; BootNext is one-shot; dracut handling for the copied LVM root; the BIOS boot-disk choice for the EL8 GRUB reinstall. The doc is consistent with SPEC's harness/fix split and keeps the VM tier maintainer-run.

Remaining non-blocking: three cosmetic wraps, plus one clause noting the GRUB refresh happens after preflight and is harmless if relocate stops later. These go into the next PR that touches the doc.


Generated by Claude Code

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: ef82cb66c0

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread docs/rebuild-and-carry.md Resolved
Comment thread docs/rebuild-and-carry.md Resolved
…prefix built in); review nits

A copied shim+GRUB in EFI/wend with BootNext would still read
EFI/centos/grub.cfg, so the UEFI trial is the same grubenv stub as on
BIOS, in EFI/centos. Also: the GRUB refresh runs after preflight and is
harmless if relocate stops later; reflow.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_017K4daGyJmuJf8k4B9HJ7yw
Signed-off-by: Claude <[email protected]>
…nent rollback (review)

EL7's GRUB does read grub.cfg beside its own image first, so a second
loader dir would work; the stub is chosen to avoid NVRAM writes and a
second trial mechanism. The copy's grubenv symlink becomes a real file;
a permanent rollback puts the old config back over the stub.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_017K4daGyJmuJf8k4B9HJ7yw
Signed-off-by: Claude <[email protected]>

Copy link
Copy Markdown
Member Author

Independent Claude review: SIGN-OFF at 4bf3797b727232f6b04dd26b15fcf6def43473b6. This replaces the earlier sign-off at ef82cb6.

Changes since that sign-off:

  • 29e4c4a reworks UEFI onto the same grubenv stub as BIOS, in EFI/centos/grub.cfg, with no NVRAM writes. This answers the Codex finding that the EFI/wend loader was missing.
  • 4bf3797 corrects the reason for that choice: EL7's GRUB does read the grub.cfg next to its own image first, so the stub is chosen to avoid NVRAM writes and a second trial mechanism. It also turns the copy's grubenv symlink into a real file, and makes wend rollback --permanent restore the old config over the stub.

The reviewer checked all of it and found no blocking issues.

Carried to the next doc-touching PR (non-blocking): create the replacement grubenv with grub2-editenv create, and note that on UEFI the new root's own grub2-reboot is sticky from the flip on.


Generated by Claude Code

@TusanHomichi
TusanHomichi merged commit 6f2a3ac into main Oct 13, 2026
6 checks passed
@TusanHomichi
TusanHomichi deleted the claude/project-thread-btwg94 branch October 13, 2026 14:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-claude-review Waiting on the Claude review layer

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants