- Locate the drive's device ID using the
lsblkcommand - Check the recommended block size using the command
blockdev --getbsz /dev/<YOUR BLOCK DEVICE ID> - Note the block size you got from the last command
- Have you ensured that the USB device does NOT have any important data on it? Running the specific badblocks command we'll use will destroy data on the drive!
- Fire up a new tmux session
tmux new -s badblocks_<YOUR BLOCK DEVICE ID> - Run the command
badblocks -t random -w -s -b <YOUR BLOCKSIZE GOES HERE> /dev/<YOUR BLOCK DEVICE ID> - Disconnect from the session by pressing
CTRL+bthend - Reconnect to the session to check on it by using
tmux attach-session -t badblocks_<YOUR BLOCK DEVICE ID> - Wait for it to finish
- To kill tmux session pressing
CTRL+bthen:and typekill-session
Last active
October 31, 2024 02:25
-
-
Save ngocleek/7a65b2d13e4fe5d1a95c92ad1399e65e to your computer and use it in GitHub Desktop.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment