Hi Toradex
We have encountered a critical issue with low reproducibility that urgently needs to be resolved. If there are any reports of similar issues or workarounds, please let us know.
We appreciate your cooperation.
Rare OTA boot failure on Torizon OS 7.2.0 (Apalis iMX8QM, secure boot + composefs): /etc/fstab: Input/output error after deployment switch
Summary
We are following the Toradex “Secure Boot in Field Upgrades” procedure
(https://developer.toradex.com/torizon/security/secure-boot-in-field-upgrades)
to migrate already-deployed Apalis iMX8QM devices with secure boot enabled and composefs rootfs from a previous OS to Torizon OS 7.2.0. The procedure is two-step:
- OTA from the old OS to a transitional 7.2.0 image (signed so that both the old and new SRK accept it).
- OTA from the transitional 7.2.0 image to the non-transitional (final) 7.2.0 image.
Step 1 succeeded on every device. In step 2 (transitional → non-transitional), the failure has so far occurred on 2 devices out of many. On those devices, systemd’s fstab and ostree-system generators failed to read /etc/fstab with EIO during early boot, leaving the system unable to start. Greenboot/aktualizr correctly auto-rolled back to the previous (transitional) deployment and the affected devices are now healthy.
The same OTA combination (same transitional source image, same non-transitional target image) was applied to many sibling devices and only these 2 failed. We have been unable to reproduce the failure on the affected devices after rollback, and we are looking for guidance from the community / Toradex on how to root-cause this.
Environment
- Hardware: Apalis iMX8QM
- OS: Torizon OS 7.2.0
- Kernel: 6.6.84
- Bootloader: U-Boot 2022.04-6.7.0-devel (not updated by this OTA)
- Rootfs: OSTree + composefs (EROFS-backed, verified)
- Secure boot: enabled (HABv4, signed FIT image)
- OTA agent: aktualizr-torizon
- Health-check / rollback: greenboot
- Storage: eMMC (single-storage layout,
/dev/mmcblk0p1ext4 =/sysroot) /etclayout: transient overlay (tmpfs upper) — per Toradex secure boot guide (“when composefs is used, changes are stored on an overlay and are lost upon reboot”)
Failure symptoms (failed boot)
Key kernel/userspace messages from the failed boot:
[ 2.992720] overlayfs: cannot append lower layer
[ 3.xxxxx] composefs: mounted successfully
[ 3.756428] systemd-fstab-generator[456]: Failed to open /etc/fstab: Input/output error
[ 3.7xxxx] systemd[1]: Failed to populate /etc with files from /usr/etc: Input/output error
[ 3.7xxxx] ostree-system-generator[455]: Failed to open /etc/fstab: Input/output error
...
(boot does not progress; greenboot marks the deployment as failed)
After greenboot triggers rollback:
The last update failed and you are in a rollback state.
Boot is then healthy again on the previous deployment.
What we already ruled out
We pinned the failed deployment with ostree admin pin 0 && ostree admin set-default 0 && reboot and were able to reproduce-and-rollback once for live investigation. After rollback, with both deployments still on disk, we collected the following:
1. eMMC is healthy
mmc info/mmc partare normal- All files in both deployments are readable
dmesgof the healthy boot has no MMC / ext4 errors
2. The .ostree.cfs files are NOT corrupted
For the failing deployment vs. the healthy deployment:
| Failing (pending) | Healthy (rolled-back) | |
|---|---|---|
| OSTree commit | d9da872b… |
59a43cf0… |
| Version | 7.2.0-devel-20260526180657 |
7.2.0-devel-20260526171504 |
.ostree.cfs size |
3,489,792 B | 3,489,792 B |
.ostree.cfs SHA-256 |
fffd2d71…f45489 |
8fb38f69…357eb2 |
Both .ostree.cfs files mount cleanly via mount -t erofs and the file trees look complete.
3. /etc/fstab content is identical
After rollback, cat-ing /etc/fstab from both deployments under /sysroot/ostree/deploy/torizon/deploy/<hash>/etc/fstab returns byte-identical content. So this is not a content-level corruption.
4. overlayfs: cannot append lower layer is a red herring
This message appears in the dmesg of the successful boot too (at [2.326925]), so it is not the cause of the failure — it is a benign message during multi-layer overlay construction.
5. /etc is a transient overlay by design
This is the documented Toradex secure-boot behavior, confirmed on the running device:
overlay on / type overlay (ro,relatime,
lowerdir=/run/ostree/.private/cfsroot-lower::/sysroot/ostree/repo/objects,
redirect_dir=on,metacopy=on)
overlay on /etc type overlay (rw,relatime,
lowerdir=/sysroot.tmp/usr/etc,
upperdir=/run/ostree/transient-etc/upper,
workdir=/run/ostree/transient-etc/work,
uuid=on)
/dev/mmcblk0p1 on /sysroot type ext4 (rw,relatime)
Kernel cmdline of the healthy deployment:
ostree=/ostree/boot.1/torizon/199364e6b4ce8312673886b6518527b0f1ebe0b47c87754f15f6524347b23d65/0
Our current hypothesis
Because:
- the storage and the
.ostree.cfsare intact, - the on-disk
/etc/fstabis byte-identical to a working deployment, - the failure is not reproducible on the same device after rollback,
- many sibling devices boot the same OTA payload without issue,
we suspect a rare race condition in the initramfs stage, somewhere in the construction of /sysroot.tmp/usr/etc (the overlay lowerdir for /etc) or the transient /etc overlay itself, that leaves /etc/fstab momentarily unreadable to systemd-fstab-generator and ostree-system-generator. Once the system rolls back, the condition disappears.
We have not been able to confirm this — it is just where the evidence points.
What we are asking
- Has anyone seen
systemd-fstab-generator: Failed to open /etc/fstab: Input/output erroron Torizon 7.x with composefs + secure boot, especially right after an OTA? - Are there known race conditions in the Torizon initramfs around
/sysroot.tmp/usr/etcsetup or the/etctransient overlay? - Is there a recommended way to enable a persistent kernel log / initramfs trace on a secure-boot Torizon device so that the next time this happens we can capture the early-boot path without losing logs to the rollback? (We cannot use
journalctl -b -1because there is no persistent journal —/etc/fstabitself was never readable.) - Any suggestions for additional diagnostics we should run on the still-pending failed deployment before we discard it?
Thank you in advance for any pointers.