无法安装外部 USB 驱动程序 - 在 Ubuntu 12.04 上

无法安装外部 USB 驱动程序 - 在 Ubuntu 12.04 上

当我插入外部 USB 驱动程序时,我看到下一个提示:

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 fdisk -l

nazar_art@nazar-desctop:~/Desktop/Big JAVA/bj4_code/ch24/time$ sudo fdisk -l

Disk /dev/sda: 160.0 GB, 160041885696 bytes
255 heads, 63 sectors/track, 19457 cylinders, total 312581808 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000e28b8

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *        2048   310484991   155241472   83  Linux
/dev/sda2       310487038   312580095     1046529    5  Extended
/dev/sda5       310487040   312580095     1046528   82  Linux swap / Solaris

Disk /dev/sdb: 1015 MB, 1015808000 bytes
31 heads, 32 sectors/track, 2000 cylinders, total 1984000 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1   *          31     1983999      991984+   6  FAT16

Disk /dev/sdd: 7751 MB, 7751073792 bytes
255 heads, 63 sectors/track, 942 cylinders, total 15138816 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0xc3072e18

   Device Boot      Start         End      Blocks   Id  System
/dev/sdd1   *          63    15138815     7569376+   7  HPFS/NTFS/exFAT

gksudo gedit /etc/fstab

# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
proc                                       /proc           proc  nodev,noexec,nosuid         0  0  
# / was on /dev/sda1 during installation
UUID=5f5d330f-d5f2-4157-9496-94f1dce2f181  /               ext4  errors=remount-ro           0  1  
# swap was on /dev/sda5 during installation
UUID=84747ef4-6f50-49bc-9df1-fcba364ba299  none            swap  sw                          0  0  

/dev/fd0                                   /media/floppy0  auto  rw,user,noauto,exec,utf8    0  0  
/dev/sdc1                                  /media/sdc1     auto  uid=1000,noauto,users,exec  0  0  
/dev/sdd1                                  /media/sdd1     auto  uid=1000,noauto,users,exec  0  0  
/dev/sdb1                                  /media/sdb1     auto  uid=1000,noauto,users,exec  0  0

更新: 检查是否已安装ntfs-3g

nazar_art@nazar-desctop:~$ dpkg -s ntfs-3g
Package: ntfs-3g
Status: install ok installed
Priority: optional
Section: otherosfs
Installed-Size: 1422
Maintainer: Ubuntu Developers <[email protected]>
Architecture: amd64
Version: 1:2012.1.15AR.1-1ubuntu1.2
Replaces: libntfs-3g75, ntfsprogs
Depends: debconf (>= 0.5) | debconf-2.0, libc6 (>= 2.14), libfuse2 (>= 2.8.1), libgcrypt11 (>= 1.4.5), libgnutls26 (>= 2.12.6.1-0), initramfs-tools (>= 0.99), initscripts (>= 2.88dsf-13.3)
Pre-Depends: multiarch-support, fuse
Conflicts: libntfs-3g75, ntfsprogs (<< 1:2011.10.9AR.1-3~)
Description: read/write NTFS driver for FUSE
 NTFS-3G uses FUSE (Filesystem in Userspace) to provide support for the NTFS
 filesystem used by Microsoft Windows. It can:
 .
  * create, remove, rename, or move files, directories, hard links, and streams;
  * read and write files, including streams, sparse files, and transparently
    compressed files;
  * handle special files like symbolic links, devices, and FIFOs;
  * provide standard management of file ownership and permissions, including
    POSIX ACLs.
 .
 This package also contains the tools previously available in the ntfsprogs
 package.
Homepage: http://www.tuxera.com/community/ntfs-3g-advanced/
Original-Maintainer: Daniel Baumann <[email protected]>

准确找出USB驱动器通过LSBLK:

nazar_art@nazar-desctop:~$ lsblk
NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
sda      8:0    0 149.1G  0 disk 
├─sda1   8:1    0 148.1G  0 part /
├─sda2   8:2    0     1K  0 part 
└─sda5   8:5    0  1022M  0 part [SWAP]
sdb      8:16   1   7.2G  0 disk 
└─sdb1   8:17   1   7.2G  0 part 
sdc      8:32   1 968.8M  0 disk 
└─sdc1   8:33   1 968.8M  0 part /media/sdc1
sr0     11:0    1  1024M  0 rom

这是 sdb1 - 这个外部 USB 驱动器。

再次尝试手动挂载:

nazar_art@nazar-desctop:~$ sudo mount /media/sdb1
[sudo] password for nazar_art: 
The disk contains an unclean file system (0, 0).
The file system wasn't safely closed on Windows. Fixing.

现在一切都可见了。

- 为什么会发生这种情况?
- 如何解决这个问题?

答案1

该错误表明尝试挂载文件系统时缺乏权限。我怀疑执行插件挂载的程序正在非 root 用户(可能是用于登录的用户帐户)下运行。

尽管 fstab 包含该users选项,但安装过程的一部分似乎仍然需要 root 访问权限。

要修复此问题,请以 root 身份手动执行安装。这应该可以完成这项工作:

sudo mount /media/sdd1

应该可以配置系统,以便执行挂载的程序以 root 身份运行,但这并不像听起来那么简单。

相关内容