Ata2 exception Emask error showing in tty

0

I'm running Arch Linux, the problem is when I turn on my computer and enter the TTY, it's displaying:

[ 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 }

Also sometimes it's ata2 comreset failed.

However this error is only showing in TTY, I mean there's no such error in gnome-terminal.

I tried to solve it and I found this, so it says that I can use e2fsck -c -c command. But when I try e2fsck -c -c /dev/sda, it says the following error:

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>

I also tried the suggestion but the error is the same.

Is this problem about my hard disk? How can I solve this?

linux
arch-linux
asked on Super User Nov 25, 2015 by Casimir Crystal • edited Nov 25, 2015 by Casimir Crystal

1 Answer

1

I am not sure the following is the only error in this procedure, but it surely needs to be pointed out. You say you used

 e2fsck -c -c /dev/sda

but the command should have been

 e2fsck -c -c /dev/sda1

or some such thing. I understand the post you referenced above is unclear on whether you should apply e2fsck to a single partition or to the whole disk, and, what is much worse, the Manual adds to this confusion by stating

Synopsis

e2fsck [ -pacnyrdfkvtDFV ] [ -b superblock ] [ -B blocksize ] [ -l|-L bad_blocks_file ] [ -C fd ] [ -j external-journal ] [ -E extended_options ] device

but (at least) it quickly redresses itself by stating:

device is the device file where the filesystem is stored (e.g. /dev/hdc1).

It also does make sense: a filesystem does not extend beyond the partition boundary: you can have as many distinct filesystems as you have partitions.

By running e2fsck on a partition, you will get more info on the bad blocks, if any. Should you indeed have bad blocks, this article explains how to fix them. I'll give you a rundown.

  1. First, the filesystem check, for whichever partition

       sudo fsck.ext4 -v /dev/sda1
    

    If the filesystem is indeed corrupted you will get an output like:

       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. Find where the backup supernodes are kept:

       mke2fs -n /dev/sda1
    

    You will get a long output, at the end of which you will find:

       Superblock backups stored on blocks:
       32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208
    
  3. It is now time to restore the bad superblock from the backups,

       e2fsck -b block_number /dev/sda1
    

where block_number is the number of the first (sane) backup superblock. You should be done.

Remember: it is not clear at this point which partition has bad superblocks, you will have to run this set of instructions on all partitions until you find the one with the bad superblocks. Though unlikely, there could be several.

answered on Super User Nov 25, 2015 by MariusMatutiae

User contributions licensed under CC BY-SA 3.0