linux没有权限挂载u盘,Linux下无法挂载U盘「终于解决」

linux没有权限挂载u盘,Linux下无法挂载U盘「终于解决」今日在拷贝文件时,可能是没注意到文件还没写入U盘,强行将其拔出,不料却出现无法挂载的情况:Errormounting/dev/sdb4at/media/xxx/xx:Command-line`mount-t”ntfs”-o”uhelper=udisks2,nodev,nosuid,uid=1000,gid=1000,dmask=0077,fmask=0177″”/dev/sdb4″…

大家好,欢迎来到IT知识分享网。

今日在拷贝文件时,可能是没注意到文件还没写入U盘,强行将其拔出,不料却出现无法挂载的情况:

Error mounting /dev/sdb4 at /media/xxx/xx: Command-line`mount -t “ntfs” -o”uhelper=udisks2,nodev,nosuid,uid=1000,gid=1000,dmask=0077,fmask=0177″”/dev/sdb4″ “/media/eden/文檔”‘ exited with non-zero exit status14: The disk contains an unclean file system (0, 0).Metadata kept in Windows cache, refused to mount.Failed to mount ‘/dev/sdb4’: Operation not permittedThe NTFS partition is in an unsafe state. Please resume andshutdownWindows fully (no hibernation or fast restarting), or mount thevolumeread-only with the ‘ro’ mount option.

究其原因,估计是拔出时文件还未写完,出现故障,逐步排查如下:

1、打开终端,输入sudo fdisk -l 可列出所有的分区情况,找到自己U盘的分区;

Disk /dev/sda: 500.1 GB, 500107862016 bytes

255 heads, 63 sectors/track, 60801 cylinders, total 976773168 sectors

Units = 扇区 of 1 * 512 = 512 bytes

Sector size (logical/physical): 512 bytes / 4096 bytes

I/O size (minimum/optimal): 4096 bytes / 4096 bytes

Disk identifier: 0x13bcd83a

设备 启动      起点          终点     块数   Id  系统

/dev/sda1   *          63   163846934    81923436    7  HPFS/NTFS/exFAT

分区 1 未起始于物理扇区边界。

/dev/sda2       163846996   859797503   347975254    f  W95 扩展 (LBA)

分区 2 未起始于物理扇区边界。

/dev/sda5       163846998   404500634   120326818+   7  HPFS/NTFS/exFAT

分区 5 未起始于物理扇区边界。

/dev/sda6       404500698   645138269   120318786    7  HPFS/NTFS/exFAT

分区 6 未起始于物理扇区边界。

/dev/sda7       645138333   693843008    24352338    7  HPFS/NTFS/exFAT

分区 7 未起始于物理扇区边界。

/dev/sda8       693843968   697843711     1999872   82  Linux 交换 / Solaris

/dev/sda9       697845760   797843455    49998848   83  Linux

/dev/sda10      797845504   857843711    29999104   83  Linux

/dev/sda11      857845760   859797503      975872   83  Linux

Disk /dev/sdb: 8004 MB, 8004304896 bytes

255 heads, 63 sectors/track, 973 cylinders, total 15633408 sectors

Units = 扇区 of 1 * 512 = 512 bytes

Sector size (logical/physical): 512 bytes / 512 bytes

I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk identifier: 0xcad4ebea

设备 启动      起点          终点     块数   Id  系统

/dev/sdb4   *         256    15633407     7816576    7  HPFS/NTFS/exFAT

2、得知分区为:/dev/sdb4,创建挂载目录:

sudo mkdir /media/xxx/yyy          (xxx为用户名,yyy为挂载的U盘的名字)

3、挂载U盘:

mount -t ntfs-3g  /dev/sdb4  /media/xxx/yyy/ -o force

如此做之后,还是会出现错误:

$MFTMirr does not match $MFT (record 0).

Failed to mount ‘/dev/sdb6’: 输入/输出错误

NTFS is either inconsistent, or there is a hardware fault, or it’s a

SoftRAID/FakeRAID hardware. In the first case run chkdsk /f on Windows

then reboot into Windows twice. The usage of the /f parameter is very

important! If the device is a SoftRAID/FakeRAID then first activate

it and mount a different device under the /dev/mapper/ directory, (e.g.

/dev/mapper/nvidia_eahaabcc1). Please see the ‘dmraid’ documentation

for more details.

4、还是不行,网上一搜,用以下命令,大功告成:

sudo ntfsfix /dev/sdb6

Mounting volume… FAILEDAttempting to correct errors…Processing $MFT and $MFTMirr…Reading $MFT… OKReading $MFTMirr… OKComparing $MFTMirr to $MFT… FAILEDCorrecting differences in $MFTMirr record 0…OKProcessing of $MFT and $MFTMirr completed successfully.Setting required flags on partition… OKGoing to empty the journal ($LogFile)… OKNTFS volume version is 3.1.NTFS partition /dev/sdb6 was processed successfully.

看来以后自己得小心插拔U盘了。

免责声明:本站所有文章内容,图片,视频等均是来源于用户投稿和互联网及文摘转载整编而成,不代表本站观点,不承担相关法律责任。其著作权各归其原作者或其出版社所有。如发现本站有涉嫌抄袭侵权/违法违规的内容,侵犯到您的权益,请在线联系站长,一经查实,本站将立刻删除。 本文来自网络,若有侵权,请联系删除,如若转载,请注明出处:https://yundeesoft.com/25035.html

(0)
上一篇 2023-08-04 11:00
下一篇 2023-08-05 13:33

相关推荐

发表回复

您的电子邮箱地址不会被公开。 必填项已用 * 标注

关注微信