Skip to content

Conversation

@samcday
Copy link
Owner

@samcday samcday commented Jan 21, 2026

This option is automatically enabled if arg0 == /init

If enabled and $PID != 1, error.

Otherwise, cosplay as a cursed initrd. Mount the absolute minimum VFS, probe the minimum extra modules, in order to get a UDC to appear. Then, fork a typical smoo-gadget. Once that brings up a rootfs, we pivot into that.

We assume we're pivoting into a systemd pid1, and seed /run/systemd/system with a unit to ensure that smoo-gadget is adopted properly in the live system.

Assisted-by: gpt-5.1-codex

@samcday
Copy link
Owner Author

samcday commented Jan 21, 2026

@codex review

Copy link

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

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: 48f6f0e863

ℹ️ 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".

@samcday
Copy link
Owner Author

samcday commented Jan 21, 2026

@codex can you fix the review comments?

@chatgpt-codex-connector
Copy link

To use Codex here, create an environment for this repo.

@samcday
Copy link
Owner Author

samcday commented Jan 21, 2026

@codex can you fix the review comments?

@chatgpt-codex-connector
Copy link

Summary

Testing

  • ⚠️ Not run (not requested).

View task →

@samcday samcday force-pushed the stage0-pid1 branch 2 times, most recently from ee62302 to 8cfb76e Compare January 21, 2026 05:05
This option is automatically enabled if arg0 == /init

If enabled and $PID != 1, error.

Otherwise, cosplay as a cursed initrd. Mount the absolute minimum VFS,
probe the minimum extra modules, in order to get a UDC to appear. Then,
fork a typical smoo-gadget. Once that brings up a rootfs, we pivot into
that.

We assume we're pivoting into a systemd pid1, and seed
/run/systemd/system with a unit to ensure that smoo-gadget is adopted
properly in the live system.

Signed-off-by: Sam Day <me@samcday.com>
Assisted-by: gpt-5.1-codex
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