[wplug] Zeroing out a swap partition
G.Pitman
gpitman at gmail.com
Thu Jul 21 11:54:11 EDT 2016
Is this useful?
http://security.stackexchange.com/questions/29350/swap-file-may-contain-sensitive-data
On Thu, Jul 21, 2016 at 11:47 AM, Pat Barron <pat at lectroid.com> wrote:
> Can anyone suggest an "easy" way to zero out the contents of a swap
> partition, without affecting the "formatting" of the partition? (On RHEL /
> CentOS / Fedora, if that matters....)
>
> I tried the "obvious" suggestion of "scrub -p zerofill /dev/<partition>",
> and that worked, as far as it went. But then the system no longer
> "recognized" it as a swap partition. So to solve that, I ran "mkswap" on
> the partition, and that too worked - but that changed the UUID of the
> partition, and it no longer matched what was in /etc/fstab, so the system
> didn't activate the swap partition on boot. I fixed that by changing the
> UUID in /etc/fstab, and it all works now - but it's sort of a pain.
>
> Is there a less complicated way to do this, or is this pretty much it?
>
> (The reason I want to do this in the first place is that this is actually
> a VM, and I want to zero out all unallocated / unused space on the virtual
> disk so the VM's hard drive image compresses better, for purposes of
> sending it over the network to someone else....)
>
> Thanks,
> --Pat.
>
> _______________________________________________
> wplug mailing list
> wplug at wplug.org
> http://www.wplug.org/mailman/listinfo/wplug
>
More information about the wplug
mailing list