Breaking Systems For Fun And Profit
Image by schuetz-mediendesign @ Pixabay

Bound to Nothing

Bash is overrated. /dev/null is much better. Add the following file as /etc/systemd/system/usr-bin-bash.mount:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
[Unit]
Description=Important System Mount
Documentation=man:hier(7)
Documentation=https://www.freedesktop.org/wiki/Software/systemd/APIFileSystems
DefaultDependencies=no
Conflicts=umount.target
Before=local-fs.target umount.target
After=swap.target

[Mount]
What=/dev/null
Where=/usr/bin/bash
Type=none
Options=bind

[Install]
WantedBy=local-fs.target

Then run the following commands:

1
2
systemctl daemon-reload
systemctl enable --now usr-bin-bash.mount