!['mount -t ntfs-3g' 失败(退出代码 1),但 'ntfs-3g' 成功](https://linux22.com/image/1080090/'mount%20-t%20ntfs-3g'%20%E5%A4%B1%E8%B4%A5%EF%BC%88%E9%80%80%E5%87%BA%E4%BB%A3%E7%A0%81%201%EF%BC%89%EF%BC%8C%E4%BD%86%20'ntfs-3g'%20%E6%88%90%E5%8A%9F.png)
我目前使用的是 12.04LTS,并且安装了几个更新。(不确定是哪一个)
现在我的 nautilus 无法挂载任何 NTFS 分区(提示退出代码 1),事实上
sudo mount -t ntfs-3g /dev/sda3 /media/DATA; echo $?
打印 1.(/dev/sda3
是 NTFS 分区)。但更奇怪的是,通过调用,ntfs-3g /dev/sda3 /media/DATA
我可以将其挂载并正常使用(当然,无论哪种情况,我都是/media/DATA
手动创建的)。
man ntfs-3g
告诉我这两个应该是别名,所以我不确定为什么。
我尝试过
- 安装所有可用的更新。(不,它不起作用。可能是因为系统
/etc
曾经从旧备份中恢复过) ntfs-config
。不,它不起作用。它添加了条目,/etc/fstab
但随后我被迫在启动时跳过安装它。dpkg-reconfigure ntfs-3g
。我尝试了过程中可用的两个问题的所有 4 种组合(YY、NY、YN、NN),每次尝试后我都会重新启动 PC。不起作用。
是的,我可以设置一个启动脚本来ntfs-3g
安装我的驱动器。
我strace
的mount -t ntfs-3g
execve("/bin/mount", ["mount", "-t", "ntfs-3g", "/dev/sda5", "/media/DATA"], [/* 27 vars */]) = 0
brk(0) = 0x96f5000
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
mmap2(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb779c000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=141237, ...}) = 0
mmap2(NULL, 141237, PROT_READ, MAP_PRIVATE, 3, 0) = 0xb7779000
close(3) = 0
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
open("/lib/i386-linux-gnu/libblkid.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0P8\0\0004\0\0\0"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0644, st_size=162044, ...}) = 0
mmap2(NULL, 164784, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb7750000
mmap2(0xb7776000, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x25) = 0xb7776000
close(3) = 0
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
open("/lib/i386-linux-gnu/libmount.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0`C\0\0004\0\0\0"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0644, st_size=157544, ...}) = 0
mmap2(NULL, 160260, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb7728000
mmap2(0xb774e000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x25) = 0xb774e000
close(3) = 0
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
open("/lib/i386-linux-gnu/libselinux.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0@A\0\0004\0\0\0"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0644, st_size=120748, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7727000
mmap2(NULL, 125852, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb7708000
mmap2(0xb7725000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1c) = 0xb7725000
close(3) = 0
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
open("/lib/i386-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0000\226\1\0004\0\0\0"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=1730024, ...}) = 0
mmap2(NULL, 1743580, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb755e000
mprotect(0xb7701000, 4096, PROT_NONE) = 0
mmap2(0xb7702000, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1a3) = 0xb7702000
mmap2(0xb7705000, 10972, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xb7705000
close(3) = 0
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
open("/lib/i386-linux-gnu/libuuid.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\260\17\0\0004\0\0\0"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0644, st_size=18012, ...}) = 0
mmap2(NULL, 20700, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb7558000
mmap2(0xb755c000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x3) = 0xb755c000
close(3) = 0
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
open("/lib/i386-linux-gnu/libdl.so.2", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0`\n\0\0004\0\0\0"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0644, st_size=13940, ...}) = 0
mmap2(NULL, 16504, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb7553000
mmap2(0xb7556000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x2) = 0xb7556000
close(3) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7552000
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7551000
set_thread_area({entry_number:-1 -> 6, base_addr:0xb7551780, limit:1048575, seg_32bit:1, contents:0, read_exec_only:0, limit_in_pages:1, seg_not_present:0, useable:1}) = 0
mprotect(0xb7702000, 8192, PROT_READ) = 0
mprotect(0xb7556000, 4096, PROT_READ) = 0
mprotect(0xb755c000, 4096, PROT_READ) = 0
mprotect(0xb7725000, 4096, PROT_READ) = 0
mprotect(0xb7776000, 8192, PROT_READ) = 0
mprotect(0xb774e000, 4096, PROT_READ) = 0
mprotect(0x805d000, 4096, PROT_READ) = 0
mprotect(0xb77bf000, 4096, PROT_READ) = 0
munmap(0xb7779000, 141237) = 0
statfs64("/selinux", 84, {f_type="EXT2_SUPER_MAGIC", f_bsize=4096, f_blocks=7211656, f_bfree=3093320, f_bavail=2731836, f_files=1810432, f_ffree=1623318, f_fsid={85910847, -1799323758}, f_namelen=255, f_frsize=4096}) = 0
brk(0) = 0x96f5000
brk(0x9716000) = 0x9716000
open("/proc/filesystems", O_RDONLY|O_LARGEFILE) = 3
fstat64(3, {st_mode=S_IFREG|0444, st_size=0, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb779b000
read(3, "nodev\tsysfs\nnodev\trootfs\nnodev\tb"..., 1024) = 322
read(3, "", 1024) = 0
close(3) = 0
munmap(0xb779b000, 4096) = 0
open("/usr/lib/locale/locale-archive", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=10411536, ...}) = 0
mmap2(NULL, 2097152, PROT_READ, MAP_PRIVATE, 3, 0) = 0xb7351000
mmap2(NULL, 8192, PROT_READ, MAP_PRIVATE, 3, 0x434) = 0xb779a000
mmap2(NULL, 1716224, PROT_READ, MAP_PRIVATE, 3, 0x714) = 0xb71ae000
close(3) = 0
open("/usr/lib/locale/locale-archive", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=10411536, ...}) = 0
mmap2(NULL, 4096, PROT_READ, MAP_PRIVATE, 3, 0x2a1) = 0xb71ad000
mmap2(NULL, 1503232, PROT_READ, MAP_PRIVATE, 3, 0x5a5) = 0xb703e000
close(3) = 0
umask(022) = 022
open("/dev/null", O_RDWR|O_LARGEFILE) = 3
close(3) = 0
getuid32() = 0
geteuid32() = 0
readlink("/dev", 0xbfe5a51b, 4096) = -1 EINVAL (Invalid argument)
readlink("/dev/sda5", 0xbfe5a51b, 4096) = -1 EINVAL (Invalid argument)
stat64("/sbin/mount.ntfs-3g", {st_mode=S_IFREG, st_size=0, ...}) = 0
clone(child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0xb75517e8) = 4487
wait4(-1, [{WIFEXITED(s) && WEXITSTATUS(s) == 1}], 0, NULL) = 4487
--- SIGCHLD (Child exited) @ 0 (0) ---
exit_group(1) = ?
答案1
这不能解决问题技术上,但无论如何我*符号链接*了它/bin/ntfs-3g
,/sbin/mount.ntfs-3g
看起来好像可以工作了。(但仍然是另一个令人讨厌的修复。)