1
0
mirror of https://github.com/veracrypt/VeraCrypt.git synced 2026-05-21 21:30:48 -05:00

Linux: refine in-kernel NTFS driver selection

Keep the NTFS kernel-driver option as a generic in-kernel NTFS path rather than an ntfs3-specific path. Add --filesystem=kernel-ntfs and -m kernelntfs routes that select a registered or loadable kernel NTFS driver and mount with -i so mount.ntfs/ntfs-3g helpers are not invoked.

Preserve --filesystem=ntfs3 as a literal pin to the ntfs3 driver. Treat both ntfs3 and kernel-ntfs as mount-only selectors; volume creation continues to use filesystem type NTFS.

The preference and -m kernelntfs path only select an in-kernel NTFS driver when no explicit filesystem type was supplied and blkid detects NTFS.

Treat ntfs as the preferred in-kernel driver on Linux 7.1 and later, where the upstream read/write driver is expected. On earlier kernels, select ntfs only when module metadata identifies the standalone read/write driver and /sys/module confirms it loaded, avoiding ntfs3 read-only ntfs compatibility registrations. Fall back to ntfs3 otherwise, and report a generic kernel-driver error if neither supported driver is available or loadable.

Rename the internal preference/config field to MountNtfsWithKernelDriver, migrate the old MountNtfsWithNtfs3 preference key, and update UI strings, CLI help, documentation, release notes, and translation placeholders accordingly.

Reference: https://github.com/veracrypt/VeraCrypt/issues/1735
This commit is contained in:
Mounir IDRASSI
2026-05-17 18:33:36 +09:00
parent 9535e65bd8
commit 6bef9e009c
66 changed files with 447 additions and 147 deletions
+3 -2
View File
@@ -1669,8 +1669,9 @@
<entry lang="zh-cn" key="PIM_ARGON2_LARGE_WARNING">您选择的 Argon2 PIM 值大于 VeraCrypt 的默认值。\n请注意,这可能需要更多内存,并导致挂载速度显著变慢。</entry>
<entry lang="zh-cn" key="PIM_ARGON2_SMALL_WARNING">您选择的 Argon2 PIM 值小于 VeraCrypt 的默认值。请注意,如果您的密码强度不够,这可能导致安全性降低。\n\n您确认正在使用强密码吗?</entry>
<entry lang="zh-cn" key="PIM_ARGON2_REQUIRE_LONG_PASSWORD">密码必须包含 20 个或更多字符,才能使用指定的 Argon2 PIM。\n较短的密码只有在 Argon2 PIM 大于或等于 12 时才能使用。</entry>
<entry lang="zh-cn" key="LINUX_PREF_MOUNT_NTFS_WITH_NTFS3">使用 Linux 内核 ntfs3 驱动程序挂载 NTFS 卷</entry>
<entry lang="zh-cn" key="LINUX_PREF_MOUNT_NTFS_WITH_NTFS3_HELP">仅限 Linux。启用后,VeraCrypt 会使用 blkid -p 探测解密的虚拟设备,并使用 ntfs3 挂载检测到的 NTFS 文件系统,而不是默认的 NTFS 后端。如果 NTFS 检测失败,VeraCrypt 将使用正常的自动文件系统选择。如果 ntfs3 不可用或被发行版阻止,挂载可能会失败。此手动启用选项可以避免因冻结的用户空间 FUSE 文件系统导致的挂起或休眠卡顿。</entry>
<entry lang="en" key="LINUX_PREF_MOUNT_NTFS_WITH_KERNEL_DRIVER">Mount NTFS volumes with an in-kernel Linux driver</entry>
<entry lang="en" key="LINUX_PREF_MOUNT_NTFS_WITH_KERNEL_DRIVER_HELP">Linux only. When enabled and no explicit filesystem type was supplied, VeraCrypt probes the decrypted virtual device with blkid -p and mounts detected NTFS filesystems with an available in-kernel NTFS driver, bypassing mount helpers such as ntfs-3g. VeraCrypt uses ntfs when it is positively identified as a modern read/write driver or expected on Linux 7.1 or later, and otherwise uses ntfs3. If NTFS detection fails, VeraCrypt uses the normal automatic filesystem selection. If no supported in-kernel NTFS driver is available or loadable, mounting fails. This opt-in option can avoid suspend or hibernate hangs caused by frozen user-space FUSE filesystems.</entry>
<entry lang="en" key="LINUX_KERNEL_NTFS_DRIVER_UNAVAILABLE">No supported in-kernel NTFS driver is available or loadable. To use the system default NTFS backend, disable the NTFS kernel-driver preference or do not request kernel NTFS explicitly.</entry>
<entry lang="zh-cn" key="LINUX_EMERGENCY_UNMOUNT_WARNING">卷 {0} 的正常卸载失败。当应用程序仍在卷上打开文件或目录,或者后端设备已断开连接导致挂载状态失效时,可能会发生这种情况。\n\n如果设备仍处于连接状态,请选择“否”,关闭使用该卷的应用程序,然后再次尝试卸载。\n\n如果设备已断开连接或挂载状态已失效,VeraCrypt 可以尝试执行紧急清理:惰性脱离文件系统,并移除或安排移除 VeraCrypt 内核对象。待处理的写入可能已失败,数据可能丢失,并且清理操作可能保持挂起状态,直到应用程序关闭打开的文件。再次使用前,请使用 fsck 或相应的修复工具检查文件系统。\n\n继续?</entry>
<entry lang="zh-cn" key="LINUX_EMERGENCY_UNMOUNTED">已对卷 {0} 启动紧急清理。如果卷已断开连接、挂载状态失效或存在待处理的写入操作,请在再次使用前使用 fsck 或相应的修复工具检查文件系统。</entry>
<entry lang="zh-cn" key="FORMAT_STAGE_WRITING_DATA">正在创建卷数据。请稍候。</entry>