The following is the GNU All-permissive License as recommended in

Copyright (C) 2024 Free Software Foundation

Copying and distribution of this file, with or without modification, are permitted in any medium without royalty provided the copyright notice and this notice are preserved. This file is offered as-is, without any warranty.

Contributions are welcome. See


-b 4194304 (4 MB) is for ssd. remove it for hdd. Reference:

For a long read / write test (4 r/w passes):

badblocks -svw -b 4194304 /dev/sdX

For a single fast r/w pass of random data:

badblocks -svw -b 4194304 -t random /dev/sdX