fix(config): skip host filesystem compatibility check for ROOTFS_TYPE=nfs#9759
Conversation
…=nfs The check_filesystem_compatibility_on_host() call in do_main_configuration() greps /proc/filesystems for $ROOTFS_TYPE and modprobes it if missing, aborting the build when neither succeeds. For ROOTFS_TYPE=nfs (and the new nfs-root variant added by the netboot extension) this fires falsely: the build never mounts NFS on the host. rootfs-to-image.sh produces a tarball via 'tar | gzip' and lets the target's kernel mount NFS at boot time. Host NFS support is concept-level irrelevant for these rootfs types. The check also misbehaves under docker-launcher: /lib/modules is not forwarded into the container, so even when the host kernel ships nfs.ko the in-container modprobe fails — but skipping for nfs is the right fix regardless of the docker edge case. Carve the skip into the call site rather than the function: the function stays narrowly responsible (does what its name says); the call site encodes the higher-level fact that nfs/nfs-root rootfs types never need host filesystem mount capability. Same logic already lives on the netboot extension PR (armbian#9656 branch); this patch lifts it to main as a standalone core armbian fix. Assisted-by: Claude:claude-opus-4.7 Signed-off-by: Igor Velkov <325961+iav@users.noreply.github.com>
📝 WalkthroughWalkthroughThe PR modifies ChangesConditional Skip for NFS Rootfs Types
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
lib/functions/configuration/main-config.sh (1)
138-172:⚠️ Potential issue | 🟠 Major | ⚡ Quick winAdd
nfs-rootcase block entry to match the conditional guard at line 170.The condition at line 170 skips the filesystem compatibility check for
$ROOTFS_TYPE != nfsand$ROOTFS_TYPE != nfs-root, indicatingnfs-rootis an intended type. However, thecase "$ROOTFS_TYPE"block (lines 138–162) has no handler fornfs-root; its wildcard arm callsexit_with_error "Unknown rootfs type", which aborts the build underset -ebefore the guard ever executes.This leaves the feature half-implemented: if anyone attempts to use
ROOTFS_TYPE=nfs-root, they get a cryptic "Unknown rootfs type" error instead of proper handling. Add anfs-root)case entry (similar to thenfs)entry at line 141) to complete the support:Proposed addition
nfs) FIXED_IMAGE_SIZE=256 # small SD card with kernel, boot script and .dtb/.bin files ;; + nfs-root) + FIXED_IMAGE_SIZE=256 # netboot variant; handled identically to nfs at the image level + ;; f2fs)🤖 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 `@lib/functions/configuration/main-config.sh` around lines 138 - 172, Add a case branch for ROOTFS_TYPE 'nfs-root' alongside the existing 'nfs' handler so the script recognizes that type instead of hitting the wildcard error; specifically, add a "nfs-root)" arm in the case "$ROOTFS_TYPE" block (mirroring the handling for "nfs" such as setting FIXED_IMAGE_SIZE=256 or appropriate comments) so that ROOTFS_TYPE=nfs-root does not trigger exit_with_error and allows the later conditional that skips check_filesystem_compatibility_on_host to run as intended.
🤖 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.
Outside diff comments:
In `@lib/functions/configuration/main-config.sh`:
- Around line 138-172: Add a case branch for ROOTFS_TYPE 'nfs-root' alongside
the existing 'nfs' handler so the script recognizes that type instead of hitting
the wildcard error; specifically, add a "nfs-root)" arm in the case
"$ROOTFS_TYPE" block (mirroring the handling for "nfs" such as setting
FIXED_IMAGE_SIZE=256 or appropriate comments) so that ROOTFS_TYPE=nfs-root does
not trigger exit_with_error and allows the later conditional that skips
check_filesystem_compatibility_on_host to run as intended.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 9f211336-c3bb-4a55-964b-0b28394bf0b8
📒 Files selected for processing (1)
lib/functions/configuration/main-config.sh
|
✅ This PR has been reviewed and approved — all set for merge! |
Summary
Same one-line gate already lives on the netboot extension PR (#9656). This patch lifts it to `main` as a standalone core armbian fix.
Test plan
Summary by CodeRabbit
Release Notes