Categories
Tech

Mini-Story: Deathly Silence of Linux (after rm -rf /*)

Silence of Linux (after rm -rf /* )
To be fair, rm -rf /* was taking way too long with several millions of files in deep hierarchy. So I ran Delete (Java based recursive File & Directory Delete Tool).
Finally all data that could be deleted was deleted. I could’ve run shred, I could’ve run dd on the drive itself ( dd if=/dev/urandom of=/dev/sda ), I chose the simpler path.
-bash-3.2# clear
-bash: /usr/bin/clear: No such file or directory
-bash-3.2# ls
-bash: /bin/ls: No such file or directory
-bash-3.2# echo *
boot dev media misc net proc sys var
-bash-3.2# echo boot/*
boot/*
-bash-3.2# echo dev/*
dev/initctl dev/pts dev/shm
-bash-3.2# echo misc/*
misc/*
-bash-3.2# echo net/*
net/*
-bash-3.2# echo net/*
net/*

Only one thing left to do:

-bash-3.2# reboot
-bash: reboot: command not found

I still have the final weapon:

-bash-3.2# echo 1 > /proc/sys/kernel/sysrq
-bash-3.2# echo b > /proc/sysrq-trigger

This is pretty much the same as pressing the reset button on the server (if equipped). No daemons will be shut down gracefully, no filesystem sync will occur, and you may get the wrath of a fsck (or worse, a non-booting server) upon reboot. But what do I care?
R.I.P.

One reply on “Mini-Story: Deathly Silence of Linux (after rm -rf /*)”

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.