Many tutorials suggest zero-filling a drive to fully erase it for further use, but I have never seen anyone suggest one-filling a drive for any reason. Is this an arbitrary convention, or is there a reason why zero-filling is better than one-filling?
Is one harder on the device physically than the other? Other than security (for which I understand a random fill is better), are there any other possible considerations?
Answer
Is one harder on the device physically than the other?
Nowadays many drives internally encrypt data, so all zeros (or all ones) are stored internally as "mixed" values anyway. Therefore it shouldn't matter.
are there any other possible considerations?
I'm a Linux user. From my point of view zeros are extremely easy to get because there is /dev/zero
in the OS. Getting all ones is not that easy. It's the only reason to prefer zeros I can think of. And since the easiest way to fill a drive with anything is to use dd
, cat
or cp
(rather than writing your own program), filling with zeros from /dev/zero
seems natural.
Zero-filling is easy:
cp /dev/zero /dev/sdX
while one-filling requires some additional work:
/dev/sdX
Note the latter can be used to fill the device with any fixed byte value. In this sense all ones are as "hard" to get as any other byte except all zeros.
No comments:
Post a Comment