Go to file
2022-05-15 21:28:28 +02:00
doc added update script 2020-09-16 14:42:51 +02:00
include removed flush in shred 2022-05-15 21:28:28 +02:00
src removed flush in shred 2022-05-15 21:28:28 +02:00
.gitignore pclose instead fclose 2022-01-26 15:44:32 +01:00
astyle.sh using now own shred impl with check if the complete drive is full of zeros after shredding 2022-05-14 14:06:16 +02:00
ignoreDrives.conf using now own shred impl with check if the complete drive is full of zeros after shredding 2022-05-14 14:06:16 +02:00
LICENSE Initial commit 2018-11-08 18:31:00 +01:00
makefile define-switch for frozen alert 2020-09-20 22:40:05 +02:00
README.md start reHDD on tty1 2022-05-11 22:31:08 +02:00
shred_dummy.sh added custom implementation for shred 2020-08-26 00:12:39 +02:00
vcCodium.code-workspace fixed states if drive is no longer present 2020-08-26 18:38:39 +02:00

reHDD

Useful for:

  • checking new drives for the first time
  • checking used drives for their next live
  • deleting a drive securely via overwriting

Screenshot

alt text

Debian Build Notes

  • apt-get install ncurses-dev git make g++
  • clone repo in /root/
  • make release

Create Standalone with Debian 11

Instructions how to create a standalone machine that boots directly to reHDD. This is aimed for production use, like several drives a day shredding.

Software requirements

  • apt-get install hwinfo smartmontools curl

Start reHDD after boot without login (as a tty shell)

mkdir /lib/systemd/system/getty@tty1.service.d/

nano /lib/systemd/system/getty@tty1.service.d/override.conf

[Service]
WorkingDirectory=/root/reHDD
ExecStart=
ExecStart=-/root/reHDD/reHDD
StandardInput=tty
StandardOutput=tty
Restart=always
RestartSec=1
UtmpIdentifier=tty1
TTYPath=/dev/tty1
TTYReset=yes
TTYVHangup=yes
TTYVTDisallocate=yes
SendSIGHUP=yes

systemctl daemon-reload

nano /etc/systemd/system/reHDDSettings.service

[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/usr/bin/bash /root/reHDDSettings.sh

[Install]
WantedBy=multi-user.target

nano /root/reHDDSettings.sh

#!/bin/bash
dmesg -n 1 #disable overlay if a drive is attached/detached
# remove comment for the following to activate log telemetie
# curl -k -T /root/reHDD/reHDD.log -u "fgggfffgfgfgfg:" -H 'X-Requested-With: XMLHttpRequest' https://schuttercloud.com/public.php/webdav/`echo $(date '+%Y-%m-%d_%H-%M')`_reHDD.log
rm -f /root/reHDD/reHDD.log

chmod +x reHDDSettings.sh

Make sure the binary reHDD is in /root/reHDD/

Add your system drive in /root/reHDD/ignoreDrives.conf like: e102f49d Get the first 8 Bytes from your UUID via blkid /dev/sdX

systemctl enable reHDDSettings.service