Bus error (core dumped). 0%
Mia Lopez
If I run sudo apt-get updateor sudo apt-get upgrade etc.
I get Bus error (core dumped). 0%
In logs I can see:
Jun 27 12:49:22 topic1 kernel: [37586.366988] ata1.00: exception Emask 0x0 SAct 0x2000000 SErr 0x0 action 0x0
Jun 27 12:49:22 topic1 kernel: [37586.367023] ata1.00: irq_stat 0x40000008
Jun 27 12:49:22 topic1 kernel: [37586.367036] ata1.00: failed command: READ FPDMA QUEUED
Jun 27 12:49:22 topic1 kernel: [37586.367056] ata1.00: cmd 60/08:c8:f0:97:eb/00:00:12:00:00/40 tag 25 ncq dma 4096 in
Jun 27 12:49:22 topic1 kernel: [37586.367056] res 41/40:00:f7:97:eb/00:00:12:00:00/40 Emask 0x409 (media error) <F>
Jun 27 12:49:22 topic1 kernel: [37586.367067] ata1.00: status: { DRDY ERR }
Jun 27 12:49:22 topic1 kernel: [37586.367073] ata1.00: error: { UNC }
Jun 27 12:49:22 topic1 kernel: [37586.368527] ata1.00: configured for UDMA/133
Jun 27 12:49:22 topic1 kernel: [37586.368567] sd 0:0:0:0: [sda] tag#25 FAILED Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE
Jun 27 12:49:22 topic1 kernel: [37586.368577] sd 0:0:0:0: [sda] tag#25 Sense Key : Medium Error [current]
Jun 27 12:49:22 topic1 kernel: [37586.368585] sd 0:0:0:0: [sda] tag#25 Add. Sense: Unrecovered read error - auto reallocate failed
Jun 27 12:49:22 topic1 kernel: [37586.368595] sd 0:0:0:0: [sda] tag#25 CDB: Read(10) 28 00 12 eb 97 f0 00 00 08 00
Jun 27 12:49:22 topic1 kernel: [37586.368600] print_req_error: I/O error, dev sda, sector 317429751
Jun 27 12:49:22 topic1 kernel: [37586.368679] ata1: EH complete
----(I wonder why is an media error?) After executing
hdparm --yes-i-know-what-i-am-doing --repair-sector 317429751 /dev/sdaI get next sector error, in this case 317429752.
I use Ubuntu 16.04 LTS
Disks1:
Disks2:
1 Answer
You have NCQ errors.
Jun 27 12:49:22 topic1 kernel: [37586.367036] ata1.00: failed command: READ FPDMA QUEUED
Jun 27 12:49:22 topic1 kernel: [37586.367056] ata1.00: cmd 60/08:c8:f0:97:eb/00:00:12:00:00/40 tag 25 ncq dma 4096 in
Jun 27 12:49:22 topic1 kernel: [37586.367056] res 41/40:00:f7:97:eb/00:00:12:00:00/40 Emask 0x409 (media error) <F>
Jun 27 12:49:22 topic1 kernel: [37586.367067] ata1.00: status: { DRDY ERR }
Jun 27 12:49:22 topic1 kernel: [37586.367073] ata1.00: error: { UNC }Native Command Queuing (NCQ) is an extension of the Serial ATA protocol allowing hard disk drives to internally optimize the order in which received read and write commands are executed.
First we fsck...
- boot to a Ubuntu Live DVD/USB in “Try Ubuntu” mode
- open a
terminalwindow by pressing Ctrl+Alt+T - type
sudo fdisk -l - identify the /dev/sdXX device name for your "Linux Filesystem"
- type
sudo fsck -f /dev/sdXX, replacingsdXXwith the number you found earlier - repeat the
fsckcommand if there were errors - type
reboot
Then we patch NCQ...
Edit sudo -H gedit /etc/default/grub and change the following line to include this extra parameter. Then do sudo update-grub to write the changes to disk. Reboot. Monitor hangs, and watch /var/log/syslog or dmesg for continued error messages.
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash libata.force=noncq"Then we bad block...
Note: do NOT abort a bad block scan!
Note: do NOT bad block a SSD
Note: backup your important files FIRST!
Note: this will take many hours
Note: you may have a pending HDD failure
Boot to a Ubuntu Live DVD/USB in “Try Ubuntu” mode.
In terminal...
sudo fdisk -l # identify all "Linux Filesystem" partitions
sudo e2fsck -fcky /dev/sdXX # read-only test
or
sudo e2fsck -fccky /dev/sdXX # non-destructive read/write test (recommended)
The -k is important, because it saves the previous bad block table, and adds any new bad blocks to that table. Without -k, you loose all of the prior bad block information.
The -fccky parameter...
-f Force checking even if the file system seems clean. -c This option causes e2fsck to use badblocks(8) program to do a read-only scan of the device in order to find any bad blocks. If any bad blocks are found, they are added to the bad block inode to prevent them from being allocated to a file or direc‐ tory. If this option is specified twice, then the bad block scan will be done using a non-destructive read-write test. -k When combined with the -c option, any existing bad blocks in the bad blocks list are preserved, and any new bad blocks found by running badblocks(8) will be added to the existing bad blocks list. -y Assume an answer of `yes' to all questions; allows e2fsck to be used non-interactively. This option may not be specified at the same time as the -n or -p options.Update #1:
After reviewing the SMART Data, it looks like your HDD is toast. If you look at image #1, overall assessment, you'll see it says 2840 bad sectors. That's not good. Also the read error rate and the relocated sector count and current pending sector count are all real bad.
Boot to a Ubuntu Live DVD/USB and backup whatever files you can to an external HDD, and then replace the drive.
13