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.

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

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

相关推荐
曾凡宇先生10 分钟前
openEuler安装jdk,nginx,redis
linux·开发语言·数据库·openeuler
_OP_CHEN10 分钟前
Linux系统编程:(三)基础指令详解(2)
linux·man·more·cat·linux指令·cp·whereis
安卓开发者17 分钟前
Docker常用镜像使用指南:从入门到实战
运维·docker·容器
Lenyiin43 分钟前
《 Linux 点滴漫谈: 三 》掌控终端:让 Shell 成为你的系统魔杖
linux·运维·服务器·lenyiin
杭州泽沃电子科技有限公司1 小时前
钢铁厂运输设备在线监测:构建智能工厂的安全与效率基石
运维·人工智能·智能监测
Lynnxiaowen1 小时前
今天我们学习python编程常用模块与面向对象
运维·python·学习·云计算
一匹电信狗1 小时前
【MySQL】数据库表的操作
linux·运维·服务器·数据库·mysql·ubuntu·小程序
撬动未来的支点1 小时前
【Linux】Linux 零拷贝技术全景解读:从内核到硬件的性能优化之道
linux·服务器·性能优化
ajassi20001 小时前
开源 Linux 服务器与中间件(六)服务器--Lighttpd
linux·服务器·开源
立昂2 小时前
Linux route
linux·运维