Repository navigation
feat(installer): prepare storage media on Windows - #298
Merged
Merged
Conversation
Developer-Simon
marked this pull request as draft
November 25, 2026 22:18
Developer-Simon
force-pushed
the
feat/installer-media-windows
branch
from
November 29, 2026 17:03
ad6a1b4 to
42eba77
Compare
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…ws imager output Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
zone1970.tab is a copy from tzdata 2026f (public domain). windowszones.txt holds the territory 001 rows of CLDR 48 windowsZones.xml (Unicode license), generated once with a Python one-off: take mapZone other/type pairs with territory=001, rename legacy ids through the tzdata.zi links, map Atlantic/Reykjavik to Etc/UTC and drop zones that are not in zone1970.tab. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…per system Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…of the installer Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Start the installer's media helper with runas so that only the helper runs elevated. The helper launches the imager and writes its log, which the installer follows until the exit code is known. Cancelling the context writes the cancel file. A refused UAC prompt maps to ErrRightsDenied. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Look for rpi-imager.exe in the known install locations and read its version from the file's version resource, so the imager is never started on Windows (that would trigger UAC). Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Read disks, partitions and volumes from PowerShell and drop the system disk. Fail closed: a missing systemDrive is an error, and disks without known boot or system flags are hidden. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…parsers Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
On Windows the missing-imager card shows the website and a copyable winget command instead of the Discover link. The card text and the rights note on the write step carry a platform suffix off Linux. The fake backend and fakehost gain a platform and an imager-missing flag. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Add an installer-windows job that runs the media, host and installer command tests on windows-latest and keeps LF line endings in the checkout. Tests that need Unix mode bits or a Linux shell script skip on Windows. The installer-cross job also vets each cross-compile target. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The cancel watcher started only after the launcher returned, but the launcher blocks while the UAC prompt is open. A cancel in that window could land after the elevated helper had already started the imager. The watcher now starts before the launch, and a failed launch stops it before the caller removes the job directory. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…s paths Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…nded A cancelled write now stays running and reports cancelling until the imager has actually exited, so the browser does not show a finished cancel while the stick is still being written. Cancel and rights errors no longer carry English detail texts. Job folders older than a day are removed at the start of a write, and the Windows wait limit for a killed imager is raised to 30 minutes because buffered writes can take minutes on slow media. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
After a successful write the installer ejects the removable drive itself, without administrator rights. A failed ejection is only logged. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The imager reports buffered data, so the bar could stand still for minutes with a frozen remaining time. The estimate now counts down between two reports, then gives way to a running clock. The bar pulses while it writes, cancelling is shown, and the administrator note only stays while the rights step is still open. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Developer-Simon
force-pushed
the
feat/installer-media-windows
branch
from
November 29, 2026 21:54
2a65337 to
b502ec8
Compare
Developer-Simon
marked this pull request as ready for review
November 29, 2026 21:54
4 tasks done
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.
Squash-merge commit message
Highlight translations
Tour
noneSummary
The installer mode "Media" now works on Windows with the same scope as on Linux: it finds the Raspberry Pi Imager, lists drives, writes with one administrator prompt, shows progress, cancels, and takes time zone, keyboard and Wi-Fi settings from the PC. macOS follows later.
Evidence
doneevent.go vetand build are clean for linux, windows and darwin.Acceptance on a real PC (Windows 11, build from
f850e635, imager 2.0.8)Passed: missing imager card and winget install, defaults and Wi-Fi password check, drive filter, refused administrator prompt, write with verify, write error after pulling the stick, boot of a Raspberry Pi 3B over LAN and over Wi-Fi only, writing a Debian stick, window mode.
Found and fixed afterwards:
AccessPathsas{"value":[...],"Count":2}FreeConsolefor a console of its ownNot tested: system disk as target (VM), boot of a thin client, driver prompt on a fresh PC, SmartScreen on a downloaded exe.
A second run on Windows for cancelling, ejecting, the console window and the error text is still open.
Merge Danger
Door: two-way
Blast Radius: media mode
Linux changes: every write lists the drives a second time right before the imager starts, cancelling and the write screen behave as described above, unknown used space is hidden, and cards under 8 GB get a hint. The other risk is writing to the wrong disk on Windows, guarded by the system disk filter and the target check.
Checks
scripts/dev/check_tracked_secrets.shis clean.