Where I live, it’s not uncommon that during an unexpected mighty thunderstorm, the current induced into the power grid fries most of the electronics along the way (some people might consider investing into some protection).
Long story short, recently one of the servers at work got struck (again) but the HDD seemed to have survived (this time) – luckily I found another machine with a similar build just laying around so I rushed to install the HDD on that one.
Linux is particularly good at handling hardware changes elegantly so I figured there wouldn’t be much that could go wrong, and I was right – the system booted nicely, all the data was intact but there was no internet connection. At that point I already knew I was supposed to look for a file, just couldn’t remember which one it was and where exactly it would be. I’ll just write the magic line that takes care of these sort of grotesque networking problems:
sudo rm /etc/udev/rules.d/70-persistent-net.rules
Yes, it is as easy as deleting a file – that one file that persistently stores networking configuration stuff like the MAC address for instance. Get rid of that and a brand new one will be created on reboot (this might not be true at all times – but since at the moment I don’t care, I will selfishly only elaborate once I do).