Skip to content

fix(install): detect Pi 3 image stream from userspace arch, not kernel#3076

Merged
vpetersson merged 1 commit into
masterfrom
fix/pi3-userspace-arch-detection
Jun 16, 2026
Merged

fix(install): detect Pi 3 image stream from userspace arch, not kernel#3076
vpetersson merged 1 commit into
masterfrom
fix/pi3-userspace-arch-detection

Conversation

@vpetersson

Copy link
Copy Markdown
Contributor

Issues Fixed

Container init fails on a Pi 3 running 32-bit Raspberry Pi OS:

no matching manifest for linux/arm/v8 in the manifest list entries

Description

The pi3 vs pi3-64 device-type 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 even though Docker/apt are 32-bit armhf. That mispicked the arm64 pi3-64 image; the 32-bit Docker daemon then requested its native platform linux/arm/v8, which isn't in the arm64 manifest → the pull fails.

Fix: in bin/install.sh and bin/upgrade_containers.sh, gate on dpkg --print-architecture (userspace arch, maps 1:1 to the image platform armhf/arm64) instead of uname -m.

Scope is deliberately narrow — only the Pi 3 branch changes:

  • true 64-bit Pi 3 → pi3-64 (unchanged)
  • 32-bit OS / 64-bit kernel → pi3 (fixed)
  • legacy 32-bit kernel → pi3 (unchanged)

The generic arm64 catch-all is left as-is (no armhf counterpart image exists for generic SBCs). balena is unaffected — it bakes DEVICE_TYPE=arm64 and detects the subtype at runtime rather than using these scripts.

Checklist

  • I have performed a self-review of my own code.
  • New and existing unit tests pass locally and on CI with my changes.
  • I have done an end-to-end test for Raspberry Pi devices.
  • I have tested my changes for x86 devices.
  • I added a documentation for the changes I have made (when necessary).

🤖 Generated with Claude Code

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>
@vpetersson vpetersson requested a review from a team as a code owner June 16, 2026 13:15
@vpetersson vpetersson self-assigned this Jun 16, 2026
@vpetersson vpetersson requested a review from Copilot June 16, 2026 13:15

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@sonarqubecloud

Copy link
Copy Markdown

@vpetersson vpetersson merged commit 3092ee2 into master Jun 16, 2026
6 checks passed
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