I want to make zero all bits of a partition where an ext4 filesystem structure existed (superblocks, metadata, journal, etc), not just the filesystem signature deleted by
I can quickly zero out files content using
shred utility, but not the metadata.
On block devices supporting
TRIM/DISCARD, this is easy as I can quickly run
blkdiscard on the entire partition.
However on large rotational HDDs where
TRIM/DISCARD is not available, making all bits zero either becomes a large time consuming process or implies destroying/regenerating the disk encryption key (on self encrypting drives) which implies losing entire drive, not just the ext4 partition.
Other than reading
mke2fs code and creating an imaginary
wipe2fs tool based on it, is there already another way to quickly wipe all ext4 superblocks/metadata?