Badblocksbadblocks 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,[1] and a port is available for BSD operating systems.[2] 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.[3] e2fsck's "-c" optionA more common use case is the invocation of badblocks as part of e2fsck when passing the option dumpe2fsRunning Examplesbadblocks -nvs /dev/sdb This would check the drive "sdb" in non-destructive read–write mode and display progress by writing out the block numbers as they are checked. badblocks -wvs /dev/sdb6 This would check the sixth partition of the drive "sdb", in destructive read–write mode ( badblocks -wvsb 4096 /dev/sdb This does the same as above, but to the entire drive, with a block size ( Using the References
External links
|