Kill init by touching a bunch of files

Writing Software, technology, sysadmin war stories, and more. Monday, November 24, 2014 init is a pretty big deal on a Linux box. If you manage to kill it, the machine panics. Everything stops, and if you're lucky, it reboots by itself a few seconds or minutes later. Naturally, you'd like it to be stable and robust so that your machine doesn't go down. What if I told you I found a way to kill the "Upstart" init in RHEL and CentOS 6 with just a bunch of "touch" commands? Yep, it's true. You can even reproduce it in qemu. In fact, I had to do it in there in order to get these screenshots. Step 1: Create a new directory under /etc/init. I called mine "kill.the.box". Step 2: Fill that path with a few hundred or thousand files. I used 'touch $(seq 1 1000)' but do it however you like. Step 3: Kick off a bunch of changes to those files in parallel. As you can see her...

Linked on 2014-11-24 20:53:37 | Similar Links