Badblocks

Uses your system voice; voice and rate in settings.

Snapshot

≈ 2 min read

Names in other languages

No names in other languages are held for this entry yet.

Article bodies are English and are not machine-translated. A name in another language is not a translation of the article.

badblocks is a Linux utility to check for bad sectors on a disk drive. It can create a text file with a list of these sectors that can be used with other programs, like mkfs, so that they are not used in the future and thus do not cause data corruption. It is part of the e2fsprogs project, and a port is available for BSD operating systems. When run as a standalone program, badblocks gives a list of blocks with problems, if any. This makes it a good option for checking whether the disk drive is healthy, independent of SMART data and file system checks.

badblocks is a Linux utility to check for bad sectors on a disk drive. It can create a text file with a list of these sectors that can be used with other programs, like mkfs, so that they are not used in the future and thus do not cause data corruption. It is part of the e2fsprogs project, and a port is available for BSD operating systems. When run as a standalone program, badblocks gives a list of blocks with problems, if any. This makes it a good option for checking whether the disk drive is healthy, independent of SMART data and file system checks. This would check the sixth partition of the drive "sdb", in destructive read–write mode ( -w = write-mode), which writes 4 different patterns on the whole partition and verifies each by reading back. It displays progress by writing out the block numbers as they are checked ( -s = show, -v = verbose). All data on the partition will be overwritten at the block level. badblocks -wvsb 4096 /dev/sdb This does the same as above, but to the entire drive, with a block size ( -b ) of 4096. This destroys MBRs, partitions and data alike. Modern disk drives will probably not show any defective sectors because they silently remap bad sectors to spare tracks, but running the program with a new drive for several days will test the whole surface, and when reading it afterwards S.M.A.R.T. data will eventually show reallocated sectors. Using the -w option on a device containing an existing file system erases the data on that device.

Text derived from https://en.wikipedia.org/w/index.php?oldid=1364656364 under CC BY-SA 4.0; modifications have been made.