Skip to contentSkip to conversation

package/util-linux: fix mount helper lookup path

PATCH Applied [email protected] 2 participants 3 messages Mar 14 – Oct 16

lore
Share & tools
lore
#0 lore raw

PATCH 2/2 package/util-linux: fix mount helper lookup path

From: Stephan Henningsen <[email protected]>

When using /bin/mount to mount filesystems that are not supported directly by the kernel, it delegates the mount operatin to helper programs, e.g. mount.fuse.sshfs. Normally /bin/mount searches these directories in order for a helper: /sbin, /sbin/fs.d, /sbin/fs.

In reality, Buildroot installs e.g. mount.fuse.sshfs into /usr/sbin, and as a result /bin/mount fails to mount sshfs entries defined in /etc/fstab.

The patch changes the default search path at configuration.

---
 package/util-linux/util-linux.mk | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
package/util-linux/util-linux.mk +2 -1
index f43a1a128b..a2a11c35d3 100644
@@ -51,7 +51,8 @@ UTIL_LINUX_CONF_OPTS += \
 	--disable-makeinstall-chown \
 	--disable-poman \
 	--disable-rpath \
-	--disable-year2038
+	--disable-year2038 \
+	--enable-fs-paths-default=/sbin:/usr/sbin
 
 UTIL_LINUX_LINK_LIBS = $(TARGET_NLS_LIBS)
 
Signature · 6 lines
2.53.0

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#1 lore raw

Hello Stephan,

Quoted 7 lines · On Sun, Mar 15, 2026 at 12:21:05AM +0100, [email protected] wrote:

From: Stephan Henningsen <[email protected]>

When using /bin/mount to mount filesystems that are not supported directly by the kernel, it delegates the mount operatin to helper programs, e.g. mount.fuse.sshfs. Normally /bin/mount searches these directories in order for a helper: /sbin, /sbin/fs.d, /sbin/fs.

Quoted 7 lines

In reality, Buildroot installs e.g. mount.fuse.sshfs into /usr/sbin, and as a result /bin/mount fails to mount sshfs entries defined in /etc/fstab.

The patch changes the default search path at configuration.

Sorry for the delay, I've now applied your patch. I hesitated a bit between your patch and --enable-fs-paths-extra=/usr/sbin (perhaps only when MERGED_USR is disabled), but oh well your patch is simple and straightforward, so I went for it.

Thanks a lot!

Thomas Petazzoni

Signature · 7 lines
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#2 lore raw
In reply to [email protected]

In reply of:

Quoted 5 lines

When using /bin/mount to mount filesystems that are not supported directly by the kernel, it delegates the mount operatin to helper programs, e.g. mount.fuse.sshfs. Normally /bin/mount searches these directories in order for a helper: /sbin, /sbin/fs.d, /sbin/fs.

Quoted 7 lines

In reality, Buildroot installs e.g. mount.fuse.sshfs into /usr/sbin, and as a result /bin/mount fails to mount sshfs entries defined in /etc/fstab.

The patch changes the default search path at configuration.

Applied to 2025.02.x, 2026.08.x. Thanks

Quoted 9 lines
---
 package/util-linux/util-linux.mk | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
package/util-linux/util-linux.mk +0 -0
index f43a1a128b..a2a11c35d3 100644

package/util-linux/util-linux.mk UTIL_LINUX_CONF_OPTS += \ · line 58

Quoted 9 lines
package/util-linux/util-linux.mk +2 -1
@@ -51,7 +51,8 @@ UTIL_LINUX_CONF_OPTS += \
 	--disable-makeinstall-chown \
 	--disable-poman \
 	--disable-rpath \
-	--disable-year2038
+	--disable-year2038 \
+	--enable-fs-paths-default=/sbin:/usr/sbin
 
 UTIL_LINUX_LINK_LIBS = $(TARGET_NLS_LIBS)
 

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot