Repository navigation
Conversation
On a clone's first boot cloud-init's generator could be cut off, leaving no user, no key and the template's hostname: 2 of 7 first boots of template 910 on 2026-10-10 (garuda, and a reproduction run). sslh's generator, from kali-linux-headless, aborted beside it on every first boot inspected. The Kali build now masks sslh's generator (/dev/null in /etc/systemd/system-generators, package kept) and links cloud-init.target into multi-user.target, so cloud-init no longer depends on its generator. Both template sources share the build, so 902 gets it too. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Correct the template comment's evidence: the first check counted its own command in the journal, so only garuda's directly inspected first boot shows sslh's generator aborting. Garuda's runbook §4 now says a 910 built after the fix should not need the reboot. Changelog entry with the counts. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
🟢 Approval recommended
The operational fix is validated; only a minor overstatement in its explanatory comment remains.
1 open finding
What changed in this PR
Makes Kali templates reliably run cloud-init on clone first boot.
Changes:
- Statically enables
cloud-init.targetand masks the sslh generator. - Updates the analyst runbook and records validation results.
- One non-blocking documentation accuracy issue was identified.
| File | Description |
|---|---|
packer/kali.pkr.hcl |
Hardens first-boot cloud-init startup. |
docs/runbooks/build-the-analyst-workstation.md |
Updates recovery guidance. |
docs/changelog.md |
Records the fault, fix, and proof. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
The template comment said either change alone closes #1127; the cause is not proved, and the 12-of-12 result tested both together, so it now says that. Also rewords a runbook line that began with '#1127', which markdownlint read as a heading (MD018), failing Lint. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The static cloud-init.target link makes cloud-init start whatever cuts its generator off; masking sslh's generator only helps if its abort is the cause, and is kept because nothing uses sslh. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Owner
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Refs #1127.
What went wrong
On a clone's first boot, cloud-init's generator could be cut off before it enabled
cloud-init.target. The guest then came up with no user, no SSH key, and the template's hostname. This happened on 2 of 7 first boots of template 910:garuda, and one of four disposable reproduction clones. Ongaruda's first boot, sslh's generator (sslh is pulled in bykali-linux-headless) aborted beside it, with no/etc/sslh. On its second boot it did not.The fix
In
packer/kali.pkr.hcl's shared provisioner, so both 910 and 902 get it:cloud-init.targetintomulti-user.target. cloud-init no longer depends on its generator finishing. As a result ds-identify can no longer switch cloud-init off. Nothing here needs that: every clone gets a NoCloud drive./dev/nulllink in/etc/systemd/system-generators. The package stays installed, so the Kali metapackages keep their dependency and nothing is autoremoved.Garuda's runbook §4 now says a 910 built after this should not need the reboot workaround. The changelog has the counts.
Proof
-forcefrom this branch, in 26m31s.packer validateandfmt -checkpass.cloud-init status: done, and the generator completed. Before the fix, cloud-init failed on 2 of 7 first boots.qemu-gawrites to the journal. So the baseline's sslh figures are void. Its cloud-init figures stand, because those come from the hostname andcloud-init status.#1127 is closed by hand with this evidence, since the rebuilt template is already live on
Saruman.🤖 Generated with Claude Code