检测到外部硬盘但未安装

3l4*_*4ng 10 fstab mount disk hard-drive

我有一个只有 1 个分区的 NTFS 格式的 WD MyPassport,并且在 Windows 上运行良好。几天前它在 Ubuntu 上运行良好(第 3 点和第 4 点解释了我可能做了哪些更改)。

我正在使用带有 3.19.0-32-generic 的 Ubuntu 15.04 64 位。

检测到硬盘驱动器,但我无法安装它。

  1. 这是它在磁盘应用程序上的显示方式

    磁盘截图

  2. lsusb显示硬盘信息。连接到不同的 USB 端口没有帮助

    Bus 002 Device 002: ID 1058:0741 Western Digital Technologies, Inc.
    
    Run Code Online (Sandbox Code Playgroud)
  3. 我的内部硬盘有一个 ext4 和两个 NTFS 分区,它们在 上显示正常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>
    # / was on /dev/sda3 during installation
    UUID=964a0a16-e279-4551-a71f-0b8594a42170 /               ext4    errors=remount-ro 0       1
    /dev/disk/by-uuid/280E83930E835928 /mnt/280E83930E835928 auto nosuid,nodev,nofail,x-gvfs-show,noauto 0 0
    /dev/disk/by-uuid/8A9CAF0D9CAEF33D /media/usr/part1 auto nosuid,nodev,nofail,x-gvfs-show 0 0
    /swap   swap    swap    defaults        0       0
    
    Run Code Online (Sandbox Code Playgroud)
  4. /swap分区实际上是由我使用交换文件创建的fallocatemkswap用于休眠,如Debian Wiki Hibernation Manual 中所述。也许我的硬盘问题与此有关 - 我无法弄清楚

  5. 根据要求输出一些命令

    • $sudo fdisk -l

      Disk /dev/sda: 931.5 GiB, 1000204886016 bytes, 1953525168 sectors
      Units: sectors of 1 * 512 = 512 bytes
      Sector size (logical/physical): 512 bytes / 4096 bytes
      I/O size (minimum/optimal): 4096 bytes / 4096 bytes
      Disklabel type: dos
      Disk identifier: 0x397a8933
      
      Device     Boot     Start        End    Sectors   Size Id Type
      /dev/sda1  *         2048     718847     716800   350M  7 HPFS/NTFS/exFAT
      /dev/sda2          718848  471861247  471142400 224.7G  7 HPFS/NTFS/exFAT
      /dev/sda3       471861248  786434047  314572800   150G  6 FAT16
      /dev/sda4       786434048 1953521663 1167087616 556.5G  7 HPFS/NTFS/exFAT
      
      Disk /dev/sdb: 1.8 TiB, 2000365289472 bytes, 3906963456 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
      Disklabel type: dos
      Disk identifier: 0x0005f107
      
      Device     Boot Start        End    Sectors  Size Id Type
      /dev/sdb1        2048 3906963455 3906961408  1.8T  7 HPFS/NTFS/exFAT
      
      Run Code Online (Sandbox Code Playgroud)
    • blkid 没有为外部磁盘提供输出 /dev/sdb1

      $ sudo blkid /dev/sdb1
      $
      
      Run Code Online (Sandbox Code Playgroud)
  6. 大编辑 - 能够通过命令行安装硬盘。如何自动挂载?

    • 创建一个目录/media/usr/external/并运行sudo mount -t ntfs-3g /dev/sdb1 /media/usr/external. 硬盘安装完美。
    • 磁盘应用程序现在可以识别安装的硬盘 磁盘应用程序现在可以识别安装的硬盘
    • 我尝试更改安装选项以使其类似于我的内部硬盘驱动器(打开Automatic Mount Options没有帮助)。Mount at Startup选中时该选项没有任何区别。 安装选项 这就是我fstab现在的样子(已删除swap条目)

      # /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>
      # / was on /dev/sda3 during installation
      UUID=964a0a16-e279-4551-a71f-0b8594a42170 /               ext4    errors=remount-ro 0       1
      /dev/disk/by-uuid/280E83930E835928 /mnt/280E83930E835928 auto nosuid,nodev,nofail,x-gvfs-show,noauto 0 0
      /dev/disk/by-uuid/8A9CAF0D9CAEF33D /media/usr/part1 auto nosuid,nodev,nofail,x-gvfs-show 0 0
      
      Run Code Online (Sandbox Code Playgroud)
    • 断开并重新连接硬盘后 - 它不会自动挂载。尝试从 Nautilus 挂载时出现以下错误。 只有root可以挂载

既然安装问题已经解决,我该如何自动安装我的硬盘?早些时候我从来不需要sudo安装 - 它只是连接。

SKu*_*zZz 13

这将解决问题

  • 使用以下命令安装 ntfs-3g: sudo apt install ntfs-3g
  • 运行fdisk -l找出挂载点在哪里
  • ntfsfix -b /dev/{mount_point}

  • 停电后我也遇到了类似的问题。检测到 USB 硬盘驱动器但未安装。你的回答解决了我的问题。 (2认同)

Ale*_*owe 1

sudo mkdir /media/External-HDD
sudo apt-get install ntfs-3g -y
sudo mount -t ntfs-3g /dev/sdb1 /media/External-HDD
Run Code Online (Sandbox Code Playgroud)