0

I forgot to plug in the charger and my system shut down. After that I tried to start Ubuntu, but the HP logo was showing up for too long so I forced shutdown by pressing power button. After that this error showed up.

Error reading block 1315...(input/output error)
Run fsck manually

This error showed up:

This is showing up

K7AAY
  • 17,202
  • 1
    This is not a purely fsck question. This needs an fsck and a NCQ patch and maybe a bad blocking. If they reopen the question, I can provide a complete answer. – heynnema Apr 08 '20 at 18:58
  • Yogi... are you still there? – heynnema Apr 12 '20 at 00:10
  • I found my solution in already asked question, so I approved it and my question became duplicate. However I faced same problem 2nd time yesterday and used same approch to solve the issue. Thanks for your concern – Yogi Katba Apr 13 '20 at 12:34
  • Please tell me how you've been fixing it. As I mentioned in my previous comment, you probably have more than one problem, but I can't write an answer as they've closed the question. I've asked that it be reopened. Edit your question, add details about what you've done so far, and maybe it'll help reopen the question. – heynnema Apr 13 '20 at 12:56
  • Try clicking on reopen and see if that reopens the question. – heynnema Apr 13 '20 at 13:01
  • I ran fsck -y /dev/sda10. It fixed errors and I was able to start PC by typing bootup – Yogi Katba Apr 15 '20 at 13:54
  • Good! Now do the rest of my answer. Report back. – heynnema Apr 15 '20 at 14:48

1 Answers1

2

fsck

Let's first repair your file system...

  • at the (initramfs) prompt, type: fsck -f /dev/sda10
  • repeat the fsck command if there were errors
  • type reboot

NCQ

Then we stop the NCQ errors...

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.

Edit sudo -H gedit /etc/default/grub and change the following line to include this extra parameter (ignore any warning messages). 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"

bad blocking

Then we test for bad blocks on the disk...

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.
heynnema
  • 70,711