Created
April 3, 2026 17:05
-
-
Save jkeam/70232787ce103437d1308aa4d9a4e300 to your computer and use it in GitHub Desktop.
Wipe Disk
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # check | |
| blkid /dev/<disk> | |
| wipefs -n /dev/<disk> | |
| # wipe | |
| wipefs -a /dev/<disk> | |
| sgdisk --zap-all /dev/<disk> | |
| dd if=/dev/zero of=/dev/<disk> bs=1M count=100 oflag=direct,dsync | |
| # references | |
| # https://access.redhat.com/solutions/7130476 |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Listing block devices with cool flags: