reHDD/README.md

84 lines
1.9 KiB
Markdown
Raw Normal View History

2020-05-02 00:53:38 +02:00
# reHDD
2018-11-08 18:31:00 +01:00
2018-11-08 18:36:48 +01:00
## Useful for:
* checking new drives for the first time
* checking used drives for their next live
2020-09-15 13:28:02 +02:00
* deleting a drive securely via overwriting
2018-11-08 18:36:48 +01:00
2020-09-15 13:28:02 +02:00
## Screenshot
2020-09-15 13:43:51 +02:00
![alt text](https://git.mosad.xyz/localhorst/reHDD/raw/commit/95828afcc2e417b9cb64a4add98ae9c3c7628e84/doc/screenshot.png "Screenshot")
2018-11-08 18:36:48 +01:00
2020-09-15 13:12:31 +02:00
## Debian Build Notes
* apt-get install ncurses-dev git make g++
* clone repo
* make release
2020-09-15 00:00:17 +02:00
2022-01-26 16:40:20 +01:00
## Create Standalone with Debian 11
2020-09-15 13:28:02 +02:00
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
2022-01-26 16:52:45 +01:00
* apt-get install hwinfo smartmontools curl
2020-09-15 13:28:02 +02:00
### Start reHDD after boot without login (as a tty shell)
nano /etc/systemd/system/reHDD.service
```
[Unit]
Description=Custom user interface on tty1
Conflicts=getty@tty1.service
Before=getty.target
[Service]
WorkingDirectory=/root/reHDD
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
[Install]
WantedBy=multi-user.target
```
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
2020-10-01 17:52:46 +02:00
# remove comment for the following to activate log telemetie
2022-01-26 17:18:12 +01:00
# 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
2020-09-15 13:28:02 +02:00
rm -f /root/reHDD/reHDD.log
```
2022-01-26 17:18:12 +01:00
chmod +x reHDDSettings.sh
2020-09-15 13:28:02 +02:00
Make sure the binary reHDD is in /root/reHDD/
2022-01-26 17:18:12 +01:00
2020-09-15 13:28:02 +02:00
Add your system drive in /root/reHDD/ignoreDrives.conf like:
``` /dev/sdX:e102f49d-5ed5-462b-94c5-ef66a4345671```
Get your UUID via blkid /dev/sdX
2020-09-15 00:00:17 +02:00
2020-09-15 13:28:02 +02:00
systemctl enable reHDD.service
2020-09-15 13:43:51 +02:00
2020-09-15 13:28:02 +02:00
systemctl enable reHDDSettings.service
2020-09-15 00:00:17 +02:00