fix(install): detect Pi 3 image stream from userspace arch, not kernel#3076
Merged
Conversation
The pi3 vs pi3-64 split keyed off `uname -m`, which reports the kernel arch. 32-bit Raspberry Pi OS ships a 64-bit kernel by default on Pi 3 (arm_64bit=1), so `uname -m` returns aarch64 while Docker/apt are armhf. That mispicked the arm64 `pi3-64` image; the 32-bit Docker daemon then requested `linux/arm/v8` and the pull failed with "no matching manifest for linux/arm/v8". Gate on `dpkg --print-architecture` (userspace arch) instead, which maps 1:1 to the published image platform (armhf/arm64). Only the Pi 3 branch changes; the generic arm64 catch-all is left untouched as it has no armhf counterpart image. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Copilot wasn't able to review any files in this pull request.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
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.



Issues Fixed
Container init fails on a Pi 3 running 32-bit Raspberry Pi OS:
Description
The
pi3vspi3-64device-type split keyed offuname -m, which reports the kernel arch. 32-bit Raspberry Pi OS ships a 64-bit kernel by default on Pi 3 (arm_64bit=1), souname -mreturnsaarch64even though Docker/apt are 32-bit armhf. That mispicked the arm64pi3-64image; the 32-bit Docker daemon then requested its native platformlinux/arm/v8, which isn't in the arm64 manifest → the pull fails.Fix: in
bin/install.shandbin/upgrade_containers.sh, gate ondpkg --print-architecture(userspace arch, maps 1:1 to the image platformarmhf/arm64) instead ofuname -m.Scope is deliberately narrow — only the Pi 3 branch changes:
pi3-64(unchanged)pi3(fixed)pi3(unchanged)The generic
arm64catch-all is left as-is (no armhf counterpart image exists for generic SBCs). balena is unaffected — it bakesDEVICE_TYPE=arm64and detects the subtype at runtime rather than using these scripts.Checklist
🤖 Generated with Claude Code