无法挂载外置硬盘

无法挂载外置硬盘

我正在使用 Debian,也正在使用 Windows(时间更长)。

我在 Windows 上加载了外部磁盘,但是当再次尝试在 Linux 上挂载时,我不断收到相同的错误:

Error mounting: mount exited with exit code 1: helper failed with:
Unprivileged user can not mount NTFS block devices using the external FUSE
library. Either mount the volume as root, or rebuild NTFS-3G with integrated
FUSE support and make it setuid root. Please see more information at
http://tuxera.com/community/ntfs-3g-faq/#unprivileged

尝试使用命令行安装但出现另一个错误:

:~$ sudo mount -t ntfs /dev/sda1 /media
Mount is denied because the NTFS volume is already exclusively opened.
The volume may be already mounted, or another software may use it which
could be identified for example by the help of the 'fuser' command.

答案1

这是我从各种来源(即http://tuxera.com/community/ntfs-3g-faq/#unprivileged) - 它相当长,但至少对 wheezy 和 jessie 有效:

  1. 打开终端
  2. 下载来源:

    $ apt-get source ntfs-3g
    
  3. 输入包源目录(名称可能有所不同)

    $ cd ntfs-3g-2014.2.15AR.2
    
  4. 更改包配置以使用内部fuse

    $ sed -i -e "s/--with-fuse=external/--with-fuse=internal/" debian/rules
    
  5. 构建包

    $ sudo apt-get build-dep ntfs-3g
    $ fakeroot debian/rules binary
    

    有时构建失败,所以清理并再次运行 - 现在应该可以工作:

    $ fakeroot debian/rules clean
    $ fakeroot debian/rules binary
    
  6. 安装创建的包(同样,名称可能有所不同)

    $ sudo dpkg -i ../ntfs-3g_2014.2.15AR.2-1+deb8u2_amd64.deb
    
  7. 现在你必须配置ntfs-3g为 setuid (这是危险的,你应该知道你在做什么):

     $ sudo dpkg-reconfigure ntfs-3g
    

    并回答yessetuid,或者如果它不起作用,请手动执行:

     $ chmod 4755 $(which ntfs-3g)
    
  8. 如果您不想在每次 Debian 升级后重复所有这些,请设置ntfs-3g为保留:

     $ echo "ntfs-3g hold" | sudo dpkg --set-selections
    

答案2

我在这个论坛找到了答案关联,建议以 root 身份安装驱动器:

mount -t ntfs /dev/sdb1 /mnt

相关内容