我是一个相对较新的 Ubuntu 用户,在安装我的 2TB 外置硬盘时遇到了一些困难。当我第一次安装 Linux 时,我的外置硬盘工作正常,但是,它已经停止工作了,而我上面有很多我需要的重要文件。
之前我的硬盘会自动挂载,不用担心。但现在它却不能自动挂载,当我尝试手动挂载它时,总是遇到文件系统类型错误,似乎无法解决。
下面的图片描述了我尝试安装硬盘的逐步过程以及我收到的错误。如果有人知道我做错了什么或如何纠正这个问题,我将不胜感激。
步骤1)确保计算机识别我的外部硬盘。
pj@PJ:~$ dmesg
...
[ 5790.367910] scsi 7:0:0:0: Direct-Access WD My Passport 0748 1022 PQ: 0 ANSI: 6
[ 5790.368278] scsi 7:0:0:1: Enclosure WD SES Device 1022 PQ: 0 ANSI: 6
[ 5790.370122] sd 7:0:0:0: Attached scsi generic sg2 type 0
[ 5790.370310] ses 7:0:0:1: Attached Enclosure device
[ 5790.370462] ses 7:0:0:1: Attached scsi generic sg3 type 13
[ 5792.971601] sd 7:0:0:0: [sdb] 3906963456 512-byte logical blocks: (2.00 TB/1.81 TiB)
[ 5792.972148] sd 7:0:0:0: [sdb] Write Protect is off
[ 5792.972162] sd 7:0:0:0: [sdb] Mode Sense: 47 00 10 08
[ 5792.972591] sd 7:0:0:0: [sdb] No Caching mode page found
[ 5792.972605] sd 7:0:0:0: [sdb] Assuming drive cache: write through
[ 5792.975235] sd 7:0:0:0: [sdb] No Caching mode page found
[ 5792.975249] sd 7:0:0:0: [sdb] Assuming drive cache: write through
[ 5792.987504] sdb: sdb1
[ 5792.988900] sd 7:0:0:0: [sdb] No Caching mode page found
[ 5792.988911] sd 7:0:0:0: [sdb] Assuming drive cache: write through
[ 5792.988920] sd 7:0:0:0: [sdb] Attached SCSI disk
步骤 2)检查是否安装正确(没有)
pj@PJ:~$ df -ah
Filesystem Size Used Avail Use% Mounted on
/dev/sda1 682G 3.9G 644G 1% /
proc 0 0 0 - /proc
sysfs 0 0 0 - /sys
none 0 0 0 - /sys/fs/fuse/connections
none 0 0 0 - /sys/kernel/debug
none 0 0 0 - /sys/kernel/security
udev 2.9G 4.0K 2.9G 1% /dev
devpts 0 0 0 - /dev/pts
tmpfs 1.2G 928K 1.2G 1% /run
none 5.0M 0 5.0M 0% /run/lock
none 2.9G 156K 2.9G 1% /run/shm
gvfs-fuse-daemon 0 0 0 - /home/pj/.gvfs
步骤 3)尝试使用 NTFS 和 VFAT(作为 SDB 和 SDB1)手动挂载
pj@PJ:~$ sudo mount /dev/sdb /media/Passport/
NTFS signature is missing.
Failed to mount '/dev/sdb': Invalid argument
The device '/dev/sdb' doesn't seem to have a valid NTFS.
Maybe the wrong device is used? Or the whole disk instead of a
partition (e.g. /dev/sda, not /dev/sda1)? Or the other way around?
pj@PJ:~$ sudo mount /dev/sdb1 /media/Passport/
NTFS signature is missing.
Failed to mount '/dev/sdb1': Invalid argument
The device '/dev/sdb1' doesn't seem to have a valid NTFS.
Maybe the wrong device is used? Or the whole disk instead of a
partition (e.g. /dev/sda, not /dev/sda1)? Or the other way around?
pj@PJ:~$ sudo mount -t ntfs /dev/sdb /media/Passport/
NTFS signature is missing.
Failed to mount '/dev/sdb': Invalid argument
The device '/dev/sdb' doesn't seem to have a valid NTFS.
Maybe the wrong device is used? Or the whole disk instead of a
partition (e.g. /dev/sda, not /dev/sda1)? Or the other way around?
pj@PJ:~$ sudo mount -t vfat /dev/sdb /media/Passport/
mount: wrong fs type, bad option, bad superblock on /dev/sdb,
missing codepage or helper program, or other error
In some cases useful info is found in syslog - try
dmesg | tail or so
pj@PJ:~$ sudo mount -t ntfs /dev/sdb1 /media/Passport/
NTFS signature is missing.
Failed to mount '/dev/sdb1': Invalid argument
The device '/dev/sdb1' doesn't seem to have a valid NTFS.
Maybe the wrong device is used? Or the whole disk instead of a
partition (e.g. /dev/sda, not /dev/sda1)? Or the other way around?
pj@PJ:~$ sudo mount -t vfat /dev/sdb1 /media/Passport/
mount: wrong fs type, bad option, bad superblock on /dev/sdb1,
missing codepage or helper program, or other error
In some cases useful info is found in syslog - try
dmesg | tail or so
答案1
如何在 Linux 中挂载 NTFS 文件系统
下载 ntfs 3g从终端使用 wget 命令。
tar -xvf ntfs-3g_ntfsprogs-2013.1.13.tgz
cd ntfs-3g_ntfsprogs-2013.1.13.tgz
./configure
make
make install
sudo mount -t ntfs-3g /dev/sdb1 /mnt/ntfs HDD
重启后永久挂载的 fstab 条目
sudo vim /etc/fstab
/dev/sda1 /mnt/ntfs HDD ntfs-3g defaults 0 0
最后输入fstab条目