Skip to content

omamobile-firstboot 0.1.7: avoid repeated systemd reloads - #839

Draft
quatrixone wants to merge 1 commit into
derekross:mainfrom
quatrixone:firstboot-console-gate
Draft

quatrixone wants to merge 1 commit into
derekross:mainfrom
quatrixone:firstboot-console-gate

Conversation

@quatrixone

@quatrixone quatrixone commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

This PR keeps only the shared first-boot service enable/mask change.

It uses --no-reload so systemd does not reload after every unit change.
The image already enables NetworkManager, networkd, resolved, sshd and sddm;
bluetooth, systemd-timesyncd and ufw are first enabled here.

Checks: packages/omamobile-firstboot/test/all, tools/pr-check origin/main.

Device comparison is pending: capture bluetooth and systemd-timesyncd active
state in the first session with and without this change. The Dipper
systemd.firstboot=off fix is device-specific in #714. This PR remains draft
until the requested device checks are recorded.

@derekross

Copy link
Copy Markdown
Owner

Thank you for this, and for saying plainly what has and hasn't run. Both findings are real ones from a phone with a live console, and the condition is carefully written: it only skips systemd's setup for answers that validate, the placeholder and a broken file keep today's behaviour, and nothing from the answers reaches the journal.

Since it is a draft, three things on direction rather than a full review:

  1. A simpler place for the first fix? systemd has a switch for exactly this: systemd.firstboot=off on the kernel command line stops systemd-firstboot.service from asking anything (headless also suppresses the prompts and still does what needs no input). The Mi 8 could carry that in its own boot arguments, with no change to the shared package and nothing changing on the Pixels, whose bootloader forces console=null so the prompt never blocks there. I'd also question the "interactive fallback" itself: on a phone there is no keyboard at that point, so a prompt before sysinit.target is a boot that never reaches SSH over USB. With missing or invalid answers your condition still leaves the phone there. Would the boot argument do what you need?

  2. Both changes run on every phone's first boot, including a release install on the Pixel 7 Pro, so before either merges I need one first boot on a Pixel with the journals of systemd-firstboot.service and omamobile-firstboot.service (I'll do that on mine at the next test install) next to your Mi 8 run of the packaged version. For --no-reload, one thing to look at: our image already enables NetworkManager, networkd, resolved, sshd and sddm, so those calls change nothing; bluetooth, systemd-timesyncd and ufw are enabled for the first time at first boot, and without a reload the manager learns about them only at the next boot. Could you compare systemctl is-active bluetooth systemd-timesyncd in the first session with and without the change?

  3. Split and number. The two changes are independent; if the first becomes a boot argument, the reload change can stand alone. The version file says 0.1.9 and the description 0.1.7; main is 0.1.6 and 0.1.7 is free, and I set the number when I merge. The title will need the package name in front (omamobile-firstboot 0.1.7: …).

I haven't run anything for this round; CI is green on this head.

Enable and mask first-boot services without reloading systemd after each change. The units already enabled in the image stay active; first-session checks for bluetooth and systemd-timesyncd remain pending on devices.

AI assistance: Codex.

Signed-off-by: quatrixone <quatrix1@gmail.com>
@quatrixone
quatrixone force-pushed the firstboot-console-gate branch from f058914 to 06b5e07 Compare November 18, 2026 23:41
@quatrixone quatrixone changed the title firstboot: avoid a duplicate interactive setup when answers are valid omamobile-firstboot 0.1.7: avoid repeated systemd reloads Nov 18, 2026
@quatrixone

Copy link
Copy Markdown
Contributor Author

I reworked this draft to keep only the --no-reload service enable/mask change and set the package version to 0.1.7, as requested. The valid-answer ExecCondition is removed; Dipper's systemd.firstboot=off is now in its device-specific image command line in #714.

packages/omamobile-firstboot/test/all and tools/pr-check origin/main pass locally. The requested first-session comparison of bluetooth and systemd-timesyncd with and without --no-reload remains untested on device, so this stays draft. The Pixel firstboot journal comparison remains yours.

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