Merge pull request #255 from PartialVolume/Ping_server_and_wait.
Various fixes to do with tftp/ftp transfers.
Fixes#242 Pauses for upto 30 seconds before launching nwipe if ftp/tftp transfers are being used. This is because if the user specified shredos_config="..." on the kernel command line in order to retrieve the nwipe.conf and nwipe_customers.csv files from a local ftp/tftp server, the server needs to be online before nwipe is launched. On some systems/networks the ethernet hardware initialisation and then DHCP requests can be slower than nwipe launching hence why we now ping the server to makesure it's online before launching nwipe.
Lots of improvements to error detection and handling for tftp
Improvments to the "shredos_autoreboot=enable" option. When this option is placed on the kernel command line shredos will reboot upon completion of wipes. --nowait option is appled by the scipt to nwipe so nwipe doesn't wait for user interaction before exiting. If the shredos_config="..." or shredos_output="..." kernel command line options have been added by the user, autoreboot and also autoshutdown will wait after exiting nwipe if any ftp/tftp errors occurred so the user can review the transfer log and decide on a course of action if necessary.
Various fixes to do with tftp/ftp transfers.
Fixes#242 Pauses for upto 30 seconds before launching nwipe
if ftp/tftp transfers are being used. This is because if the
user specified shredos_config="..." on the kernel command line
in order to retrieve the nwipe.conf and nwipe_customers.csv
files from a local ftp/tftp server, the server needs to be
online before nwipe is launched. On some systems/networks the
ethernet hardware initialisation and then DHCP requests can be
slower than nwipe launching hence why we now ping the server
to makesure it's online before launching nwipe.
Lots of improvements to error detection and handling for tftp
Improvments to the "shredos_autoreboot=enable" option. When this
option is placed on the kernel command line shredos will reboot
upon completion of wipes. --nowait option is appled by the scipt
to nwipe so nwipe doesn't wait for user interaction before exiting.
If the shredos_config="..." or shredos_output="..." kernel command
line options have been added by the user, autoreboot and also
autoshutdown will wait after exiting nwipe if any ftp/tftp errors
occurred so the user can review the transfer log and decide on a
course of action if necessary.
1. Debug tftp transfers for restoring config files and outputing
pdfs and logs.
2. Added a ping status delay for the ftp/tftp that only proceeds
with launching nwipe if ftp/tftp servers have been configured on
the kernel command line. The delay has a 30 second timeout upon
which nwipe will launch. This fixes a problem where nwipe launches
before the ethernet hardware is active and a IP address had not
been obtained. This caused nwipe to not be able to read the
config files from the ftp/tftp server.
3. Removed 4 second countdown on restarting nwipe.
When the user types Control C to exit nwipe after the wipes
have completed or to abort nwipe before wipes complete, previously
ShredOS provided only one option which was press the spacebar to
restart nwipe. The user could also have pressed the power button to
shutdown the computer.
This commit now provides the option to reboot or shutdown using the
keyboard. The following message is displayed after nwipe exits.
"Paused, press r to reboot, s to shutdown, spacebar to restart nwipe"
As before if auto shutdown has been selected via the kernel command
line then auto shutdown overrides this new message.
This commit allows the user to exclude the fat
formatted USB flash drive that ShredOS was booted from.
Reasons why the user might want to do this are:
a:) avoid the possibility of accidently selecting the
USB FAT formatted boot drive for erasure in interactive mode
b:) Stop the USB FAT formatted boot drive being erased in
autonuke mode.
There are two methods available to do this. You should currently
not manually add -e, --exclude=DEVICES on the kernel command line
if using either method described below as the results may be
unpredictable as nwipe doesn't currently combine two -e or --exclude
options. A patch to nwipe will fix this in due course. Further to
this, ShredOS will only exclude ONE FAT formatted USB drive. If you
plugged multiple FAT formatted drives into the system it will only
exclude the first drive it comes across that it either recognises
as a ShredOS boot drive or is explicitly excluded by using the empty
file /etc/shredos/shredos_exclude_disc. This file will take precedence
over ShredOS attempting to detect a boot drive by examining version
information.
The two methods to exclude a FAT formatted boot drive from being wiped
are described below. Even though a drive is excluded from the wipe it
will still have reports and logs transferred to it unless some other
transfer method has been selected such as lftp.
1. The user can now place a empty file called
/etc/shredos/shredos_exclude_disc on the FAT formatted drive.
This will cause ShredOS to use the nwipe exclude option to
exclude the drive from being displayed in nwipe's interactive
mode or erased in nwipe's autonuke mode. This is particularly
userful for Ventoy users as they would not need to edit the
ShredOS .img file or build the modified ShredOS .iso as required
by method 2 below when making changes to grub.cfg.
However this method is not only limited to Ventoy users but can
also be used on a ShredOS USB created by dd or Rufus.
2. The user can place the text string shredos_exclude_boot_disc
on the kernel command line in /boot/grub/grub.cfg and /EFI/BOOT/grub.cfg
As with the first method this will cause ShredOS to exclude the FAT
formatted boot drive from appearing in nwipe's interactive mode or
being erased in nwipe's autonuke mode.
In addition to the above features various improvements were made to
the log messages include prefixing with date.
Currently the build of kernel_cmdline_extractor require
autoconf & automake installed on the host and do not
use the ones embedded in buildroot.
A simple use of autoreconf fix the build
Add fat16 to existing fat32 & exfat disc formats
We now accept fat16 as well as fat32 and exfat formats for
USB devices that can have the config files restored from &
sent to as well as saving PDF files.
The main purpose of this commit is to allow the developer
or tester the ability to specify /dev/loop0 .. /dev/loopn on the
kernel command line in /boot/grub/grub.cfg and /EFI/BOOT/grub.cfg
where n is unlimited, although it is recommended that no more
than 20-30 loop devices are specified. The loop devices are of a
fixed size alternating between 500Kbytes and 1 MByte in size. Due
to their small size you would typically select 500 or 1000 rounds
when testing. To create loop devices append the following to
grub.cfg nwipe_options='--nousb /dev/loop0 /dev/loop1 ... /dev/loopn'
loop devices should be sequential starting at loop0, any break in
the sequence will cause creation of loop devices to stop.
This commit also includes a ffmpeg module
+BR2_PACKAGE_FFMPEG_SWSCALE=y for creation of
videos of the display. This may be useful for creating
training material, youtube videos etc using the command
ffmpeg -f fbdev -framerate 30 -i /dev/fb0 output.mp4
Initial work was started on excluding the boot disc if
the following shredos_exclude_boot_disc is appended
to the kernel command line.
discs including Ventoy.
2. The delay ShredOS introduces while it waits for USB devices to initialise
previously printed a period symbol every second to show somethink was
happening, instead, it now counts down numerically from 30. Most USB
devices have initialised after about 10-15 seconds.
3. Two new kernel command line options are introduced. The first allows the
user to determine whether PDF, log and dmesg files are sent using tftp or
ftp protocols.
i.e shredos_config=ftp:192.168.0.2:/home/joe/ftpdata/:jo:488993d:d
4. The second kernel command line option is:
shredos_output=ftp:192.168.0.2:/home/joe/ftpdata/:jo:488993d:d which
determines where the nwipe config files are retrieved from on ShredOS boot
and saved on nwipe exit.
5. Added package openssh for sftp support
6. Added package telnetd which had inadvertently been removed on the last update.