This is Gentoo's testing wiki. It is a non-operational environment and its textual content is outdated.
Please visit our production wiki at https://wiki.gentoo.org
E2fsprogs/badblocks
From Gentoo Wiki (test)
Jump to:navigation
Jump to:search
badblocks is a small program for stress testing block devices. Similar to memtest86+, badblocks reads and writes small patterns of bytes to block devices.
Installation
Emerge
badblocks comes as part of the sys-fs/e2fsprogs package and should be available as part of the default system profile.
Usage
Invocation
user $
badblocks
Test a drive
To test a drive with visual progress use the -s
and -w
options followed by the path to the block device.
Warning
All data on the device will be completely overwritten and destroyed; be sure to create backups as needed to preserve data that should be saved!
All data on the device will be completely overwritten and destroyed; be sure to create backups as needed to preserve data that should be saved!
root #
badblocks -s -w /dev/<device>
Replace <device>
in the command above with the block device that is to be tested. badblocks should run through a series of four tests and return output similar to the following:
Testing with pattern 0xaa: done
Reading and comparing: done
Testing with pattern 0x55: done
Reading and comparing: done
Testing with pattern 0xff: done
Reading and comparing: done
Testing with pattern 0x00: done
Reading and comparing: done
See also
- memtest86+ - A memory (RAM) tester based on the original memtest86 program.