Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Wiki Replica
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
The Tor Project
TPA
Wiki Replica
Commits
cda3a4b4
Unverified
Commit
cda3a4b4
authored
5 years ago
by
anarcat
Browse files
Options
Downloads
Patches
Plain Diff
expand on the destruction procedures
parent
5d54dfe1
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tsa/howto/retire-a-host.mdwn
+18
-7
18 additions, 7 deletions
tsa/howto/retire-a-host.mdwn
with
18 additions
and
7 deletions
tsa/howto/retire-a-host.mdwn
+
18
−
7
View file @
cda3a4b4
...
...
@@ -92,13 +92,17 @@ interface, you need to be a little more creative. We do this with the
apt install nwipe
Run in a screen:
screen
If there's a RAID array, first wipe one of the disks by taking it
offline and writing garbage:
mdadm --fail /dev/md0 /dev/sdb1 &&
mdadm --remove /dev/md0 /dev/sdb1 &&
mdadm --fail /dev/md1 /dev/sdb
3
&&
mdadm --remove /dev/md1 /dev/sdb
3
&&
mdadm --fail /dev/md1 /dev/sdb
2
&&
mdadm --remove /dev/md1 /dev/sdb
2
&&
: etc, for the other RAID elements in /proc/mdstat &&
nwipe --autonuke --method=random --verify=off /dev/sdb
...
...
@@ -112,19 +116,26 @@ When you return:
that will survive disk wiping:
# make sure /tmp is on a tmpfs first!
cp -av /root /tmp/root
mount -o bind /tmp/root /root
cp /bin/busybox /tmp/root/sh
export SHELL=/tmp/root/sh
cp -av /root /tmp/root
&&
mount -o bind /tmp/root /root
&&
cp /bin/busybox /tmp/root/sh
&&
export SHELL=/tmp/root/sh
&&
exec screen -s $SHELL
TODO: the above eventually failed to make busybox survive the
destruction, probably because it got evicted from RAM and couldn't
be found in swap again (as *that* was destroyed too). We should
try using [vmtouch](https://hoytech.com/vmtouch/) with something like `vmtouch -dl
/tmp/root/sh` next time, although that is only [available in buster
and later](https://tracker.debian.org/pkg/vmtouch).
2. kill all processes but the SSH daemon, your SSH connexion and
shell. this will vary from machine to machine, but a good way is
to list all processes with `systemctl status` and `systemctl stop`
the services one by one. Hint: multiple services can be passed on
the same `stop` command, for example:
systemctl stop acpid atd bacula-fd bind9 cron dbus dbus.socket fail2ban haveged irqbalance libvirtd lvm2-lvmetad.service mdmonitor nagios-nrpe-server ntp openvswitch-switch postfix prometheus-bind-exporter prometheus-node-exporter smartd strongswan syslog-ng.service systemd-journald systemd-journald-audit.socket systemd-journald-dev-log.socket systemd-journald.socket systemd-logind.service systemd-udevd systemd-udevd systemd-udevd-control.socket systemd-udevd-control.socket systemd-udevd-kernel.socket systemd-udevd-kernel.socket ulogd2 unbound virtlogd virtlogd.socket
systemctl stop acpid
acpid.socket acpid.path
atd bacula-fd bind9 cron dbus dbus.socket fail2ban haveged irqbalance libvirtd lvm2-lvmetad.service
lvm2-lvmetad.socket
mdmonitor nagios-nrpe-server ntp openvswitch-switch postfix prometheus-bind-exporter prometheus-node-exporter smartd strongswan syslog-ng.service systemd-journald systemd-journald-audit.socket systemd-journald-dev-log.socket systemd-journald.socket systemd-logind.service systemd-udevd systemd-udevd systemd-udevd-control.socket systemd-udevd-control.socket systemd-udevd-kernel.socket systemd-udevd-kernel.socket ulogd2 unbound virtlogd virtlogd.socket
3. disable swap:
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment