WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: mount.ntfs-3g not being found in its current location  (Read 1409 times)

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11634
mount.ntfs-3g not being found in its current location
« on: January 03, 2024, 12:34:35 PM »
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: [Select]
/sbin/mount.ntfs-3gIn TC 13 when  ntfs-3g  was updated, it was moved to:
Code: [Select]
/usr/local/bin/mount.ntfs-3g
Using the command line I got these results:
Code: [Select]
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:~$

If I remove the link to /sbin and hide  /usr/local/bin/mount:
Code: [Select]
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:~$
The system defaults to the busybox mount and that does work. It
also finds the mount helper if it's in /sbin.


Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14819
Re: mount.ntfs-3g not being found in its current location
« Reply #1 on: January 03, 2024, 02:35:19 PM »
OK, I’ll take a look.

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11634
Re: mount.ntfs-3g not being found in its current location
« Reply #2 on: January 03, 2024, 05:03:06 PM »
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: [Select]
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

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14819
Re: mount.ntfs-3g not being found in its current location
« Reply #3 on: January 04, 2024, 10:59:39 AM »
symlinks added and extension reposted to14.x/15.x repos

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11634
Re: mount.ntfs-3g not being found in its current location
« Reply #4 on: January 04, 2024, 11:12:23 AM »
Hi Juanito
Thanks, it's working now.