Skip to content

📣 Call for testers: new armbian-install - #10176

Merged
igorpecovnik merged 2 commits into
mainfrom
armbian-install-shim
Aug 7, 2026
Merged

📣 Call for testers: new armbian-install#10176
igorpecovnik merged 2 commits into
mainfrom
armbian-install-shim

Conversation

@igorpecovnik

@igorpecovnik igorpecovnik commented Jul 13, 2026

Copy link
Copy Markdown
Member

armbian-install was rewritten from scratch as a tested armbian-config module (engine + tests: armbian/configng#951; this PR is just the bsp shim). Before merge it needs real-world testing across all install variants.

Long-standing armbian-install bugs this fixes

The old monolith failed the same way for years because detection, partitioning, and boot-population were tangled in one 420-line function. The rewrite splits them into separate, unit-tested functions, which eliminates these by construction:

Not fixed here: #10064 (Radxa Dragon Q6A) is a Qualcomm QCS6490 board with no u-boot (BOOTCONFIG=none). The new pre-flight makes an eMMC install there fail fast with a clear message instead of silently producing an unbootable card — but it still needs a board-specific boot flow to actually install, so this rewrite alone doesn't resolve it.

Status

Firmware / mode ext4 btrfs f2fs
UEFI x86 (grub-efi)
BIOS x86 (grub-pc)
Windows dual-boot (UEFI)
eMMC full (ARM, u-boot)
SD-boot / internal-root (ARM)
boot eMMC / root NVMe (split) ²
MTD/SPI boot / root NVMe (ARM) ✅ ¹
UFS (ARM)

✅ tested & boots · ⬜ needs testing

Hardware confirmed (real boards, boots to a running system)

Windows 10/11 dual-boot works end to end on KVM: shrink NTFS, install alongside, GRUB + os-prober menu with both OSes, both boot. Also re-validated on real UEFI hardware (Armbian live ISO on a UEFI PC with a real Windows-on-NVMe install): Windows detection, the shrink pre-flight, and the fixes below all behave correctly.

Companion fixes surfaced by this testing (please apply when testing the relevant board)

How to test

On a running Armbian:

git clone -b redesign-armbian-install https://github.com/armbian/configng
cd configng
tools/config-assemble.sh -p
sudo bin/armbian-config        # System → Storage → Install

Or drive it non-interactively:

sudo bin/armbian-config --api module_partitioner install \
     --target /dev/sdX --boot <mode> --fs <fs> --yes
# --boot  = uefi | bios | uefi-dualboot | emmc | sd | mtd | ufs | split-emmc
# --fs    = ext4 | btrfs | f2fs         (dual-boot adds --size <GiB>)

Then reboot into the target and confirm it boots.

Per variant:

  • UEFI x86 — Uefi-x86 image in a UEFI/OVMF VM + a blank disk → install to it.
  • BIOS x86 — same image in a BIOS VM (default qemu/KVM firmware).
  • Windows dual-boot — UEFI VM with Windows already on the disk; boot Armbian live; pick uefi-dualboot. In Windows first: disable BitLocker / Device Encryption (manage-bde -off C:, wait for full decryption) and Fast Startup (powercfg /h off) — otherwise the NTFS volume is encrypted/dirty and cannot be shrunk. The installer tells you if so.
  • eMMC / SD / MTD / UFS (ARM) — on a board booted from SD, run it and pick the internal target.

Report back

Comment with board or firmware · boot mode · filesystem · result (boots / fails).

⚠️ When it fails, always attach a log — without one we usually can't diagnose:

  • the install log: /var/log/armbian-install.log, or
  • full diagnostics: run sudo armbianmonitor -u and paste the URL it prints.

¹ Odroid M1 MTD/SPI→NVMe needs #10351 (and #10350 for btrfs). ² "boot eMMC / root NVMe" (--boot split-emmc) is a new mode for boards whose bootrom can't load u-boot from NVMe; the eMMC remainder is auto-mounted at /emmc_storage.

Do not merge before configng#951 lands and each row above has ≥1 green test — the shim has no fallback once the old script is gone.

Summary by CodeRabbit

  • New Features

    • Installation operations are now handled through the system configuration interface, with automatic privilege elevation when needed.
    • Installer options and arguments continue to be forwarded to the partitioning workflow.
    • Support reports now include the installation log when available.
  • Improvements

    • Removed obsolete installation and legacy boot configuration components.
    • Installer interruption signals are handled more safely.

The installer was redesigned as an armbian-config module (module_partitioner,
backed by module_install_engine) so its logic is unit- and loopback-tested in
CI instead of hand-verified on hardware.

- armbian-install becomes a thin wrapper that execs
  `armbian-config --api module_partitioner "$@"`, preserving the historical
  /usr/bin/armbian-install entrypoint and CLI.
- Drop the nand-sata-install symlink and the a10/a13/a20 NAND bootloader
  assets (legacy sunxi NAND is no longer supported). exclude.txt is kept.
- armbianmonitor now also collects /var/log/armbian-install.log.

Signed-off-by: Igor Pecovnik <igor@armbian.com>
@github-actions github-actions Bot added 08 Milestone: Third quarter release size/large PR with 250 lines or more labels Jul 13, 2026
@coderabbitai

coderabbitai Bot commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

The legacy installer implementation and bootloader assets were removed. armbian-install now delegates partitioning to armbian-config. armbianmonitor includes the installer log in support output.

Changes

Installer and support diagnostics

Layer / File(s) Summary
Partitioner compatibility shim
packages/bsp/common/usr/bin/armbian-install
The entrypoint handles signals, escalates through sudo when needed, verifies armbian-config, and forwards arguments to module_partitioner.
Support log collection
packages/bsp/common/usr/bin/armbianmonitor
Support output now includes /var/log/armbian-install.log when the file exists.
Legacy installer asset removal
packages/bsp/common/usr/bin/nand-sata-install, packages/bsp/common/usr/lib/armbian-install/*/bootloader/*
The previous installer content and A10, A13, and A20 bootloader configuration entries were removed.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Possibly related PRs

  • armbian/build#9945: Modifies EFI-related logic that this change removes with the standalone installer.
  • armbian/build#10065: Modifies armbian-install, including logic replaced by this compatibility shim.
  • armbian/build#10204: Modifies bootloader update logic in armbian-install, which this change removes.
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Linked Issues check ❓ Inconclusive The BSP shim preserves armbian-install, but fixes for #8738 and #10099 cannot be verified without the required companion armbian-config change. Provide the companion armbian-config change or evidence that it implements the multi-disk fix and single-partition sunxi /boot population before merging.
✅ Passed checks (4 passed)
Check name Status Explanation
Out of Scope Changes check ✅ Passed The shim, armbianmonitor log collection, symlink removal, and legacy A10/A13/A20 asset removal all match the stated objectives.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly identifies the new armbian-install implementation and the requested testing focus.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch armbian-install-shim

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions github-actions Bot added Needs review Seeking for review BSP Board Support Packages labels Jul 13, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@packages/bsp/common/usr/bin/armbian-install`:
- Line 18: Remove the Docker restart command from the shim-level INT/TERM trap
in armbian-install, since it is discarded by exec. Handle interrupt recovery
within the module_partitioner implementation if needed, preserving the existing
exit behavior.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: b03d8c90-adc1-4e13-8705-441f21566eee

📥 Commits

Reviewing files that changed from the base of the PR and between d14878c and cd0d1d5.

⛔ Files ignored due to path filters (3)
  • packages/bsp/common/usr/lib/armbian-install/a10/bootloader/u-boot.bin is excluded by !**/*.bin
  • packages/bsp/common/usr/lib/armbian-install/a13/bootloader/linux/u-boot.bin is excluded by !**/*.bin
  • packages/bsp/common/usr/lib/armbian-install/a20/bootloader/linux/u-boot.bin is excluded by !**/*.bin
📒 Files selected for processing (12)
  • packages/bsp/common/usr/bin/armbian-install
  • packages/bsp/common/usr/bin/armbianmonitor
  • packages/bsp/common/usr/bin/nand-sata-install
  • packages/bsp/common/usr/lib/armbian-install/a10/bootloader/boot.axf
  • packages/bsp/common/usr/lib/armbian-install/a10/bootloader/boot.ini
  • packages/bsp/common/usr/lib/armbian-install/a10/bootloader/linux/linux.ini
  • packages/bsp/common/usr/lib/armbian-install/a13/bootloader/boot.axf
  • packages/bsp/common/usr/lib/armbian-install/a13/bootloader/boot.ini
  • packages/bsp/common/usr/lib/armbian-install/a13/bootloader/linux/linux.ini
  • packages/bsp/common/usr/lib/armbian-install/a20/bootloader/boot.axf
  • packages/bsp/common/usr/lib/armbian-install/a20/bootloader/boot.ini
  • packages/bsp/common/usr/lib/armbian-install/a20/bootloader/linux/linux.ini
💤 Files with no reviewable changes (7)
  • packages/bsp/common/usr/lib/armbian-install/a20/bootloader/boot.ini
  • packages/bsp/common/usr/lib/armbian-install/a20/bootloader/linux/linux.ini
  • packages/bsp/common/usr/lib/armbian-install/a13/bootloader/linux/linux.ini
  • packages/bsp/common/usr/lib/armbian-install/a10/bootloader/boot.ini
  • packages/bsp/common/usr/lib/armbian-install/a10/bootloader/linux/linux.ini
  • packages/bsp/common/usr/bin/nand-sata-install
  • packages/bsp/common/usr/lib/armbian-install/a13/bootloader/boot.ini

mountpoint -q "${TempDir}"/bootfs && umount "${TempDir}"/bootfs
} # create_armbian

trap "systemctl start docker >/dev/null 2>&1; exit" INT TERM

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🩺 Stability & Availability | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

# Inspect the shim and related installer logic.
git ls-files 'packages/bsp/common/usr/bin/armbian-install' 'packages/bsp/common/usr/lib/*' 'packages/bsp/common/usr/*' | sed -n '1,120p'
printf '\n--- armbian-install ---\n'
cat -n packages/bsp/common/usr/bin/armbian-install

printf '\n--- search for module_partitioner / docker handling ---\n'
rg -n --hidden --no-messages 'module_partitioner|docker|systemctl start docker|systemctl stop docker|trap .*INT|trap .*TERM|exec .*armbian-config|armbian-config' packages/bsp/common/usr

Repository: armbian/build

Length of output: 5361


Move the Docker restart out of the shim The trap is discarded by exec, so it never applies while armbian-config --api module_partitioner is doing the real work. If partitioning stops Docker and the user aborts, Docker can stay down; handle the interrupt in module_partitioner instead, or drop the shim-level trap.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@packages/bsp/common/usr/bin/armbian-install` at line 18, Remove the Docker
restart command from the shim-level INT/TERM trap in armbian-install, since it
is discarded by exec. Handle interrupt recovery within the module_partitioner
implementation if needed, preserving the existing exit behavior.

@igorpecovnik igorpecovnik changed the title bsp: replace armbian-install with a shim, drop NAND New armbian-install: a tested, modular rewrite with Windows dual-boot — testers wanted 🧪 Jul 14, 2026
@igorpecovnik igorpecovnik added the Help needed We need your involvement label Jul 14, 2026
@igorpecovnik igorpecovnik changed the title New armbian-install: a tested, modular rewrite with Windows dual-boot — testers wanted 🧪 📣 Call for testers: new armbian-install — BIOS · UEFI · Windows dual-boot Jul 14, 2026
@igorpecovnik igorpecovnik changed the title 📣 Call for testers: new armbian-install — BIOS · UEFI · Windows dual-boot 📣 Call for testers: new armbian-install Jul 14, 2026
@Grippy98

Grippy98 commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

Didn't work on BeaglePlay (26.5.1 Resolute) -

Error code 73

armbian-install.log -

2026-07-14 23:25:43 [INFO] scenario: emmc on /dev/mmcblk0 (15678308352B, 512B sectors) fs=ext4 table=msdos part=root:100%:ext4:boot /dev/mmcblk0: calling ioctl to re-read partition table: Success 10+0 records in 10+0 records out 10485760 bytes (10 MB, 10 MiB) copied, 0.0439384 s, 244 MB/s cp: cannot stat '/usr/lib/linux-u-boot-vendor-beagleplay/sysfw.itb': No such file or directory 2026-07-14 23:28:27 [ERR] verify: '/mnt/armbian-install.33QN5x/boot' is not bootable (kernel=1 script=0)

[ERR] verify: '/mnt/armbian-install.33QN5x/boot' is not bootable (kernel=1 script=0)

Not sure if this is related to installer behavior or how k3 does write_uboot_platform in the first place (old installer doesn't work either) but thought I'd add my report.

@igorpecovnik

Copy link
Copy Markdown
Member Author

Thanks @Grippy98 — that report surfaced two real issues, both now fixed in configng#951:

1. verify: … not bootable (kernel=1 script=0) — my bug. install_verify_boot_dir only recognised boot.scr/boot.cmd/extlinux/grub, but k3 boots via uEnv.txt (BOOTSCRIPT="boot-k3.cmd:uEnv.txt"). So /boot was fine, my check was too strict. Now it also accepts uEnv.txt and boot.ini (amlogic/odroid).

2. u-boot files went to the wrong /boot — the k3 write_uboot_platform copies tiboot3.bin/tispl.bin/u-boot.img to ${MOUNT}/boot, but neither the old nor new installer ever set MOUNT — so they landed in the running system's /boot, not the target. That's a big part of why the old installer also failed here. The installer now exports MOUNT=<target rootfs> so they reach the target (device-based dd hooks ignore MOUNT, so no regression elsewhere).

Still board-side (not the installer):

  • cp: cannot stat '…/sysfw.itb' — the beagleplay u-boot package doesn't ship sysfw.itb. It's a || true optional file (newer AM62 combines sysfw into tiboot3.bin), so it's non-fatal.
  • Full k3 eMMC boot likely also needs a board-specific FAT boot partition (the AM62 ROM's boot requirement) rather than the generic single-ext4 layout. That needs a k3 scenario + board validation and is worth a separate board task.

Could you re-test with the latest redesign-armbian-install branch? The verify failure and the misplaced u-boot files are fixed; if it still doesn't boot, please grab /var/log/armbian-install.log and ls -la /boot on the target so we can see whether it's the FAT-partition/ROM requirement.

@SuperKali

Copy link
Copy Markdown
Member
  • the beagleplay u-boot package doesn't ship sysfw.itb

I had mentioned this problem to him, and flashing the bootloader is a real hassle because everything stops working as soon as you try to install the system on the eMMC—even with the old armbian-install. I don't know what happened to that binary file, but we need to fix the problem at its source.

@igorpecovnik

Copy link
Copy Markdown
Member Author

but we need to fix the problem at its source.

Yes. My reffered PR is blind attempt to repair that. This will need to be tested by @Grippy98

Still we need feedback from some eMMC / UFS enabled devices. Also USB boot, updating SPI bootloader only ...

@SuperKali

Copy link
Copy Markdown
Member

Tested on YYT-R1-V3 @igorpecovnik:

It seems there are no instructions on how to install it, as mentioned earlier in the armbian-install guide. In other words, how do I update or install the bootloader? Some boards don’t have a Spinor like this one, and to work around the problem, the bootloader is usually installed on an SD card or eMMC, but that isn’t specified here.

image

Like that:

image

Once you've selected NVMe ext4

image

It doesn't seem to be booting, but I notice some discrepancies in the nvme0n1p1 partition:

image

@igorpecovnik

Copy link
Copy Markdown
Member Author

Try now.

@Grippy98

Grippy98 commented Jul 20, 2026

Copy link
Copy Markdown
Contributor
  • the beagleplay u-boot package doesn't ship sysfw.itb

I had mentioned this problem to him, and flashing the bootloader is a real hassle because everything stops working as soon as you try to install the system on the eMMC—even with the old armbian-install. I don't know what happened to that binary file, but we need to fix the problem at its source.

Yes I'm planning to look at the functions that need to be added to K3.conf to enable mmc flashing to work correctly soon - just been busy with other bits.

Sysfw.itb is an older binary that was only needed for one early platform (AM65x I believe) so it's "always" safe to ignore for the boards targeted here. (If codeRabbit wants to learn from this)

@iav

iav commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

MTD: error propagation confirmed (not a ✅ for the matrix row)

Tested the MTD path on a ROCK Pi 4A (RK3399, XT25F32B SPI NOR on spi1.0). This is a negative-path report: SPI transfers on this board are unreliable — flashcp reproducibly fails verification, breaking at a different offset on each run, and two consecutive full reads of the same flash return different bytes. No successful SPI write happened, so this does not close the "MTD-flash boot (ARM)" row — but it does provide something that is otherwise hard to come by: a genuine MTD write failure.

The engine is UI-free, so it can be driven directly:

source tools/modules/functions/module_install_engine.sh
source /usr/lib/u-boot/platform_install.sh
INSTALL_LOG=/root/install.log \
  install_write_bootloader mtd "" "" /usr/lib/linux-u-boot-edge-<board> mtd0

Result:

flashcp: File does not seem to match flash data. First mismatch at 0x00012000
rc=72 (INSTALL_EX_BOOTLOADER)
[ERR] bootloader: MTD write failed

The status makes it all the way up: install_run_scenario sets rc and breaks out, no completed line is logged, the TUI shows "Installation FAILED (code 72)", and the CLI prints Done. only when rc == 0. The old script printed Done unconditionally on the same failure (write_uboot_platform_mtd followed by echo 'Done', return code never checked), so a truncated write looked like a successful install.

Side note for anyone else testing MTD: with a non-tty stdout, write_uboot_platform_mtd in rockchip64_common.inc silently takes the first SPI image it finds instead of offering the selection dialog. That is the right call for unattended runs, but if the u-boot directory holds both rkspi_loader*.img and u-boot-rockchip-spi*.bin, the choice depends on find ordering.

@igorpecovnik

Copy link
Copy Markdown
Member Author

@copilot resolve the merge conflicts in this pull request

# Conflicts:
#	packages/bsp/common/usr/bin/armbian-install

Co-authored-by: igorpecovnik <6281704+igorpecovnik@users.noreply.github.com>

Copilot AI commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

@copilot resolve the merge conflicts in this pull request

Merge conflicts resolved — kept our shim in packages/bsp/common/usr/bin/armbian-install and brought in all other changes from main.

@coderabbitai

coderabbitai Bot commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

Note

GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer.

@igorpecovnik

Copy link
Copy Markdown
Member Author

I made second round of extensive testing. Found and adress few bugs. Most used scenarios tested and works. Since our current installer is worse, I would propose to merge so it can be tested further.

@igorpecovnik igorpecovnik removed Help needed We need your involvement Needs review Seeking for review labels Aug 7, 2026
@igorpecovnik igorpecovnik added the Ready to merge Reviewed, tested and ready for merge label Aug 7, 2026
@igorpecovnik
igorpecovnik merged commit 8b778f3 into main Aug 7, 2026
12 of 13 checks passed
@igorpecovnik
igorpecovnik deleted the armbian-install-shim branch August 7, 2026 12:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

08 Milestone: Third quarter release BSP Board Support Packages Ready to merge Reviewed, tested and ready for merge size/large PR with 250 lines or more

5 participants