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.

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

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

相关推荐
Kevin不想说话926196 分钟前
Ubuntu 24.04 安装搜狗输入法完整教程
ubuntu
数据智能老司机14 分钟前
Linux内核编程——字符设备驱动程序
linux·架构·操作系统
lyx 弈心40 分钟前
I/O 进程 7.2
linux·算法·io
舒克起飞了1 小时前
linux系统编程——Makefile、GDB调试
linux·运维·服务器
背影疾风1 小时前
C++之路:类基础、构造析构、拷贝构造函数
linux·开发语言·c++
deming_su1 小时前
轻松上手:使用Nginx实现高效负载均衡
运维·nginx·负载均衡
m0_694845572 小时前
服务器如何配置防火墙规则开放/关闭端口?
linux·服务器·安全·云计算
降世神童2 小时前
华为云Flexus+DeepSeek征文| 使用华为云CCE容器部署Dify-LLM高可用方案的验证与测试
运维·华为云·aigc
降世神童2 小时前
华为云Flexus+DeepSeek征文| 基于华为云Dify-LLM高可用平台开发运维故障处理智能体
运维·华为云·aigc
阿巴~阿巴~3 小时前
Linux基本命令篇 —— alias命令
linux·服务器·bash