badblocks in Linux to check/verify if a hard drive/HDD is good or bad

I like badblocks and don't know a better more reliable way of checking the drive. If there are no errors from badblocks and dmesg doesn't produce any SATA related errors, the drive should be good (for now at least).

I also prefer to do read and write mode, yes it takes ages but it is really the best way of doing it.  This gives me the most confidence in knowing that a drive, especially a new one is at least OK at the moment.

To test in read only mode

badblocks -v /dev/sdc

To test in non-destructive read-write mode (to preserve data):

badblocks -nv /dev/sdc
Checking for bad blocks in non-destructive read-write mode

To test in -destructive read-write mode (you will lose all data!)

*Warning again the method below will erase all data!

I used the option "-w" for write mode (only use this on a new drive or one where the data doesn't matter is it will wipe it out).

I alos used "v" for verbose to get a little more info. 

*Warning again the method below will erase all data!

 badblocks -wv /dev/sdc
Checking for bad blocks in read-write mode
From block 0 to 1953514584
Testing with pattern 0xaa:



Tags:

badblocks, linux, verify, hdd, badi, reliable, errors, dmesg, doesn, sata, mode, ok, dev, sdc, destructive, preserve, nv, method, erase, quot, alos, verbose, info, wv, xaa,

Latest Articles

  • Ubuntu Debian Mint Linux SSHD OpenSSH Server Not Starting After Reboot Solution
  • nmap how to scan for all ports and not just the 1000 most common ports
  • Windows 7,8,10 and Server 2008, 2012, 2016, 2019 Read Only Attribute Won't Go Away
  • bind / named how to make a wildcard record and retain defined A records
  • Cisco Unified Communications Manager 12 Install Errors on Proxmox/KVM
  • Local Vs Universally Administered MAC Address NIC Refuses to come up
  • Cisco Unified Communications Manager 12 CUCM 12 - How To Enable Video Calling
  • Windows 7, 8, 10, Windows Server 2008, 2012, 2016, 2019 How To AC97 Audio Drivers and Other Unsigned Drivers
  • Cisco Unified Communications Manager / CUCM IP Telephony Definitions
  • tftp Linux xinetd verbose logging
  • Linux delete unused tap devices automatically
  • Linux qemu-kvm How To Enable Soundcard in Guestl
  • QEMU-KVM Windows and Server Guest Installs Mouse Tracking Pointer Location Solution
  • SSH Keep Alive To stop Disconnections
  • Linux How To Disable SATA NCQ For Better Performance
  • the sign-in method you're trying to use isn't allowed. For more info, contact your network administrator - solution for active directory
  • gsmartcontrol for Windows to Check the SMART S.M.A.R.T status
  • WebRTC Vulnerability Shows Local IP Address Even When Using a Proxy or VPN Firefox Fix And Disable Solution
  • chroot in Linux Howto Simple and Easy Guide
  • qemu-kvm qemu-system Image format was not specified for '/mnt/space/cucm12.img' and probing guessed raw. Automatically detecting the format is dangerous for raw images, write operations on block 0 will be restricted. Specify the 'ra