Bug 1401158 - grub2mkconfig and mount.ntfs
Summary: grub2mkconfig and mount.ntfs
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: ntfs-3g
Version: 25
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Tom "spot" Callaway
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-12-03 03:24 UTC by Michael Setzer II
Modified: 2021-01-08 23:40 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-08-30 15:33:47 UTC
Type: Bug


Attachments (Terms of Use)

Description Michael Setzer II 2016-12-03 03:24:50 UTC
Description of problem:
First notice that Windows 10 boot option was not showing in grub.cfg, reran, and still no listing. Then noticed that I then notices that trying to mount the partition was also failing.

/sbin/mount.ntfs: symbol lookup error: /sbin/mount.ntfs: undefined symbol: 
ntfs_xattr_build_mapping

Did a dnf reinstall of ntfs-3g, and got the same error. 

Just downloaded the ntfs-3g_ntfsprogs-2016.2.22.tgz which seems to be the 
same version, did a configure, make and then make install. Was then able to 
mount the partitions, and just now ran the grub2-mkconfig and it worked. 

So, not sure what was causign the symbol lookup error?? 

Version-Release number of selected component (if applicable):



How reproducible:

Just noticed the windows 10 option was missing from grub menu, and started looking for errors, but nothing reported from the grub2-mkconfig. Only the mount /dev/sda2 /mnt showed there was an error with mounting ntfs partition, which seems to be what was causing the grub2-mkconfig to fail to find and setup the windows 10 boot.

Steps to Reproduce:
1.
2.
3.

Actual results:

Before installing from the source code access to ntfs partition failed with the above error message.


Expected results:

Was for it to find the have the boot option on grub menu, and to mount ntfs partitions. Why reinstalling from source fixed it not sure. Perhaps a library or something changed from the ntfs build, and rebuilding it from source resolved the issue.

Additional info:

Comment 1 Jean-Pierre André 2016-12-03 07:24:22 UTC
> /sbin/mount.ntfs: symbol lookup error: /sbin/mount.ntfs:
> undefined symbol: 
> ntfs_xattr_build_mapping

With which system did you get that behavior ?

As ntfs_xattr_build_mapping is a symbol internal to libntfs-3g, this is much unexpected. Where did you "dnf reinstall ntfs-3g" from (or where did you get it from in the first place) ?

Can you reinstall from distribution package again, in order to confirm the issue ?

Note : Fedora applies a few patches over ntfs-3g_ntfsprogs-2016.2.22.tgz but I cannot relate them to the shown behavior.

Comment 2 Jean-Pierre André 2016-12-03 08:42:05 UTC
Actually ntfs_xattr_build_mapping is referenced in ntfs-3g and lowntfs-3g, so the error is related to libntfs-3g not matching ntfs-3g (or lowntfs-3g) :

a) different word size : one is compiled for 32-bits, the other for 64-bits.
b) different configure options : ntfs-3g (or lowntfs-3g) is compiled with option --enable-xattr-mappings and libntfs-3g is configured without this option.

Both situations assume the package ntfs-3g was installed twice.

Knowing what packages were installed in which order is needed to search further.

Comment 3 Michael Setzer II 2016-12-03 08:58:04 UTC
The system is a Lenovo i7 64bit machine that was upgraded from Fedora 24 to Fedora 25 using fedup last week. I have 20 of these machines in my classroom, but just did the update on the one. Did an update of the windows 10 on another machine, and copied the updated image to all the other systems for that partition, but went I went to boot it, noticed the windows was not listed on the grub menu. Worked fine on all the other 19 machines still running Fedora 24. First step was to copy the line from one of the 24 machine to the grub config on the 25, and it booted the windows fine, but running grub2-mkconfig would result in the lines not being there. Due to the os-prober not being able to access the partition since the mount.ntfs was failing? Ran the dnf reinstall ntfs-3g, and it went thru, but no change. Eventually, downloaded the source code from tuxera ntfs-3g site, and just did the configure, make, and make install, and then the mount operation works, and so does the grub2-mkconfig. So, it has been working fine on these machines for about 2 years, and just happened on this one after the update. Fedora is the default OS, and only run windows once and a while. Only reason I noticed was some windows updates for other sofware came up.

I did not set any options when I configured or made the ntfs-3g, so it is doing the default build.

Comment 4 Jean-Pierre André 2016-12-03 11:43:37 UTC
Can you please clarify what was your former version of ntfs-3g on Fedora 24 ?

In standard Fedora builds (for both Fedora 24 and Fedora 25), the configure option --enable-xattr-mappings is not used, hence ntfs-3g does not reference ntfs_xattr_build_mapping and you cannot get the said error.

On computers kept in the old configuration, what are the outputs of :
ntfs-3g -help 2>&1 | grep ration
ldd $(which ntfs-3g)

Comment 5 Michael Setzer II 2016-12-03 13:02:59 UTC
From Fedora 24 machine
ntfs-3g 2016.2.22 integrated FUSE 28 - Third Generation NTFS Driver
		Configuration type 7, XATTRS are on, POSIX ACLS are on
	linux-vdso.so.1 (0x00007ffea51e6000)
	libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f69b2c3e000)
	libntfs-3g.so.87 => /lib64/libntfs-3g.so.87 (0x00007f69b29ec000)
	libc.so.6 => /lib64/libc.so.6 (0x00007f69b2629000)
	/lib64/ld-linux-x86-64.so.2 (0x000055a58ecf9000)

From Fedora 25 machine after install from tuxera ntfs-3g
ntfs-3g 2016.2.22 integrated FUSE 27 - Third Generation NTFS Driver
		Configuration type 1, XATTRS are on, POSIX ACLS are off
	linux-vdso.so.1 (0x00007ffecb70f000)
	libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f0443ad2000)
	libntfs-3g.so.87 => /lib/libntfs-3g.so.87 (0x00007f0443888000)
	libc.so.6 => /lib64/libc.so.6 (0x00007f04434c2000)
	/lib64/ld-linux-x86-64.so.2 (0x00005556cb006000)

From Fedora 25 machine after dnf reinstall ntfs-3g
ntfs-3g: symbol lookup error: ntfs-3g: undefined symbol: ntfs_xattr_build_mapping
	linux-vdso.so.1 (0x00007ffe6f54d000)
	libpthread.so.0 => /lib64/libpthread.so.0 (0x00007fb0bff4e000)
	libntfs-3g.so.87 => /lib/libntfs-3g.so.87 (0x00007fb0bfd04000)
	libc.so.6 => /lib64/libc.so.6 (0x00007fb0bf93e000)
	/lib64/ld-linux-x86-64.so.2 (0x0000558c10e24000)

Comment 6 Jean-Pierre André 2016-12-03 13:41:25 UTC
> From Fedora 25 machine after dnf reinstall ntfs-3g
> ntfs-3g: symbol lookup error: ntfs-3g: undefined symbol:
> ntfs_xattr_build_mapping
> linux-vdso.so.1 (0x00007ffe6f54d000)
> libpthread.so.0 => /lib64/libpthread.so.0 (0x00007fb0bff4e000)
> libntfs-3g.so.87 => /lib/libntfs-3g.so.87 (0x00007fb0bfd04000)

Well...

Fedora has made a change in an update of Fedora 25 yesterday : ntfs-3g-2016.2.22-3.fc25.x86_64.rpm and it was configured with --enable-xattr-mappings (which was not the case in the original Fedora 25), but the library which should be called is /lib64/libntfs-3g.so.87, not /lib/libntfs-3g.so.87 (which is probably the one which you compiled from Tuxera with different options).

You probably have two versions installed, and the wrong one is being used. Try to rename the unwanted one, and check again whether the wanted one is where expected :

mv /lib/libntfs-3g.so.87 /lib/libntfs-3g.so.87.unwanted
ldd $(which ntfs-3g)

Comment 7 jack 2021-01-08 23:40:01 UTC
ERROR FIX FOR THE:

/sbin/mount.ntfs: symbol lookup error: /sbin/mount.ntfs: undefined symbol: 
ntfs_xattr_build_mapping



got this error on Fedora 32 upgraded to Fedora 33 thinking it would just fix it. After reading this and looking up some stuff fixed by simply uninstalling ntfs 3g and nautilus then deleting the leftover files. As listed above inside of the /lib and /lib64 there were other copies of the ntfs-3g (specifically libntfs-3g.so,libntfs-3g.so.88, libntfs-3g.so.88.0.0) still present after uninstalling ntfs-3g. When installing nautilus it comes with ntfs-3g and some other stuff that seems to be duplictaed files included in ntfs-3g. I believe it may have installed some ntfs-3g files twice.

I ran this first thinking it would be the fix to open and view ntfs
yum install *ntfs*
it  did not work

dnf uninstall ntfs-3g
cd /lib
ls | grep ntfs
   used rm to delete the libntfs-3g files
cd /lib64
ls | grep ntfs
   used rm to delete the libntfs-3g files
dnf search ntfs-3g
dnf install ntfs-3g.x86-64

seems to work fine again and I can browse ntfs like before


Note You need to log in before you can comment on or make changes to this bug.