Skip to content

Try to execute FS check program from internal overlay#12

Draft
msvamp wants to merge 1 commit into
openwrt:masterfrom
msvamp:fsck-from-overlay
Draft

Try to execute FS check program from internal overlay#12
msvamp wants to merge 1 commit into
openwrt:masterfrom
msvamp:fsck-from-overlay

Conversation

@msvamp
Copy link
Copy Markdown

@msvamp msvamp commented May 29, 2025

Currently, on most default OpenWrt builds, if anyone follows the documentation at https://openwrt.org/docs/guide-user/additional-software/extroot_configuration and installs the filesystem packages on the internal overlay, then their extroot filesystem is never checked at boot:

block: check_filesystem: /usr/sbin/e2fsck not found

This is because the current logic tries to find the fsck program in / but during boot, the internal overlay is mounted at /tmp/overlay. So with this change, I try to first find the fsck program inside /tmp/overlay and execute it from there (by appending /usr/lib to LD_LIBRARY_PATH as it might be needed by the fsck program), else fallback to finding it on / (the current behaviour)

When extroot is mounted using config in internal overlay, it is very
likely that the fsck program is also installed on the same filesystem.
So we will try to execute it from the overlay if it is present, else
fallback to previous behaviour of finding it on rootfs mounted on /.

Signed-off-by: Manas Sambhus <manas.sambhus+github@gmail.com>
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.

1 participant