Commit Graph

910 Commits

Author SHA1 Message Date
PartialVolume
79cedf47fc Added max, min drive temperatures to log
Added the max and min drive temperatures to the nwipe
log. We now have upto six temperatures that may be reported
for each drive. Whether all these fields are populated is
down to each drive manufacturer.
2023-03-14 23:53:21 +00:00
PartialVolume
08cba2ee5e Merge pull request #454 from PartialVolume/Fix_anomaly_when_temperature_changes_color
Fix anomaly with color change of temperature
2023-03-14 22:30:19 +00:00
PartialVolume
4368092d11 Fix anomaly with color change of temperature
Temperature text now changes red when it's exceeded
the high critical temperature and black when it's dropped below the low
critical temperature. See nwipes log for what those values actually are
as those critical temperature values are obtained from each drive.

When the drive temperature is within the drives specification the temperature
text will be white text on blue background.

The temperature text no longer flashes red or black.
2023-03-14 22:27:34 +00:00
PartialVolume
ac96c51120 Merge pull request #453 from PartialVolume/add_temperature_limits_to_log_info
Add temperature limits to nwipe log
2023-03-14 20:42:37 +00:00
PartialVolume
c4490a89d1 Add temperature limits to nwipe log
1. For each drive we now show the following temperature
limits that are obtained directly from the drive. These are
shown in the log under the INFO category. For a given drive
all it's limits are shown on a single line near the start of
the log.

Example:
Temperature limits for /dev/nvme0n1, critical=84c, highest=N/A, lowest=N/A, low critical=N/A.

High critical
Highest
Lowest
Low critical

Whether all these values contain data various between
manufacturer, for instance the Seagate SN570 only shows
the high critical value of 84 deg.C

2. Changed some wording in the GUI for a on screen
message to do with HPA/DCO.
2023-03-14 20:11:00 +00:00
PartialVolume
87d25cf752 Merge pull request #452 from PartialVolume/PDFGen17
PDFGen17 - further work on PDF certificate
2023-03-12 18:15:39 +00:00
PartialVolume
c3cd5011a2 PDFGen17 - further work on PDF certificate
1. I wasn't keen on my first attempt at the exclamation
icon so I redesigned it.I think this one looks better.
2023-03-12 16:34:43 +00:00
PartialVolume
1b3d03faad Merge pull request #451 from PartialVolume/PDFGen16
PDFGen16 - further work on PDF certificate
2023-03-11 22:45:31 +00:00
PartialVolume
f258872c67 PDFGen16 - further work on PDF certificate
1. Added a new icon, a yellow exclamation in a red circle
with the words "erased with a warning" inside the circle.
This is used instead of the green tick icon or red cross icon
when a disk is successfully erase as requested but the user
chose not to expose the hidden sectors by removing the HPA and/or
restoring the drive configuration overlay (DCO).

2. Expanded the size of the "Disk Erasure Details" section on
the certificate by 20 points to provide better spacing for warnings

3. Removed remapped sectors label, as that information already
appears on page 2 in the smart data.

4. Improvements to the logic in regards to text colour changes.

5. Added a additional red warning message in the information section
when the exposed sectors of the disc are erased but the hidden sectors
are not.

6. Added the original images in .xcf (gimp) and jpg formats that are
used to generate the embedded .c and .h files using bin2c.
2023-03-11 22:24:34 +00:00
PartialVolume
d231c863f7 Merge pull request #450 from PartialVolume/PDFGen15
PDFGen15 - further work on PDF certificate
2023-03-10 23:41:45 +00:00
PartialVolume
b35400b22a PDFGen15 - further work on PDF certificate
1. Added page 2 of the report which includes all
smart data as displayed by smartctl -a /dev/sdx

2. Did some more work on the logic, i.e. when certain
data on the certificate should be green and when it should be
red.

3. Made some changes to nwipe's log in regards to the way
it displays disc info right at the beginning of the log.
Separated the drive information by a blank line to make
each drive stand out from the rest.

4. Moved a string function from device.c to miscellaneous.c

more code to follow ..
2023-03-10 23:33:46 +00:00
PartialVolume
c52dfa3d8f Merge pull request #449 from PartialVolume/HPA_DCO_006
HPA_DCO_006 - Add HPA/DCO capability
2023-03-10 00:52:14 +00:00
PartialVolume
e6a9944a7a HPA_DCO_006 - Add HPA/DCO capability
1. If nwipe enumerates a USB bridge that does not support
ATA pass through or you are wiping a USB memory stick,
nwipe will show a message in the GUI that says
"HPA/DCO hidden area indeterminate". If you get this message
you know to either get yourself a better quality USB to SATA
adapter or in the case of a USB memory stick, i've never
come across one that supports HPA/DCO so either don't worry
about it and wipe it as normal or physically destroy it.

2.We now check for a nonsense "real max sectors" as produced
by the bug in hdparm. We use our own low level function to
issue a DCO identify command and retrieve the correct value.

3. Changed the dmidecode info at the start of the log from
a 'notice' classification to 'info'.

4. Made changes to the nwipe_log function so that any messages
logged that are classified as 'debug' will not be logged unless
the --verbose flag has been set on the command line options. I
send the hex data structures and hex sense data to the logs as debug
information and as they can take up a lot of space and make the
log look untidy they will only appear in --verbose mode.

5. I also extended the nwipe's log message length from 512 to 1024
as some of the sense data was being truncated in the log.
2023-03-10 00:28:31 +00:00
PartialVolume
9c0dd6a25a Merge pull request #448 from PartialVolume/HPA_DCO_005
HPA_DCO_005 - Add HPA/DCO capability
2023-03-08 23:37:46 +00:00
PartialVolume
67ca3b260d HPA_DCO_005 - Add HPA/DCO capability
1. Created the function nwipe_read_dco_real_max_sectors()
which directly accesses the disk drive sending a 0xB1
device configuration overlay identify command to the drive.
We read the returned data structure extracting the real max
sectors value. We do this if hdparm returns nonsense for the
real max sector (as it does in hdparm v9.60) for some larger
drives. This value is automatically sent to the nwipe log FYI.

2. Added a stdout & stderr pipe to the hdparm commands as verbose
data appears to be sent to stderr, as we are interested in that
data this pipe captures stderr as well as stdout.

3. Added headers "scsi/sg.h" and "scsi/scsi_ioctl.h" as we
are now sending low level commands to the drives.
2023-03-08 23:30:14 +00:00
PartialVolume
c97d1c9166 Merge pull request #447 from PartialVolume/HPA_DCO_004
HPA_DCO_004 - Add HPA/DCO Capability
2023-03-08 00:34:53 +00:00
PartialVolume
4b6399a93f HPA_DCO_004 - Add HPA/DCO Capability
1. In the GUI I switched the HPA/DCO status position
from overlaying the [drive size][temp] and instead
positioning the HPA/DCO status over the drive model
and serial number. HPA/DCO information and drive details
alternating every couple of seconds. This allowed me to
extend the length of the HPA message and make it more
meaningful to somebody that doesn't know the HPA/DCO
terminology. Therefore "HPA Enabled" is replaced with
"HPA/DCO Warning, hidden area detected"

2. Started adding bad/missing sense data detection ..

more code to follow ..
2023-03-08 00:20:22 +00:00
PartialVolume
518b8b536a Merge pull request #446 from PartialVolume/PDFGen14
PDFGen14 - further work on PDF certificate
2023-03-05 23:48:26 +00:00
PartialVolume
b79eea6c9f PDFGen14 - further work on PDF certificate
1. Changes to colour on some items under certain
conditions.

2. Changed the HPA labels to include DCO, and changed
the text from HPA enabled/disabled to something more
meaningful to a user, i.e Hidden area found, no hidden
area.

3. Added a new define "HPA_NOT_SUPPORTED_BY_DRIVE" for
recent SATA drives that no longer support HPA/DCO.
Further work needs to be done determining whether a drive
supports HPA/DCO or not in the hpa_dco.c functions.

more code to follow ..
2023-03-05 23:24:49 +00:00
PartialVolume
88cec08854 Merge pull request #445 from PartialVolume/PDFGen13
PDFGen13 - further work on PDF certificate
2023-03-05 00:49:34 +00:00
PartialVolume
dc6d76176a PDFGen13 - further work on PDF certificate
1. Reduced font size for data info.
2. Used a define for text point size to make it easier
to change size.
3. Started work on function to parse sense data for older
versions of hdparm (9.60) that fail to parse the real max
sectors correctly. (fixed in 9.65).
4. Miscellaneous changes.

More changes to follow ..
2023-03-05 00:42:37 +00:00
PartialVolume
3eb5a43a32 Merge pull request #443 from PartialVolume/HPA_DCO_003
HPA_DCO_003 - Add HPA,DCO capability
2023-02-28 23:55:46 +00:00
PartialVolume
8abab96a3e HPA_DCO_003 - Add HPA,DCO capability
1. For devices that support HPA/DCO (not NVMe) nwipe
displays the HPA status, it toggles every two seconds
the size and the temperature i.e "[  1TB][ 35C]" with
the HPA status such as [HPA disabled], [HPA ENABLED!],
[HPA unknown]. The HPA ENABLED is highlighted with red
text and a white background. HPA_disabled is standard
white text on blue background.

More code to follow, a new option to be added, HPA, disable/enable
which will disable the HPA and shut down the system. On manually
powering back up the HPA should be reported as disabled.

Then lots of testing.
2023-02-28 23:48:17 +00:00
PartialVolume
7ccb68675b Merge pull request #442 from PartialVolume/HPA_DCO_002
HPA_DCO_002 - Add HPA, DCO capability
2023-02-28 00:10:26 +00:00
PartialVolume
c7d17df7f8 HPA_DCO_002 - Add HPA, DCO capability
1. Further work was completed, putting the HPA status and HPA size into
the report/certificate.

2. Moved some general functions that may be used throughout nwipe
into miscellaneous.c These tend to be string processing functions.

3. Tested certificate HPA status. There are three possible states of the HPA
i. Enabled and HPA size is displayed on the certificate
ii. Disabled, the drive reports it's real size to the O.S.
iii. Unknown. Nwipe could not determine whether there is a HPA or not.
This may be caused by the use of a USB adapter or could be a bad drive,
or finally a change in hdparms format when displaying HPA information.

More code to follow, next on the list is to add the HPA status into the
drive selection screen in the GUI, so when you select the drive you can see
the status of HPA and choose to disable it.
2023-02-28 00:02:01 +00:00
PartialVolume
ea9d76132e Merge pull request #441 from PartialVolume/HPA_DCO_001
HPA_DCO_001 - Add HPA, DCO capability
2023-02-26 23:23:22 +00:00
PartialVolume
bba050fa71 HPA_DCO_1 - Add HPA, DCO capability
1. nwipe now reads the HPA set and real number of
sectors and the DSO real max sectors. It determines
from these values whether the HPA is enabled, disabled
or in a unknown state. The values are logged to nwipes
log and flags are set in the drives context.

More code will follow that adds this information to the PDF
certificate and to the drive selection window in the GUI.
2023-02-26 22:59:33 +00:00
PartialVolume
00e2053ab4 Merge pull request #440 from PartialVolume/HPA_DCO
HPA_DCO_1 - Add HPA, DCO capability
2023-02-23 22:52:38 +00:00
PartialVolume
ef84c65846 HPA_DCO_1 - Add HPA, DCO capability
1. debugging.
2023-02-23 22:30:18 +00:00
PartialVolume
09af2bc5a6 HPA_DCO_1 - Add HPA, DCO capability
1. More debugging.
2023-02-23 21:44:08 +00:00
PartialVolume
2747ab5d4f HPA_DCO_1 - Add HPA, DCO capability
1. More corrections to hdparm command
2023-02-23 21:22:21 +00:00
PartialVolume
a2d6735b89 HPA_DCO_1 - Add HPA, DCO capability
1. Corrections to hdparm command.
2023-02-23 21:14:48 +00:00
PartialVolume
e4ecd6a68e HPA_DCO_1 - Add HPA, DCO capability
1. Initial commit
2023-02-23 20:46:19 +00:00
PartialVolume
6f7ca938f4 Merge pull request #439 from PartialVolume/PDFGen12
PDFGen12 - further work on PDF certificate
2023-02-23 12:50:18 +00:00
PartialVolume
ecfc252015 PDFGen12 - further work on PDF certificate
1. Add information regarding how many pass, sync
and verify errors, if any.
2023-02-23 12:31:41 +00:00
PartialVolume
40f1e31225 Merge pull request #438 from PartialVolume/PDFGen11
PDFGen11 - further work on PDF certificate
2023-02-22 16:28:42 +00:00
PartialVolume
3b952d3f92 PDFGen11 - further work on PDF certificate
1. Fix a bug in the static and random pass code
where I unnecessarily moved the decrement of z (the
count of bytes remaining) to after the periodic sync
which meant every time it sync'ed z wasn't decremented due
to r being used as a general results variable for the
fdatasync function.

I prefer to just have a variable be responsible for just
one thing hence my assumption r wasn't used for two different
things.

Changed the position of the decrement of z, pass_done and
round_done to their original position prior to the periodic
sync.
2023-02-22 11:56:22 +00:00
PartialVolume
09e41d573f Merge pull request #437 from PartialVolume/PDFGen10
PDFGen10 - further work on PDF certificate
2023-02-22 00:31:51 +00:00
PartialVolume
8b827f9ea0 PDFGen10 - further work on PDF certificate
1. Fix rounds reported on abort or fail.
2023-02-22 00:06:28 +00:00
PartialVolume
c57e04005e PDFGen10 - further work on PDF certificate
1. remove some unnecessary code related to bytes_erased.
2023-02-21 23:39:22 +00:00
PartialVolume
04c409a665 PDFGen10 - further work on PDF certificate
1. Fix percentage for bytes erased on certificate.
2023-02-21 22:59:09 +00:00
PartialVolume
c5f9c1d6e9 PDFGen10 - further work on PDF certificate
1. Added the red cross icon located on the top right of
the certificate. This is displayed when the wipe is aborted
or failed to complete due to disc I/O errors etc. The
green tick icon is displayed on a successful wipe.

2. When the user manually aborts the wipe, the bytes so
far erased incorrectly displayed as zero. This change updates the
c->bytes_erased variable in the static pass and random
pass functions to correct this.
2023-02-21 21:33:19 +00:00
PartialVolume
d9fed5bcc6 Merge pull request #436 from PartialVolume/PDFGen9
PDFGen9 - further work on PDF certificate
2023-02-21 12:09:43 +00:00
PartialVolume
84048ba58b PDFGen9 - further work on PDF certificate
1. Added rounds requested & completed. Coloured
green if equal and red if not.
2. Fixed endtime sometimes not being recorded when
a wipe is aborted. This affected the creation of the
PDF filename. Now ok.
3. Added throughput using the appropriate nomenclature
such as KB/sec MB/sec, GB/sec etc
2023-02-21 11:51:36 +00:00
PartialVolume
f0b61a0bc1 Merge pull request #435 from PartialVolume/PDFGen8
PDFGen8 - further work on PDF certificate
2023-02-21 00:48:42 +00:00
PartialVolume
eda930f06d PDFGen8 - further work on PDF certificate
1. Added bytes erased including percentage, green
if equal to disc size and red if the drive hasn't been
fully erased at least once.
2. Added explanation of bytes erased to certificate.
3. Added throughput
2023-02-21 00:35:52 +00:00
PartialVolume
2320015841 Merge pull request #434 from PartialVolume/PDFGen7
PDFGen7 - further work on PDF certificate
2023-02-18 23:14:28 +00:00
PartialVolume
581e83e615 PDFGen7 - further work on PDF certificate
1. Change model/serial no in header to bold and move left
2. Create a filename for the report that identifies the
wipe uniquely ie:
nwipe_report_YY-MM-DD_HH-MM-SS_Model_XXXX_Serial_XXXX.pdf
3. Move size data 2 characters right to allow for up to two
space prefix on size string. So data doesn't get written over
the end of the 'Size:' label.
2023-02-18 23:04:28 +00:00
PartialVolume
eef866fa54 Merge pull request #433 from PartialVolume/PDFGen6
PDFGen6 - further work on PDF certificate
2023-02-18 00:20:54 +00:00
PartialVolume
a29cc3b543 PDFGen6 - further work on PDF certificate
1. Fix @param in pdfgen.h, committed and accepted upstream
2. Added size of disk in bytes
3. When NVME drive show message "Not applicable" for HPA, DCO
4. Highlight status ERASED, FAILED etc with coloured ellipse
5. Added function help for nwipe_log (shows in hints in IDE)
2023-02-18 00:13:56 +00:00