Follow-up from “Dumbest Thing you have done distro-hopping?”.
Here’s mine - the laptop from which I’m typing right now has a broken touchpad that keeps jumping and clicking randomly, and does not work. Well, I can’t afford to fix it, but at the moment, I was so pissed off I punched the touchpad really hard, and the machine panicked with all the lights blinking. A few more revival abuses, and the machine was back to life, but since I was running a nixos-rebuild switch --upgrade
in the background, I blew off my boot partition. I think I just broke the unbreakable distro.
I guess that would be running sudo rm -rf /bin (yeah, it was supposed to be “~/bin” without the sudo… idk, my fingers have a life of their own) on a machine that was in a datacenter on the other side of the globe.
It was a long and sweaty night.
Nothing makes me learn as quickly and thoroughly as sheer panic and hoping someone was a stupid as me and there’s an answer already posted somewhere.
Did something similar recently. Turns out rsync by default, if it encounters a symlink to a directory and it’s instructed to copy a directory with the same name, will remove the symlink and create an empty directory.
So I had a script that installs crosscompiled kernel modules via rsync /path/to/nfs/path /
This worked perfectly until Debian 12, like other distros, decided to merge /usr, so now /bin is a symlink to /usr/bin. First time I run the script after upgrade /bin gets replaced and then no programs can be started as all binaries look for /bin/ld-linux.
I managed to fix it by booting into busybox and recreating the symlink, but it took a while until I figured out what was wrong, wasn’t familiar with usrmerge.