Its 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 terminal window 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, replacing sdXX with the number you found earlier
repeat the fsck command 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:

Shell/Bash相关代码片段

croc zsh autocomplete fix

src refspec does not match any : git push error

cannot install lap

npm status codes

pm2 in cronjob

convert raw to qcow2 qemu-img

add passphrase to ssh key

linux flush write cache

connect to gitlab without password using ssh

alias linux command

install dbt

longhorn in eks error install open iscsi

npm install prod only

permission denied: ./

vite react install

gnome workspace rename

connect to wifi using linux terminal

B188E2B695BD4743

trouble.nvim

sign_and_send_pubkey: signing failed for ed25519

how to kill all the processon gpu in linux

selenium auto install chrome driver

sed replace space with newline

how to reoload bashrc

Git Cheat sheet

reset migrations and db prisma

prisma force restart

shutdown server remote

install hiddify

redo git commit

how to install wine in fedora39

docker alpine

apt packages kept back

git revert last commit after push

crontab restart

crontab start

crontab stop

easily create https localhost

allow trafic to specific port from host ufw rule

update unturned server

Ionic - Sync changes to android/ios platforms

Ionic - Generate www folder

git bash change php version

how to enable gui debian

how to disable gui debian

cassandra download zip

github login ssh

math, math.js, mathjs

how to set alias in debian

how to move changes to another branch git

npm stripe

ffprobe for video resolution

npm not working

shell parameter expansion

shell string manipulation

shell manipulation

download skype deb

fish shell batch process file

lualatex install

git get folder from one repo to another

create virtual hosts in rocky linux

ubuntu docker image

dotnet remove package from cache

brew cdk not found

STEAM LINUX APEX NOT WORKING

unrar password protected rar file

alias pip to pip3

zsh compinit

linux check docker daemon running

git how to uncommit a commit --amend

remove containers with images and volumns

tauri cargo

can you upgrade the ram in msi p65 creator

ubuntu ssh add private keys

ssh-copy-id proxy jump

postgresql shell

powershell allow port 27017 udp tcp

ufw allow from interface

mac compress folder

shell escape