Commit Graph

544 Commits

Author SHA1 Message Date
PartialVolume
a84894f317 Update CHANGELOG.md with version 0.31 changes
Update CHANGELOG.md with version 0.31 changes
2021-06-05 00:17:41 +01:00
PartialVolume
5c3eed8813 Merge pull request #326 from PartialVolume/Enable_verification_on_zero_pass_without_additional_blanking_pass
Allow Last Pass Verify to work without requiring final blanking (zero) pass.
2021-06-04 10:36:35 +01:00
PartialVolume
4b1c7007ff Various fixes to methods
1. Allows zero fill to be verified when blanking off.
Prior to this if you wanted to verify a zero pass,
blanking had to be on. This meant a zero pass, then a
blanking pass then a verify, effectively two zero passes
and a verify. This is now fixed so you can now do a zero
pass with verification without a blanking pass. This knocks
a third off the wipe time of a zero fill with verification.

This also means all other methods can have either all their
passes or just the last pass verified without blanking being
enabled.

2. OPS2 method requires the last pass to be random, the GUI
now disables the use of the blanking option for this message
and displays a warning message that a final blanking pass is
not allowed for OPS2. It never did a final blanking pass
anyway, even if it was selected, but this makes it clearer in
the GUI.

3. The caculate_round_size() function was improved by reducing
some duplicated code and bring the full calculation into this function.

4. On completion of each pass or verification the total number of
bytes written or read for each pass or verification is logged.
2021-06-04 10:20:23 +01:00
PartialVolume
970d74f0d5 Bump minor version number from 009 to 010 2021-06-01 02:36:51 +01:00
PartialVolume
c815235f7b Merge pull request #325 from PartialVolume/Add_count_of_fatal_non-fatal_and_verification_errors_to_summary_table
Add pass and verification summary table to log
2021-06-01 02:30:50 +01:00
PartialVolume
dcfa13a8db Add pass and verification summary table to log 2021-06-01 02:21:00 +01:00
PartialVolume
a1560de8b5 Merge pull request #324 from PartialVolume/Fixes_verify_status_message_not_shown_on_blanking_pass
Fix blanking pass verification status message
2021-05-31 23:44:41 +01:00
PartialVolume
18386f225e Fix blanking pass verification status message
Although the blanking pass verification is
completed correctly the GUI status message
did not show the status as 'Verifying', the
status message continued to say blanking.

This patch fixes the GUI message so if
verification and blanking pass are enabled,
then when blanking is complete and verification
starts the drive status message changes from
'blanking' to 'Verifying'.
2021-05-31 23:41:19 +01:00
PartialVolume
1f3b36f141 Merge pull request #323 from PartialVolume/Fix_mersenne_prng_always_being_used_even_when_user_selected_isaac
Fix the prng GUI selection
2021-05-30 23:09:01 +01:00
PartialVolume
962e1053dd Fix the prng GUI selection
This patch fixes the issue where irrespective
of whether the user selects mersenne or isaac
in the GUI, mersenne is always used without the
user being aware mersenne was being used instead
of isaac.
2021-05-30 23:05:47 +01:00
PartialVolume
93ea5f85d0 Merge pull request #322 from PartialVolume/populate_the_empty_isaac_read_function_with_some_actual_code
Fix non functional isaac prng
2021-05-30 22:34:36 +01:00
PartialVolume
76a7be696c Fix non functional isaac prng
Since at least 2013 (the initial nwipe commit),
isaac has never functioned. When the issac prng
was selected in the GUI, nwipe used the mersenne
twister prng instead. Not that you would ever
have known, as there were no log entries saying which
prng was being actively used.

However, I don't believe this was just an nwipe
issue, looking at the code for DBAN's dwipe the
same function nwipe_isaac_read( NWIPE_PRNG_READ_SIGNATURE )
exists as it does in nwipe. In both cases the function
has no code that actually does anything.

This patch populates this function and brings isaac
back to life !

This bug was also responsible for verification errors
when the option prng=isaac was used on the command
line. Worse still, if you used prng=isaac on the
command line then wiped using method=prng, no verification
and no blanking you would expect to see random data. You
don't, instead you would see either all zeros or mainly
zeros because the uninitialised buffer that should have
contained random data instead contained initialised text
data such as partial log entries. This patch and previously
submitted patches fix all these problems related to the
isaac implementation.

A separate commit will fix the GUI prng selection which
was leading everybody to believe isaac was being used
when in fact it was mersenne all along.
2021-05-30 22:30:31 +01:00
PartialVolume
630d107558 Merge pull request #321 from PartialVolume/check_prng_is_generating_data
Check that the prng produces output.
2021-05-29 21:31:47 +01:00
PartialVolume
5adc34b9e3 Check that the prng produces output.
Additional log messages are produced and a failed prng
causes a wipe failure. The buffer that outputs prng data
to the disk is now initialised with zeros (calloc rather than malloc)
to avoid uninitialised memory leakage to the disk in the event of some
unforeseen bug. This initialised buffer is also required for the check
process.

Why do this check? At a future date more prng methods may be added. This
is a very basic check that they produce some output although the output
is not verified in terms of it's randomness. This check was also
implemented to show an existing bug in the Isaac implementation in nwipe.

See the example log below that shows a failed prng. This would be caused
by a bug in the prng implementation. See the last few messages after
pass 3/3 starts. 3/3 in DoD short is the prng pass.

[2021/05/29 20:30:27]  notice: Invoking method 'DoD Short' on /dev/loop29
[2021/05/29 20:30:27]  notice: Starting round 1 of 1 on /dev/loop29
[2021/05/29 20:30:27]  notice: Starting pass 1/3, round 1/1, on /dev/loop29
[2021/05/29 20:30:39]  notice: 1073741824 bytes written to /dev/loop29
[2021/05/29 20:30:39]  notice: Finished pass 1/3, round 1/1, on /dev/loop29
[2021/05/29 20:30:39]  notice: Starting pass 2/3, round 1/1, on /dev/loop29
[2021/05/29 20:30:58]  notice: 1073741824 bytes written to /dev/loop29
[2021/05/29 20:30:58]  notice: Finished pass 2/3, round 1/1, on /dev/loop29
[2021/05/29 20:30:58]  notice: Starting pass 3/3, round 1/1, on /dev/loop29
[2021/05/29 20:30:58]  notice: Initialising Isaac prng
[2021/05/29 20:30:58]   fatal: ERROR, prng wrote nothing to the buffer
[2021/05/29 20:30:58]  notice: 0 bytes written to /dev/loop29
[2021/05/29 20:31:03]   error: Nwipe exited with fatal errors on device = /dev/loop29

********************************************************************************
! Device | Status | Thru-put | HH:MM:SS | Model/Serial Number
--------------------------------------------------------------------------------
! loop29 |-FAILED-|  69 MB/s | 00:00:31 | Loopback device/
--------------------------------------------------------------------------------
[2021/05/29 20:31:03] Total Throughput  69 MB/s, DoD Short, 1R+NB+NV
********************************************************************************

A message is also shown for a successful prng output. i.e "prng is active"
See example below.

[2021/05/29 20:04:30]  notice: Invoking method 'DoD Short' on /dev/loop29
[2021/05/29 20:04:30]  notice: Starting round 1 of 1 on /dev/loop29
[2021/05/29 20:04:30]  notice: Starting pass 1/3, round 1/1, on /dev/loop29
[2021/05/29 20:04:44]  notice: 1073741824 bytes written to /dev/loop29
[2021/05/29 20:04:44]  notice: Finished pass 1/3, round 1/1, on /dev/loop29
[2021/05/29 20:04:44]  notice: Starting pass 2/3, round 1/1, on /dev/loop29
[2021/05/29 20:04:59]  notice: 1073741824 bytes written to /dev/loop29
[2021/05/29 20:04:59]  notice: Finished pass 2/3, round 1/1, on /dev/loop29
[2021/05/29 20:04:59]  notice: Starting pass 3/3, round 1/1, on /dev/loop29
[2021/05/29 20:04:59]  notice: Initialising Mersenne Twister prng
[2021/05/29 20:04:59]  notice: prng stream is active
[2021/05/29 20:05:25]  notice: 1073741824 bytes written to /dev/loop29
2021-05-29 21:23:38 +01:00
PartialVolume
5bc61f2bdd Merge pull request #320 from PartialVolume/Log_intialisation_of_prng_method
Logs the specific prng that is initialised.
2021-05-28 19:54:49 +01:00
PartialVolume
b55b020a83 Log the initialisation of the prng type
Logs the specific prng that is initialised.
2021-05-28 19:45:19 +01:00
PartialVolume
b34c99b81b Bump banner & version minor version 2021-05-27 14:23:34 +01:00
PartialVolume
63d20dc4be Merge pull request #319 from PartialVolume/Add_details_of_wipe_to_log
log the nwipe options that the wipe/s is going to use.
2021-05-27 14:16:14 +01:00
PartialVolume
2111206fa3 Add nwipe options that have been selected.
The log now contains wipe configuration detail
such as method, prng, blanking, sync, rounds etc.
2021-05-27 14:06:57 +01:00
PartialVolume
5263a23cd6 Merge pull request #317 from PartialVolume/Fix_contradictory_log_messaging
Fixes contradictory log messages.
2021-05-27 08:18:29 +01:00
PartialVolume
a6b60bfd15 Fixes contradictory log messages.
1. The log reported verification errors while also
showing an entry in the log that said "[SUCCESS] Blanked /dev/...".
The blanked device message now shows [FAILURE] /dev/... may not be blanked"
if any verification errors are detected for a specific drive.

2. If a verification error occurred, the error would be correctly
shown in the GUI and in the logs but the summary table drive status
would show 'ERASED' not 'FAILED'. Now corrected so that the tables
drive status field shows 'FAILED' if any verification error is detected.
Prior to this it was marking the status as 'FAILED' only if the O.S
detected write errors. In practise most drive errors are detected
by the write I/O process on syncing but this will now detect errors not
recognised by the O.S. and found by the verification process. Despite
this the textual log and GUI correcty reported verification errors.

3. The final log message "Nwipe exited successfully" was checking for
fatal errors but ignoring non fatal errors despite being reported in
the log.

The final message now reads
either "Nwipe Exited Succesfully" if no fatal and non fatal errors were
detected. Alternatively it displays ...
"Nwipe exited with errors, check the log & summary table for individual drive status."
if any fatal OR non fatal errors are detected.
2021-05-27 08:07:20 +01:00
PartialVolume
d8d627dce3 Merge pull request #315 from PartialVolume/Fix_shutdown
Fix shutdown on buildroot based distros such as shredos 2020, while maintaining compatibility with Ubuntu/Debian etc.
2021-04-19 15:34:21 +01:00
PartialVolume
95d0b3f382 Fix shutdown on buildroot based distros
The shutdown command that nwipe currently uses is
"shutdown -P +1 "Broadcast shutdown message".
While the above command works works fine on Ubuntu 18.04 LTS it
does not work on the version of shutdown used in buildroot, failing
with the error:
"shutdown -H and -P flags can only be used along with -h flag"

Luckily there is a shutdown command with options that work correctly
on both buildroot (ShredOS) and Ubuntu 18.04 LTS, this is
shutdown -Ph +1 "Broadcast shutdown message". i.e. the option -h has been added.
2021-04-19 15:22:43 +01:00
PartialVolume
055d2e8b0c Bump minor revision 2021-03-17 21:28:29 +00:00
PartialVolume
9f0674b3b9 Merge pull request #314 from andrewvaughanj/code_formatting
Run 'make format'
2021-03-17 21:27:03 +00:00
PartialVolume
5f332a407d Merge pull request #313 from andrewvaughanj/fix_global_wipe_status
Correcting multiple definition of 'global_wipe_status'
2021-03-17 21:26:28 +00:00
Andrew V. Jones
543a880064 Run 'make format'
Signed-off-by: Andrew V. Jones <andrewvaughanj@gmail.com>
2021-03-17 17:41:32 +00:00
Andrew V. Jones
62c604bc0e Correcting multiple definition of 'global_wipe_status'
Signed-off-by: Andrew V. Jones <andrewvaughanj@gmail.com>
2021-03-17 16:07:37 +00:00
PartialVolume
2bc62a7217 Update README.md with link to gparted live 2021-02-17 21:16:55 +00:00
PartialVolume
7f5bc5aa34 Merge pull request #301 from ndowens/master
bits/sigthread.h is a glibc only and is not needed
2021-02-05 17:07:29 +00:00
PartialVolume
7fa5c98023 Merge pull request #312 from PartialVolume/fix_footer_corruption_on_resize_and_method_rounds_blanking_selection
Fixes footer bar corruption to the right of the message
2021-02-04 21:51:26 +00:00
PartialVolume
4e159a902c Merge branch 'master' into fix_footer_corruption_on_resize_and_method_rounds_blanking_selection 2021-02-04 21:50:06 +00:00
PartialVolume
3090b0682f Fixes footer bar corruption to the right of the message
This bug only occurs when you resize the terminal while
on the drive selection screen, then switch to method, rounds
or blanking. To the right of the message the text background
is now blue and not white and random box characters appear.

To me it seems to be a bug not in nwipe but in curses, however
placing double quotes around the message fixes the problem. I
also found that the contents of the message appeared to trigger
the problem, possibly the '=' symbol, however the fact that
the main selection text does not require the quotes is most odd.
Still, this simple fix seems to get rid of the problem.
2021-02-04 21:40:26 +00:00
PartialVolume
d2dff52407 Merge pull request #310 from Firminator/patch-1
Update gui.c - Add CTRL+A
2021-02-01 11:43:46 +00:00
PartialVolume
58a5184c88 Removed CTRL+A=SelectALL from help as it makes the help text greater than 80 characters required for system working with frame buffer displays using 80x25. I have a plan to make the help line responsive or multipage to overcome this limitation so more commands can be added. Secondly, one line needed to be formatted to pass CI format check. 2021-02-01 11:40:52 +00:00
PartialVolume
6dcaaa6920 Update README.md with make format
If submitting pull requests, you must `make format` prior to commiting code and submitting a pull request otherwise you pull request will fail the CI that checks formatting.
2021-01-31 00:17:35 +00:00
PartialVolume
8e9e2ae90f Update README.md with make format
If submitting pull requests, you must `make format` prior to commiting code and submitting a pull request otherwise you pull request will fail the CI that checks formatting.
2021-01-31 00:15:58 +00:00
PartialVolume
02e356e0ec Merge pull request #311 from PartialVolume/fix_uaborted_message_in_summary_table
Fixes to summary table & fix final status message Fixes #308
2021-01-30 19:17:15 +00:00
PartialVolume
12063ad954 Fixes to summary table & fix final status message
1. Prior to this fix, if a user aborted a multi drive using control-C,
and if some of the drives had completed their wipe either
successfully or with a I/O failures, the summary log would say
UABORTED for all drives. UABORTED is acceptable status for drives that
hadn't completed their wipe but for drives that had completed the wipe,
the summary table should have gave either a ERASED or FAILED status
message. This fix corrects the summary status when using control-c to
abort a multi drive wipe where some drives have completed and some have
not.

2. If I wipe was selected but not started and then the user used
control-C to abort nwipe, the summary table would possibly
intermittently be displayed showing the last drive wiped. The correct
behaviour is that no summary table is displayed if the wipe hasn't been
started yet. This fix corrects the behaviour of the summary table when
control-c is used and a drive has been selected for wiping but not
started, in this scenario the summary table is NOT displayed.

3. When nwipe exits it always prints the message "nwipe successfully
exited". To make this single line message more informative it now
reports a different message depending upon the wipe status.

These four messages are:

"Nwipe was aborted by the user. Check the summary table for the drive
status" -  When the user aborts during a wipe.

"Nwipe was aborted by the user prior to the wipe starting."

"Nwipe exited with fatal errors, check the summary table for individual
drive status." - When one or more drives failed.

"Nwipe successfully completed. See summary table for details." - When
selected drives were all erased without error.
2021-01-30 19:08:05 +00:00
Firminator
66d239c980 Update gui.c - Add CTRL+A
... and reduce confusion about lowercase and uppercase option. All options are now defaulting to show as lowercase in the GUI except Start which can only be invoked with SHIFT S to prevent accidental start of wipe. Unless someone enjoys pressing additionally SHIFT for B and R and V and all the other options I'd propose it might be time to remove unneeded code for this :)
2021-01-30 13:37:48 -05:00
PartialVolume
462777d92b Merge pull request #309 from Firminator/patch-1
Corrected --nousb
2021-01-30 09:14:50 +00:00
Firminator
69c9d7d6c5 Corrected --nousb
emphasized that no[gui,blank,wait,signals,usb] will ignore things
2021-01-29 21:13:37 -05:00
PartialVolume
fffee8bb34 Update README.md
Updated link to buildnwipe script
2021-01-08 23:35:07 +00:00
PartialVolume
b8a536a02f Merge pull request #303 from NoNameForMee/master
Correct one external link in README.md
2021-01-08 23:13:33 +00:00
NoNameForMee
0c542660ff Correct one external link in README.md
To official website of SystemRescue (also known as SystemRescueCd).
2021-01-08 20:35:45 +01:00
PartialVolume
412917ab17 Update README.md
Add link to repology with reference to nwipe. Information on which version of Nwipe is in which distro version.
2021-01-07 21:01:14 +00:00
Nathan Owens
f5501ccc45 bits/sigthread.h is a glibc only and is not needed 2020-12-21 12:23:53 -06:00
PartialVolume
d819330583 bump minor banner revision 2020-12-19 18:32:39 +00:00
PartialVolume
2061346ace Merge pull request #300 from andreasheil/update-man-and-help
Update man and help
2020-12-19 18:30:51 +00:00
Andreas Heil
69fed30dde fix typo and reformat 2020-12-18 10:14:06 +01:00