I’m working on a some materials for a class wherein I’ll be teaching some young, wide-eyed Windows nerds about Linux and we’re including a section we’re calling “foot guns”. Basically it’s ways you might shoot yourself in the foot while meddling with your newfound Linux powers.
I’ve got the usual forgetting the .
in lines like this:
$ rm -rf ./bin
As well as a bunch of other fun stories like that one time I mounted my Linux home folder into my Windows machine, forgot I did that, then deleted a parent folder.
You know, the war stories.
Tell me yours. I wanna share your mistakes so that they can learn from them.
Fun (?) side note: somehow, my entire ${HOME}/projects
folder has been deleted like… just now, and I have no idea how it happened. I may have a terrible new story to add if I figure it out.
If you count Android too, then this: I got my first Android phone when I was 10 or 11 and rooted it on the first day of having it. This was during a time when we were all still using ClockworkMod because TWRP didn’t exist yet, and I somehow ended up with a system without a kernel. Panic ensued, and I spent that entire night (like 10 hours) digging through xda in order to find a tutorial on how to get this damn phone to run again. Imagine having to tell your parents “I broke my phone I got yesterday.” I did get it working at like 6:30 AM. Fun times.
Oh man, Clockwork mod, that takes me back. Although I had my android phone for a while before I built up the courage to root it, in part due to stories like yours
what’s the fun in modding if not the two hours where you think you’ve bricked everything and you’re scrambling through a 52 page post on XDA trying to find someone with your same problem
I did pretty much exactly this on a Galaxy S1 (i9000) that was old even when I got it, but my uncle who gave it to me said that to make it usable I needed to install Cyanogenmod.
I thought I fully bricked the phone trying and it actually sat dormant for years afterwards until I re-found the Odin backups I had taken, and was able to fully fix and restore it. Unfortunately by that time, nearly no ROM existed that was both up to date and a usable speed.
deleted by creator
shutdown -h now on the wrong machine. Should have been “-r”. No IPMI but important enough to force me to drive to the office at night.
Ever since, I force myself to wait a couple seconds before sending any shutdown command, and tend to use reboot instead.
deleted by creator
I distrohopped once and wanted to try OpenSuse Tumbleweed. Would have went really well if I didn’t by accident deleted all my partitions…
I lost all of my curated music files I gathered over the span of the last 15 years.
I’ll never get those back.
Probably too late now lol, but you can totally recover deleted files if you don’t overwrite them. I recommend the System Rescue image, it has a lot of tools to deal with these things.
Deleting efi partition just because grub not updated yet… 😅
Butt stuff
Deleted my home folder 2 times because I wanted to rm -rf something inside my home and pressed enter too early
Once I omitted a semicolon after an “rm -rf”and the next command. The script was supposed to reduce downtime vs typing the commands manually, but instead it deleted the production site and the “.bak” backup of the site instantly.
Then you restored from the snapshot or backup you had right? Right?
This was hosted on bare metal on a file system that didn’t support snapshots. And the backup system? A state of the art tape drive. That’s why I was creating my own backup as part of the launch.
We recovered by using the staging site content.
Deleting my grub config instead of editing it. Fortunately that’s pretty easy to recover from, just annoying.
F’ed up installing graphics driver and had to reset everything from another TTY, also just annoying.
Chose the wrong permissions or path on a chmod call and locked out a big party of the system. I think that was during a setup though, so I just started from scratch again.
Was your project folder synced via nextcloud?? I had a similar issue arise with my projects folder being deleted and not in the trash bin etc, can only think nextcloud was the culprit as I had removed the folder from my server and default behaviour must be to replicate that removal locally.
Wiping out Windows trying to install Linux seems to be a common thing. Did that while trying to install Ubuntu as a teen.
Funnily, I didn’t check which Ubuntu iso I downloaded and ended up installing Ubuntu server. I should’ve noticed with the gui-less installer, but then I thought that it was just Linux being hightech.I have made countless mistakes since the 90s, mostly involving rm. The most recent one was yesterday when I was trying to rm files in a directory with lots of other unrelated files.
I don’t remember the exact failure, but I was shooting for something like
rm *lng
and typo’edrm *;ng
(those chars are next to each other on the kb). This happily rm’ed * (d’oh!) then errored on the nonexistance ng. :-(Yeah at this point I’ve aliased ‘rm’ to nothing and exclusively use ‘trash’.
In the past I’ve aliased rm to a wrapper that showed PWD and the files to be affected, slept a couple seconds in case I wanted to abort, then shredded smaller files, rm’ed big files, or placed in a Trash dir for certain kinds of files (.conf, .cfg, etc).
I might try to find or rewrite it.
That sounds great but I don’t want to keep the ‘rm’ muscle memory in case I’m on another computer and delete something important. Having to use ‘trash’ instead makes you more conscious when it errors out.
I was setting up fail2ban on an sftp server at work.
Guess who got
admin
permanently banned from that machine.I had a situation where I though my user was banned. I was troubleshooting an entirely different issue when it hit me. The Debian install was extremely corrupt. It was a restore from a snapshot but for some reason the snapshot was totally corrupted. I loaded a different snapshot and the machine worked fine.
The .ssh/authorized_keys was just gibberish in the bad snapshot
I once had grub and rEFInd installed on the same system and an Arch update hosed both. I was able to fix it with an Ubuntu LiveCD and went back to Ubuntu. I still use Arch in a VM as a treat.