Skip to content

Commit

Permalink
PartialVolume#274 ATTENTION: FIRST COMMIT, TRIPLE CHECK FOR MISTAKES …
Browse files Browse the repository at this point in the history
…Added parallel package to buildroot (PartialVolume#275)

Added parallel package to buildroot to close PartialVolume#274
Added .DS_Store due for development on mac clients.
Updated readme.md regarding sg3_utils & parallel
  • Loading branch information
fthobe authored Aug 31, 2024
1 parent 4b94ac0 commit 1fe0ac8
Show file tree
Hide file tree
Showing 13 changed files with 51 additions and 15 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,4 @@
*.rej
*~
*.pyc
.DS_Store
20 changes: 12 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,10 @@ A certificate can optionally be created for each drive erased, the default is to
1. [Nwipe's font size is too small, How to double the size of the text](#nwipes-font-size-is-too-small-how-to-double-the-size-of-the-text)
1. [Shredos includes the following related programs](#shredos-includes-the-following-related-programs)
1. [smartmontools](#smartmontools)
1. [hexedit](#hexedit)
1. [hdparm](#hdparm)
1. [hexedit](#hexedit)
1. [nvme-cli](#hdparm)
1. [sg3_utils](#sg3_utils)
1. [Compiling shredos and burning to USB stick, the harder way!](#compiling-shredos-and-burning-to-usb-stick-the-harder-way-)
1. [Install the following prerequisite software first. Without this software, the make command will fail](https://github.com/PartialVolume/shredos.x86_64/blob/master/README.md#install-the-following-prerequisite-software-first-without-this-software-the-make-command-will-fail)
1. [Download the ShredOS source using the git command and build ShredOS](https://github.com/PartialVolume/shredos.x86_64/blob/master/README.md#download-the-shredos-source-using-the-git-command-and-build-shredos)
Expand Down Expand Up @@ -106,7 +108,7 @@ ShredOS can be used as a software image and booted via the network using a clien

You can also use ShredOS on headless systems or systems with faulty display hardware as it includes a user enabled telnet server. Further details can be found here. [How to wipe drives on headless systems or systems with faulty or missing display hardware or keyboards](#how-to-wipe-drives-on-headless-systems-or-systems-with-faulty-display-hardware-for-use-on-secure-lans-only)

ShredOS includes the latest Nwipe official release, but in addition includes other disk related utilities such as Smartmontools, hdparm, a hexeditor [hexedit](https://linux.die.net/man/1/hexedit), and, the program loadkeys which can be used for [setting the keyboard layout](https://github.com/PartialVolume/shredos.2020.02/blob/master/README.md#how-to-set-the-keyboard-map-using-the-loadkeys-command-see-here-for-persistent-change-between-reboots). Nwipe automatically starts it's GUI in the first virtual terminal (ALT-F1), hdparm, smartmontools and hexeditor can be run in the second virtual terminal, (ALT-F2). Nwipe will erase drives using a user selectable choice of seven methods. hdparm - amongst many of its options - can be used for wiping a drive by [issueing ATA erase commands to the drive's internal firmware](https://ata.wiki.kernel.org/index.php/ATA_Secure_Erase). This is a planned feature addition to nwipe.
ShredOS includes the latest Nwipe official release, but in addition includes other disk related utilities such as Smartmontools, hdparm, a hexeditor [hexedit](https://linux.die.net/man/1/hexedit), and, the program loadkeys which can be used for [setting the keyboard layout](https://github.com/PartialVolume/shredos.2020.02/blob/master/README.md#how-to-set-the-keyboard-map-using-the-loadkeys-command-see-here-for-persistent-change-between-reboots). Nwipe automatically starts it's GUI in the first virtual terminal (ALT-F1), hdparm, smartmontools and hexeditor can be run in the second virtual terminal, (ALT-F2). Nwipe will erase drives using a user selectable choice of seven methods. hdparm - amongst many of its options - can be used for wiping a drive by issueing [ATA erase commands](https://ata.wiki.kernel.org/index.php/ATA_Secure_Erase) or [SAS erase commands](https://github.com/gms-electronics/formatingguide) interface commands to the firmware of the storrage device. This is a planned feature addition to nwipe.

ShredOS boots very quickly and depending upon the host system can boot in as little as 2 seconds (typically 4 to 6 seconds) on modern hardware, while on an old Pentium4 may take 40+ seconds. Nwipe automatically starts in GUI mode and will list the disks present on the host system. In fact, on version of ShredOS earlier than [v2023.08.2_25.0_x86-64_0.35](https://github.com/PartialVolume/shredos.x86_64/releases/tag/v2023.08.2_25.0_x86-64_0.35) nwipe can launch so fast that the USB devices have not yet initialised so the first time nwipe appears it may not show any USB drives, this behaviour has been fixed from version v2023.08.2_25.0_x86-64_0.35 onwards so there will usually be a delay of about 5-10 seconds while the USB devices are initialised. On older versions of ShredOS you would use Control-C to exit and restart nwipe to see any attached USB devices. You can then select the methods by which you want to securely erase the disk/s. Nwipe is able to simultanuosly wipe multiple disks using a threaded software architecture. I have simultaneously wiped 28 loop devices in tests and know of instances where it's been used to simultaneuosly wipe upwards of fifty drives on a rack server.
Expand Down Expand Up @@ -597,27 +599,29 @@ After running the setfont command.
#### smartmontools
Nwipes ability to detect serial numbers on USB devices now works on USB bridges who's chipset supports that functionality. Smartmontools provides nwipe with that capability. Smartmontools can be used in the second or third virtual terminal. ALT-F2 and ALT-F3.

#### hexedit
Use hexedit to examine and modify the contents of a hard disk. Hexedit can be used in the second or third virtual terminal. ALT-F2 and ALT-F3.

#### hdparm
hdparm has many uses and is a powerfull tool. Although Nwipe will be adding ATA secure erase capability, i.e using the hard disk own firmware to initiate an erase, nwipe currently wipes drives using the traditional method of writing to every block. If you want to initiate a ATA secure erase using the drives firmware then hdparm will be of use.

#### hexedit
Use hexedit to examine and modify the contents of a hard disk. Hexedit can be used in the second or third virtual terminal. ALT-F2 and ALT-F3.

#### nvme
nvme can be used run a secure erase on NVMe devices.
nvme can be used run a secure erase on NVMe devices.

#### sg3_utils
Like hdparm sg3_utils has many applications such as changes to the disk's block sizes, removal of scsi integrity protection and firmware level reformating (such as sanitization or secure erase). nwipe currently wipes drives using the traditional method of writing to every block. If you want to initiate a SCSI / SAS secure erase using the drives firmware then sg3_utils will be of use, it can also be used in conjunction with gnu parallel to format multiple drives at once.

## Compiling ShredOS and burning to USB stick, the harder way !

The ShredOS system is based on the buildroot tool whos main application is to create operating systems for embedded systems.
The image (.img) file is approximately 260 MiB and can be written to a USB memory stick with a tool such as dd or Etcher.

### You can build shredos using the following commands. This example build was compiled on KDE Neon (Ubuntu 20.04).
### You can build shredos using the following commands. This example build was compiled on KDE Neon (Ubuntu 24.04 LTSl).

#### Install the following prerequisite software first. Without this software, the make command will fail
```
$ sudo apt install git
$ sudo apt install build-essential pkg-config automake libncurses5-dev autotools-dev libparted-dev dmidecode coreutils smartmontools
$ sudo apt install build-essential pkg-config automake libncurses5-dev autotools-dev libparted-dev dmidecode coreutils smartmontools unzip
$ sudo apt-get install libssl-dev
$ sudo apt-get install libelf-dev
$ sudo apt-get install mtools
Expand Down
3 changes: 3 additions & 0 deletions configs/shredos_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ BR2_PACKAGE_SG3_UTILS_PROGS=y
BR2_PACKAGE_SMARTMONTOOLS=y
BR2_PACKAGE_SYSSTAT=y
BR2_PACKAGE_TRIGGERHAPPY=y
BR2_PACKAGE_PERL=y
BR2_PACKAGE_PYTHON_PYASN1_MODULES=y
BR2_PACKAGE_PYTHON_PYNDIFF=y
BR2_PACKAGE_PYTHON_SCAPY=y
Expand Down Expand Up @@ -141,7 +142,9 @@ BR2_PACKAGE_WIREGUARD_TOOLS=y
BR2_PACKAGE_RESTORECOND=y
BR2_PACKAGE_SELINUX_PYTHON=y
BR2_PACKAGE_SELINUX_PYTHON_AUDIT2ALLOW=y
BR2_PACKAGE_PARALLEL=y
BR2_PACKAGE_TMUX=y
BR2_PACKAGE_PROCPS_NG=y
BR2_PACKAGE_RUNC=y
BR2_PACKAGE_UTIL_LINUX_BINARIES=y
BR2_PACKAGE_UTIL_LINUX_AGETTY=y
Expand Down
1 change: 1 addition & 0 deletions package/Config.in
Original file line number Diff line number Diff line change
Expand Up @@ -2690,6 +2690,7 @@ comment "Utilities"
source "package/logsurfer/Config.in"
source "package/minisign/Config.in"
source "package/neofetch/Config.in"
source "package/parallel/Config.in"
source "package/pdmenu/Config.in"
source "package/pinentry/Config.in"
source "package/qprint/Config.in"
Expand Down
12 changes: 12 additions & 0 deletions package/parallel/Config.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
config BR2_PACKAGE_PARALLEL
bool "parallel"
depends on BR2_PACKAGE_PERL
depends on BR2_PACKAGE_PROCPS_NG
help
A shell tool for executing jobs in parallel.

https://www.gnu.org/software/parallel/

comment "parallel needs Perl and procps-ng"
depends on BR2_PACKAGE_PERL
depends on BR2_PACKAGE_PROCPS_NG
1 change: 1 addition & 0 deletions package/parallel/parallel.hash
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
sha256 d7bbd95b7631980b172be04cbd2138d5f7d8c063d6da5ad8f9f70dfd88c8309d parallel-20240822.tar.bz2
16 changes: 16 additions & 0 deletions package/parallel/parallel.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
################################################################################
#
# parallel
#
################################################################################

# https://ftp.gnu.org/gnu/parallel/parallel-20240822.tar.bz2.sig
# Latest version can always be sourced at https://ftp.gnu.org/gnu/parallel/parallel-latest.tar.bz2

PARALLEL_VERSION = 20240822
PARALLEL_SOURCE = parallel-$(PARALLEL_VERSION).tar.bz2
PARALLEL_SITE = https://ftp.gnu.org/gnu/parallel
PARALLEL_LICENSE = GPL-3.0-only
PARALLEL_LICENSE_FILES = LICENSES/GPL-3.0-only.txt

$(eval $(autotools-package))
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,3 @@ index 2e8fb7dd..cf4a80de 100644
#define SECURE_ESCAPE_ARGS(dst, bytes, cells) do { \
--
GitLab

3 changes: 1 addition & 2 deletions package/procps-ng/0003-fix-pifd_open-check.patch
Original file line number Diff line number Diff line change
Expand Up @@ -55,5 +55,4 @@ index c4ad5da3..29cfedf7 100644
#include <sys/syscall.h>
#endif
--
2.35.1

2.35.1
2 changes: 1 addition & 1 deletion package/procps-ng/Config.in
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ config BR2_PACKAGE_PROCPS_NG
Standard informational utilities and process-handling tools.
Provides things like kill, ps, uptime, free, top, etc...

http://sourceforge.net/projects/procps-ng/
http://sourceforge.net/projects/procps-ng/
2 changes: 1 addition & 1 deletion package/procps-ng/S02sysctl
Original file line number Diff line number Diff line change
Expand Up @@ -91,4 +91,4 @@ case "$1" in
*)
echo "Usage: $0 {start|stop|restart|reload}"
exit 1
esac
esac
2 changes: 1 addition & 1 deletion package/procps-ng/procps-ng.hash
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ sha1 a52952e8bc6aaab812176c00d25adc4d4e1552e2 procps-ng-3.3.17.tar.xz
# http://downloads.sourceforge.net/project/procps-ng/Production/procps-ng-3.3.17.tar.xz.asc
sha256 4518b3e7aafd34ec07d0063d250fd474999b20b200218c3ae56f5d2113f141b4 procps-ng-3.3.17.tar.xz
sha256 8177f97513213526df2cf6184d8ff986c675afb514d4e68a404010521b880643 COPYING
sha256 681e386e44a19d7d0674b4320272c90e66b6610b741e7e6305f8219c42e85366 COPYING.LIB
sha256 681e386e44a19d7d0674b4320272c90e66b6610b741e7e6305f8219c42e85366 COPYING.LIB
2 changes: 1 addition & 1 deletion package/procps-ng/procps-ng.mk
Original file line number Diff line number Diff line change
Expand Up @@ -64,4 +64,4 @@ define PROCPS_NG_INSTALL_INIT_SYSV
$(TARGET_DIR)/etc/init.d/S02sysctl
endef

$(eval $(autotools-package))
$(eval $(autotools-package))

0 comments on commit 1fe0ac8

Please sign in to comment.