Ata2 异常 Emask 错误显示在 tty 中

Ata2 异常 Emask 错误显示在 tty 中

我正在运行 Arch Linux,问题是当我打开计算机并进入 TTY 时,它显示:

[ 5159.397489] ata2: exception Emask 0x10 SAct 0x0 SErr 0x4040000 action 0xe frozen
[ 5159.397493] ata2: irq_stat 0x00000040, connection status changed
[ 5159.397495] ata2: SError: { DevExch }

有时也是ata2 comreset failed

但是这个错误只显示在TTY中,我的意思是gnome-terminal中没有这样的错误。

我尝试解决它,但发现,所以它说我可以使用e2fsck -c -c命令。但是当我尝试时e2fsck -c -c /dev/sda,它显示以下错误:

The superblock could not be read or does not describe a valid ext2/ext3/ext4
filesystem.  If the device is valid and it really contains an ext2/ext3/ext4
filesystem (and not swap or ufs or something else), then the superblock
is corrupt, and you might try running e2fsck with an alternate superblock:
    e2fsck -b 8193 <device>
 or
    e2fsck -b 32768 <device>

我也尝试了该建议,但错误是一样的。

这个问题与我的硬盘有关吗?我该如何解决?

答案1

我不确定以下内容唯一的错误在这个过程中,但肯定需要指出。你说你用了

 e2fsck -c -c /dev/sda

但命令应该是

 e2fsck -c -c /dev/sda1

或类似的东西。我理解你上面引用的帖子没有明确说明你应该应用于e2fsck单个分区还是整个磁盘,以及什么是很多更差,手册进一步加剧了这种混乱

概要

e2fsck[ -pacnyrdfkvtDFV ] [ -b 超级块 ] [ -B 块大小 ] [ -l|-L 坏块文件 ] [ -C fd ] [ -j 外部日志 ] [ -E 扩展选项 ] 设备

但(至少)它很快纠正了自己,指出:

设备是存储文件系统的设备文件(例如/dev/hdc1)。

这也是有道理的:文件系统不会超出分区边界:您可以拥有与分区数量一样多的不同文件系统。

e2fsck通过在分区上运行,您将获得有关坏块的更多信息(如果有)。如果您确实有坏块,本文解释如何修复它们。我会给你一个概述。

  1. 首先,检查文件系统,无论哪个分区

       sudo fsck.ext4 -v /dev/sda1
    

    如果文件系统确实损坏,您将得到类似这样的输出:

       fsck /dev/sda5
       fsck 1.41.4 (27-Jan-2009)
       e2fsck 1.41.4 (27-Jan-2009)
       fsck.ext4: Group descriptors look bad... trying backup blocks...
       fsck.ext4: Bad magic number in super-block while trying to open /dev/sda5
    
       The superblock could not be read or does not describe a correct ext4
       filesystem.  If the device is valid and it really contains an ext4
       filesystem (and not swap or ufs or something else), then the superblock
       is corrupt, and you might try running e2fsck with an alternate superblock:
       e2fsck -b 8193 <device>
    
  2. 找到备份超级节点的保存位置:

       mke2fs -n /dev/sda1
    

    您将获得一个很长的输出,在其末尾您会发现:

       Superblock backups stored on blocks:
       32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208
    
  3. 现在是时候从备份中恢复坏的超级块了,

       e2fsck -b block_number /dev/sda1
    

其中 block_number 是第一个(合理的)备份超级块的编号。您应该已经完成​​了。

请记住:目前还不清楚哪个分区有坏的超级块,您必须在所有分区上运行这组指令,直到找到有坏超级块的分区。虽然可能性不大,但可能会有多个。

相关内容