Skip to content

Instantly share code, notes, and snippets.

@jkeam
Created April 3, 2026 17:05
Show Gist options
  • Select an option

  • Save jkeam/70232787ce103437d1308aa4d9a4e300 to your computer and use it in GitHub Desktop.

Select an option

Save jkeam/70232787ce103437d1308aa4d9a4e300 to your computer and use it in GitHub Desktop.
Wipe Disk
#!/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
@jkeam
Copy link
Copy Markdown
Author

jkeam commented Apr 3, 2026

Listing block devices with cool flags:

lsblk -d -o +ROTA,MODEL,VENDOR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment