elementary OS7 Ubuntu 22.04中硬盘挂载报错

elementary OS7 Ubuntu 22.04中硬盘挂载报错

背景

上周末安装elementaryos7的过程中将windows10的引导文件搞丢了,这两天准备修复一下,保险期间将固态硬盘上的文件备份到移动硬盘上,备份过程中出现报错的问题,再次点击也提示挂载错误,手动命令行挂载错误依旧。随即又取了一块移动硬盘继续备份,备份过错中同样的问题再次出现,觉得这个可能是个共性问题,需要处理一下了。

挂载异常硬盘查看

手动创建目录挂载

bash 复制代码
sudo mkdir -p /mnt/mydisk
sudo mount /dev/sdd2 /mnt/mydisk

异常输入出

bash 复制代码
$MFTMirr does not match $MFT (record 0).
Failed to mount '/dev/sdd2': 输入/输出错误
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.

目标

将移动硬盘接入电脑正常使用

思路

根据提示信息查找问题原因

linux 系统上,在复制移动文件时,磁盘、U盘等外接硬件设备,异常掉落(接口松动、中断),再次挂载硬盘时就会出现错误提示,硬盘分区的$MFT文件出现问题。

解决方法使用ntfsfix 工具修复

解决方法

使用命令修复,如果提示没有该命令,

bash 复制代码
ntfsfix /dev/sdb1
bash: ntfsfix: command not found...

使用命令行安装该工具

bash 复制代码
# centos
yum install ntfsfix
# ubuntu
sudo apt install ntfsfix

修复命令

说明: /dev/sdd2为本机的错误硬盘,根据自己的实际硬盘信息输入实际值。如果不知道硬盘盘符使用lsblk命令查看

bash 复制代码
sudo ntfsfix /dev/sdd2
Mounting volume... $MFTMirr does not match $MFT (record 0).
FAILED
Attempting to correct errors... 
Processing $MFT and $MFTMirr...
Reading $MFT... OK
Reading $MFTMirr... OK
Comparing $MFTMirr to $MFT... FAILED
Correcting differences in $MFTMirr record 0...OK
Processing of $MFT and $MFTMirr completed successfully.
Setting required flags on partition... OK
Going to empty the journal ($LogFile)... OK
Checking the alternate boot sector... OK
NTFS volume version is 3.1.
NTFS partition /dev/sdd2 was processed successfully.

修复完毕后,再次打开硬盘,硬盘正常打开,可以对硬盘中的文件进行操作。

以上为硬盘挂载时报错的处理过程。

相关推荐
Championship.23.246 小时前
Linux 3.0 锁机制与故障排查详解
linux·运维·服务器
天疆说6 小时前
Zotero Connector 在 Edge 里找不到桌面 Zotero(Linux / Zotero 9.0.6 / Edge 150)
linux·前端·edge
风123456789~8 小时前
【Linux专栏】ls 排除某个文件
linux·运维·服务器
IT曙光8 小时前
ubuntu apt-get离线源制作
linux·ubuntu
其实防守也摸鱼9 小时前
运维--学习阶段问题解答(1)(自测)
linux·运维·服务器·数据库·学习·自动化·命令模式
懒鸟一枚9 小时前
深入理解 Linux 内存、Swap 交换分区与分页机制的关系
java·linux·数据库
Darkwanderor10 小时前
对Linux的进程控制的研究
linux·运维·c++
bksczm13 小时前
linux之线程概念和控制
linux·开发语言·c++
爱网络爱Linux13 小时前
Linux proc 目录安全加固
linux·运维·rhce·rhca·红帽认证·proc 目录安全加固
hehelm13 小时前
Linux网络编程—TCP字典翻译系统
linux·开发语言·网络·c++·tcp/ip