More than a decade ago a user came into #ubuntu-server on Freenode (now libera.chat ) and said that they had accidentally run “rm -rf /* something*” in a root shell.
Note the errant space that made that a fatal mistake. I don’t remember how far it actually got in deleting files, but all of /bin/ /sbin/ and /usr/ were gone.
He had 1 active ssh connection, and couldn’t start another one.
It was a server that was “in production”, was thousands of miles away from him, and which had no possibility for IPMI / remote hands.
Everyone (but me) in the channel said that he was just SoL and should just give up.
I stayed up most of the night helping him. I like challenges and I like helping people.
This was in the sysv-init (maybe upstart) days, and so a decent number of shell scripts were running, and using basic *nix commands.
We recovered the bash binary by running something along the lines of
(If you can access “lsof” then “sudo lsof | grep deleted” will show you any files that are open, but also “deleted”. You may be surprised at how many there are!)
But bash needed too many shared libraries to make that practical.
Somehow we were able to recover curl and chmod, after which I had him download busybox-static. From there we downloaded an Ubuntu LiveCD iso, loop mounted it, loop mounted the squashfs image inside the iso, and copied all of /bin/ , /sbin/ , /etc , and so on from there onto his root FS.
Then we re-installed missing packages, fixed up /etc/ (a lot of important daemons, including the one that was production critical, kept their configuration files open, and so we were able to use lsof to find the magic symlinks to them in /proc/$pid/fd/ and just cp them back into /etc/.
We were able to restart openssh-server, log in again, and I don’t remember if we were brave enough to test rebooting.
But we fucking did it!
I am certainly getting a lot of details wrong from memory. It’s all somewhere at irclogs.ubuntu.com though. My nick was / is Jordan_U.
Just last week I was arguing with a bunch of #ubuntu fan boys here about how that system prevents you from learning, how Debian is a tiny bit better, but with arch/based systems you both have a reliable daily runner and be able to learn as much as you can take.
The more you learn the more aggravating debians (mint-ubuntus) become, forcing their choices on you. Arch respects and rewards people who want to do it their way. They provide the blocks, you build your system.
The way they talk about it makes it sound like they invented the written word, but that notwithstanding the fonts actually look really nice in my opinion.
Though I enjoy and am currently using #LinuxMint, I wish I learned about #Wayland sooner. I didn't understand why game performance felt so off with my dual monitor setup for several months. I have since dabbled with an #Ubuntu#Gnome DE for some gaming, and Wayland support has alleviated those problems. However, I plan to look into other options when I've organized my data a bit more and establish proper backups. Learning #Bash, #scripting, #aliases, #workspaces and tweaking #hotkeys were also useful for making my workflow into what it is. Also, I wish I knew how bad #ProtonVPN and #ProtonDrive#Linux support would be. Despite getting used to their #CLI applications, the absence of feature parity is immensely disappointing.
for those of you who are passionate about #linux#gaming, even if on the #computer or #SteamDeck, be that on #arch, #fedora, #ubuntu or something else, I recommend you subscribe to the lemi sub...what, reddit, thread? dedicated to this: @linux_gaming
Even if you don't make an account on lemi.world or another such instance, you can subscribe to the sub, by putting that handle in your search bar, or clicking it here if you're on mastodon, since lemi is a fediverse platform. I dk if the r/linuxgaming community will be going away soon, but given what's happening with reddit, maybe it won't shut down when the protests are over, if they ever will be, which I hope is not likely.
What is the most difficult problem that you have fixed in linux? (lemmy.world)
Snap store from Canonical (Ubuntu) hit with another crypto scam app (www.gamingonlinux.com)
Monaspace - Microsoft presents a new font family for code (monaspace.githubnext.com)
The way they talk about it makes it sound like they invented the written word, but that notwithstanding the fonts actually look really nice in my opinion.
What are some things you wish you had known when switching to Linux?
I start: the most important thing is not the desktop, it’s the package manager.