Blog tvlooy

Blue screen of death on Linux

Linux | July 07, 2011

There is a PoC movie on YouTube for this post.

When Microsoft launched Windows 98, the system crashed live on stage with a BSOD, just because they plugged in a printer.

We can configure Linux to behave the same way, using udev.

First take a USB device serial from /var/log/messages (in this example I'll use 0000AB12CD56). Then add this line to /etc/udev/rules.d/10-bsod.rules

ATTRS{serial}=="0000AB12CD56", RUN+="/home/tvl/bsod.sh"

Then write the bsod.sh script:

su tvl -c 'eog -f --display=:0 /home/tvl/bsod.jpg'

bsod.jpg is just from Google images.

At last, reload the udev rules:

sudo udevadm control --reload-rules

And plug in your USB device! Unlike Win98, you can just use ctrl+f4 to close the BSOD ;-)