Skip to content

userpatches: pre-install gh + first-boot provisioning stub#14

Merged
igorpecovnik merged 1 commit into
mainfrom
firstboot-provisioning-stub
May 6, 2026
Merged

userpatches: pre-install gh + first-boot provisioning stub#14
igorpecovnik merged 1 commit into
mainfrom
firstboot-provisioning-stub

Conversation

@igorpecovnik
Copy link
Copy Markdown
Member

@igorpecovnik igorpecovnik commented May 6, 2026

Summary

Two new userpatch files that wire up an automatic first-boot hook on the SDK image:

  • userpatches/customize-image.sh — runs in the rootfs chroot at the end of build:

    1. Adds the official cli.github.com apt repo and installs gh (GitHub CLI) so SDK images ship with it ready out of the box.
    2. Copies userpatches/overlay/provisioning.sh to /root/provisioning.sh (executable). Armbian's existing first-boot mechanism runs that script once on first login — same pattern used by armbian-config's module_armbian_kvmtest. No bespoke systemd unit, no done-marker logic.
  • userpatches/overlay/provisioning.sh — placeholder body for now. Just writes /provisioned with a UTC timestamp so the install path can be verified end-to-end. Replace with real provisioning when ready.

How the wiring works

The build framework's lib/functions/rootfs/customize.sh bind-mounts userpatches/overlay/ read-only at /tmp/overlay/ inside the chroot, then runs customize-image.sh. The hook does:

install -m 0755 /tmp/overlay/provisioning.sh /root/provisioning.sh

The existing Armbian first-boot mechanism takes it from there.

Test plan

  • Trigger the SDK build workflow.
  • Confirm gh is preinstalled in the booted image (gh --version).
  • Confirm /provisioned exists after first login, with a UTC timestamp inside.
  • Confirm the script does not run again on subsequent logins.

@igorpecovnik igorpecovnik force-pushed the firstboot-provisioning-stub branch 3 times, most recently from 2d5c4e1 to 4fac59f Compare May 6, 2026 09:00
- customize-image.sh: 'apt install gh' from armbian's repo and stage
  provisioning.sh at /root/provisioning.sh.
- provisioning.sh: stub that writes /provisioned with an ISO-8601 UTC
  timestamp; replace once the wiring is verified.

Armbian's existing first-boot mechanism runs /root/provisioning.sh
on first login (same pattern as armbian-config's
module_armbian_kvmtest).
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