Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nwipe_conf_001 Add /etc/nwipe/nwipe.conf #458

Merged

Conversation

PartialVolume
Copy link
Collaborator

  1. Started constructing the code we will use to access and write to /etc/nwipe/nwipe.conf. The initial use of the nwipe.conf file will be to hold information such as organisation and technician details that will be used on the PDF report certificate. We are using the libconfig library enable us to read and write the conf file. libconfig is very well documented so editing the conf file manually should be pretty straight forward. Nwipe will build a basic conf file to give the user an idea how it should be edited.

  2. Updated the README.md, showing the libconfig-dev, libconfig++-dev needs to be installed.

  3. Added some information about the use of hdparm to detect hidden sectors and also noted that as from v0.35 nwipe will detect hidden sectors, and may well have an extra method to expose those hidden# sectors by restoring the DCO.

1. Started constructing the code we will use to access
and write to /etc/nwipe/nwipe.conf. The initial use of
the nwipe.conf file will be to hold information such
as organisation and technician details that will be used
on the PDF report certificate. We are using the libconfig
library enable us to read and write the conf file. libconfig
is very well documented so editing the conf file manually
should be pretty straight forward. Nwipe will build a basic
conf file to give the user an idea how it should be edited.

2. Updated the README.md, showing the libconfig-dev, libconfig++-dev
needs to be installed.

3. Added some information about the use of hdparm to detect hidden
sectors and also noted that as from v0.35 nwipe will detect hidden
sectors, and may well have an extra method to expose those hidden#
sectors by restoring the DCO.
@PartialVolume PartialVolume merged commit 4f5c15f into martijnvanbrummelen:master Mar 17, 2023
@PartialVolume PartialVolume deleted the nwipe_conf_001 branch March 17, 2023 23:29
@mdcato
Copy link

mdcato commented Mar 18, 2023

PartialVolume,
I tried to send you a logfile (--verbose) from wiping two drives, but the logfile was larger (2,146KB) than the email interface allows, and you've fixed some things I was noting. So, I using the Github web interface to upload the logfile, given that previous files I attached to email didn't make it to you, and will start a new wipe with the #458 changes.
nwipe-20230316-2.log

@mdcato
Copy link

mdcato commented Mar 18, 2023

I've run into a problem with #458. I git the master, ./autogen.sh, ./configure, but then get an error that libconfig is not found. Yum reports that it is installed. May not be an issue with anything associated with nwipe code. Suggestions?

@PartialVolume
Copy link
Collaborator Author

PartialVolume commented Mar 18, 2023

For reading/writing to /etc/nwipe/nwipe.conf, we are using the libconfig library in the latest master. Installation of libconfig is required prior to running ./autogen.sh, including it's -devel package. Maybe you are missing the -devel package but have the binary libconfig installed. I've updated the README.md section that deals with that. Try the following:

yum install libconfig-devel
yum install libconfig++-devel

I've assumed the name of the library is the same under Fedora as it is under Debian/Ubuntu/Neon. Also I'm not 100% sure I need libconfig++-devel installed so if that fails to install but libconfig-devel is ok, then see if it compiles ok with just that one library.

This would suggest the above commands are correct for Fedora. I've not much experience with Fedora I used OpenSuse many years ago but for the last few years have been doing most of my work on KDE Neon (Based on Ubuntu-LTS) with the bleeding edge KDE code.

I'm unclear whether libconfig and libconfig--devel are two different things under Fedora. I may need to update the README.md to also have yum install libconfig as a prerequisite as well as yum install libconfig-devel. What do you think?

@PartialVolume
Copy link
Collaborator Author

To avoid those enormous log files, I need to create a new ultra verbose setting and have the temperature settings only show up if you specify --verbose+.

@mdcato
Copy link

mdcato commented Mar 18, 2023 via email

@mdcato
Copy link

mdcato commented Mar 18, 2023 via email

@mdcato
Copy link

mdcato commented Mar 18, 2023 via email

@mdcato
Copy link

mdcato commented Mar 19, 2023

Here's results from running 0.34.81 (commit #458). Attached are the --verbose logfile and PDF reports.
In the PDF reports, the Bytes Erased percentage is a LARGE percentage rather than something <100, and the HA/DCO size is reported as a large negative number.
nwipe-20230318-2.log
nwipe_report_2023-03-18-14-09-49_Model_ST1000DM003_1SB1_Serial_ZN15TA6Y.pdf
nwipe_report_2023-03-19-03-11-38_Model_ST4000NM0033_9ZM_Serial_Z1Z7NVF7.pdf

@PartialVolume
Copy link
Collaborator Author

Thanks, really useful. Not sure I get a chance to fix that tonight as I've got a early start tomorrow, but hopefully tomorrow night I'll upload the fix.

Unrelated to this but I come across a very rare bug, where after completion of the ones wipe, last pass verification, no blanking it finished with 66.7%. I repeated the wipe multiple times with different drives, even a 1 MB loop drive. I could not reproduce.

After looking at the code, I found it was caused by an un-initialised variable. Due to the nature of the bug and the variable, It would only happen on the ones wipe or ones or zeros verification. All other wipes not affected .And it would only generate a percentage other than 100% on completion if the contents of the initialised variable was 1 or 6. I don't know what those odds are but maybe 2,147,483,647.5 to 1 for a 32 bit integer. That was the equivalent of me winning the lottery seeing that bug !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants