martijnvanbrummelen / nwipe

nwipe secure disk eraser
GNU General Public License v2.0
688 stars 79 forks source link

How can i use specified byte to fill the disk? #474

Open cccxg opened 1 year ago

cccxg commented 1 year ago

For example: How can i fills the device with 0x01?

cccxg commented 1 year ago

forget to mention, 0x01 is binary, that is fill the device with 0101010101....

PartialVolume commented 1 year ago

The current version doesn't support creating a custom pattern. It's one of those features I want to add and is pretty easy to implement, it's just not high on the priority list coming after ATA secure erase.

Of course if there was a lot of people pushing for this then those priorities would change.

Is there a particular reason you want a custom pattern?

cccxg commented 1 year ago

OK, thank. Its just required by the project. I'll find another way.

PartialVolume commented 1 year ago

If you are running linux and can build from source, all you need to do to get a 0x01 pattern is change the zero fill method line 144 from char zerofill[1] = { '\x00' }; to char zerofill[1] = { '\x01' };

Selecting zero fill will then give you the pattern you require. I don't think the verify option will work correctly unless you also change the code in the verify function but at least you would be able to write the drive with that pattern. Screenshot_20230718_142945

cccxg commented 1 year ago

Got it. Thank you :)