Tiny Core Extensions > TCE Bugs

mount.ntfs-3g not being found in its current location

(1/1)

Rich:
Hi Juanito
I ran into an issue in using the  MountTool  app in TC14 x86_64
when attempting to mount an NTFS formatted drive.

The  mount  command in  util-linux  appears to default to  /sbin
when looking for  mount.HELPER  programs. In previous versions
of  ntfs-3g  the helper was:

--- Code: ---/sbin/mount.ntfs-3g
--- End code ---
In TC 13 when  ntfs-3g  was updated, it was moved to:

--- Code: ---/usr/local/bin/mount.ntfs-3g
--- End code ---

Using the command line I got these results:

--- Code: ---tc@box:~$ ls -l `which mount`
lrwxrwxrwx 1 root root 42 Oct 31 10:15 /usr/local/bin/mount -> /tmp/tcloop/util-linux/usr/local/bin/mount
tc@box:~$ grep ntfs /etc/fstab
/dev/sdb1       /mnt/sdb1       ntfs-3g  noauto,users,exec,iocharset=utf8 0 0 # Added by TC
tc@box:~$ mount /mnt/sdb1
mount: /mnt/sdb1: unknown filesystem type 'ntfs-3g'.
       dmesg(1) may have more information after failed mount system call.
tc@box:~$ # Create a link to mount.ntfs-3g in /sbin
tc@box:~$ sudo /bin/cp -ais /usr/local/bin/mount.ntfs-3g /sbin/
tc@box:~$ mount /mnt/sdb1
ntfs-3g-mount: failed to open /dev/fuse: Permission denied
tc@box:~$ sudo mount /mnt/sdb1
tc@box:~$
--- End code ---

If I remove the link to /sbin and hide  /usr/local/bin/mount:

--- Code: ---tc@box:~$ sudo rm -f /sbin/mount.ntfs-3g
tc@box:~$ sudo mv /usr/local/bin/mount /usr/local/bin/mount2
tc@box:~$ ls -l `which mount`
lrwxrwxrwx 1 root root 12 Apr 12  2023 /bin/mount -> busybox.suid
tc@box:~$ mount /mnt/sdb1
ntfs-3g-mount: user has no write access to mountpoint /mnt/sdb1
mount: mounting /dev/sdb1 on /mnt/sdb1 failed: No such device
tc@box:~$ sudo mount /mnt/sdb1
tc@box:~$
--- End code ---
The system defaults to the busybox mount and that does work. It
also finds the mount helper if it's in /sbin.

Juanito:
OK, I’ll take a look.

Rich:
Hi Juanito
If it's of interest, this is the build script from the previous version:
http://tinycorelinux.net/7.x/x86/tcz/src/ntfs-3g/ntfs-3g.build

One of the steps it performs prior to packaging is:

--- Code: ---cd $TMPDIR/sbin
ln -s ../usr/local/sbin/mkntfs mkfs.ntfs
ln -s ../usr/local/bin/ntfs-3g mount.ntfs-3g
ln -s ../usr/local/bin/lowntfs-3g mount.lowntfs-3g
--- End code ---

Juanito:
symlinks added and extension reposted to14.x/15.x repos

Rich:
Hi Juanito
Thanks, it's working now.

Navigation

[0] Message Index

Go to full version