martijnvanbrummelen / nwipe

nwipe secure disk eraser
GNU General Public License v2.0
799 stars 86 forks source link

Add ability to save progress of drives to a file #329

Open Yetoo1 opened 3 years ago

Yetoo1 commented 3 years ago

For me, there are computers that would be perfect wipe drives, but I don't have access to them 24/7. So I have to use less desirable computers if I need to start wiping at the times I don't have access to the better computers. It would be great if there was the ability to pause/save the current progress of the drives to a file so that the wipe could be resumed on another computer. PartialVolume made a similar suggestion here: https://github.com/martijnvanbrummelen/nwipe/issues/138#issuecomment-650630659 with the difference being writing information about the current wipe to block 0 of the drive being wiped. My problem with that suggestion is that it leaves evidence of the wipe as well as the wipe type on the drive trying to be erased by writing to block 0. While my suggestion also leaves evidence, a single log file is much more manageable than a section on the physical disk being wiped.

Also, if there is pause functionality to then be able save the progress at the then current state, it shouldn't automatically write logs and instead have a separate option that allows writing logs along with an option to unpause (I get that I may be getting into new issue territory, but just want to clarify intentions).

PartialVolume commented 3 years ago

Sounds like a cool feature to add especially if you have very large drives to wipe and like you say, don't have a dedicated computer.

It wouldn't be too difficult to implement for static only methods, but would get more complex for methods that write random data with random data verification enabled. The prng state would also need to be saved and the prng stream restarted from where it stopped otherwise when it came to verification we wouldn't be able reproduce the exact stream and would end up with verification errors.

It's certainly possible, but a fair amount of work. Before I would add this I would want to build into nwipe an automated method integrity check. There are 86 possible combinations of wipe and as this feature would change a considerable amount of code across all methods, having an automated test would save a whole load of development time. Probably 50% of my development time is spent testing so to have a build-in test for all those 86 combinations would free up a lot more of my time for actual coding.

Nice feature though, I can definitely see why it would be useful for some.

m1karii commented 3 years ago

A 'Pause' feature could be added to nwipe. Either a scheduled pause or manual pause or probably both.

When you hit pause information about the current wipe is written to block 0 of each disc. This information would contain the method, verify type, current round, current pass, current block, date and time paused. You could then exit nwipe. Run windows during the day then when you've finished with windows, boot back into nwipe (if you're using nwipe within ShredOS). Nwipe will automatically read block 0 looking for it's signature and wipe information and then ask you if you want to resume the wipe or start from the beginning.

Some people use nwipe before disposing of physically damaged drives for additional security (lets assume these people dont completely physically destroy the drive afterwards). For cases such as these there should be an optional log file that would store all information about the command and the progress of completion in case of failure / interruption of the erasing process or as in your example if the process was paused (presumed the option is available). With physically damaged drives writing such information onto the drive itself ("block 0") would also not be a good idea for obvious reasons.

Originally posted by @m1karii in https://github.com/martijnvanbrummelen/nwipe/issues/138#issuecomment-868501579