Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Combine badblocks with cryptsetup? #23

Open
ypid opened this issue Dec 22, 2021 · 2 comments
Open

Combine badblocks with cryptsetup? #23

ypid opened this issue Dec 22, 2021 · 2 comments

Comments

@ypid
Copy link

ypid commented Dec 22, 2021

Pro:

  • The drive might "compress" the pattern that is written to it. So combining with cryptsetup ensures that the drive actually stored every single bit correctly and did not just compress it.
  • As preparation to encrypt the drive, it is recommended to overwrite with cryptographically secure random numbers before which will be done while testing the drive. Win-win.

Contra:

  • A bit higher CPU usage. But with AES-NI, this should be acceptable.

I have been doing this for years without issues btw, ref: https://github.com/ypid/scripts/blob/master/badblocks_and_secure_erase and https://github.com/ypid/scripts/blob/master/full_disk_test

@DonkeeeyKong
Copy link

This sounds interesting. It' s unfortunately probably out of scope for this script though since it is cross-platform and supports not only Linux but also FreeBSD.

@ypid ypid changed the title Combine with badblocks with cryptsetup? Combine badblocks with cryptsetup? Aug 3, 2024
@ypid
Copy link
Author

ypid commented Aug 3, 2024

The script can check if cryptsetup is installed and only do this when it is installed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants