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.

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

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

相关推荐
xfddlm11 分钟前
边缘计算_ubuntu环境下使用瑞芯微RK3576NPU推理LLM
人工智能·ubuntu·边缘计算
Fleshy数模13 分钟前
MySQL 表创建全攻略:Navicat 图形化与 Xshell 命令行双模式实践
linux·mysql
神梦流1 小时前
GE 引擎的非标准数据流处理:稀疏张量与自定义算子在图优化中的语义保持
linux·运维·服务器
兜兜转转了多少年1 小时前
从脚本到系统:2026 年 AI 代理驱动的 Shell 自动化
运维·人工智能·自动化
EHagSJVNpTY1 小时前
MATLAB 中基于最大重叠离散小波变换的心电信号处理探索
ubuntu
.小墨迹1 小时前
apollo学习之借道超车的速度规划
linux·c++·学习·算法·ubuntu
Lsir10110_2 小时前
【Linux】中断 —— 操作系统的运行基石
linux·运维·嵌入式硬件
Sheffield2 小时前
command和shell模块到底区别在哪?
linux·云计算·ansible
历程里程碑2 小时前
Linux20 : IO
linux·c语言·开发语言·数据结构·c++·算法
郝学胜-神的一滴2 小时前
深入浅出:使用Linux系统函数构建高性能TCP服务器
linux·服务器·开发语言·网络·c++·tcp/ip·程序人生