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.
deleted by creator
I once just uninstalled
sudo
and replaced it withdoas
. Turns out, the shutdown process needs sudo and a lot more. So I am still using my system since then, without shutting down.No joking, I use Fedora Atomic and can not break my system… unless you mess up your dotfiles, and a lot more.
I also put a drive into my
/etc/fstab
once without thenofail
argument.No idea why that is not set by default, but when removing that drive my system couldnt boot and I exited to a very scary dracut shell.
Wait … you can uninstall sudo?
Wait till you find out that you can even uninstall Linux!
Ha… and then what, install… Windows?
did you know you can use debian on the freebsd kernel
I did not.
-
have an nvidia GPU
-
have Fedora
-
download RPM package of drivers for Red Hat (after all, Fedora and Red Hat are… compatible, right?)
-
Everything goes fine
-
Six months later, upgrade to a new version of Fedora
-
oops, kernel panic at boot after the upgrade, and no video to troubleshoot after UEFI boot
-
figure out how to boot into a recovery partition from UEFI
-
figure out how to enable a serial console over a USB device
-
figure out how to connect to the serial console from another computer using another USB device
-
figure out what the kernel panic is from (not the upgrade, but the driver which wasn’t upgraded)
-
figure out how to uninstall the incorrectly installed driver
-
figure out how to install the correct driver
That was a fun three week OS upgrade.
I have a super-n00b question, and I apologize in advance, but, uh…yeah, what is a serial console?
You attach a secondary computer via serial (COM port) with your primary computer and then you can open a console on that one. You can access the primary computer as if you would be sitting in front of it.
You probably have to explain what Serial actually is.
I mean serial is just a port that runs in serial. You send something and you receive something afterwards, after you’ve received you can send again…
Not all people know that, to be fair.
True. It’s not quite common nowadays unless you work in administration or are an enthusiast.
Tl;dr: Stick in a USB cable and the other side gets your console.
-
Wanted to customize GRUB and tried the GUI program. I wanted it to boot without delays unless a key is being held, and also add a “Shutdown” option (GRUB script
halt
), in case I open the laptop and didn’t want it turned on. The edits looked alright in GRUB Customizer but I should not have made them both at once, because it made “Shutdown” the default option somehow, so the OS would never boot and holding none of the special keys worked. I failed to update or reinstall GRUB using a live USB and ended up having to reinstall the entire distro.Can’t remember exactly what happened but it involved changing permissions on
/bin
/sbin
and similar. You know for security …In the end I didn’t have permissions to run
chmod
,su
orsudo
Fortunately there is little that can’t be fixed by booting from a live image.
I’m not sure anymore how I got into a state where that was necessary, but do keep a reference around for how to boot Linux or Windows from the Grub command line.
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.
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
ntfsclone /dev/sdc /dev/sdb
/dev/sdb was a blank filesystem and /dev/sdc was my Windows filesystem.
It ran for less than a second and didn’t take me long to figure out what happened. That’s the story of how I stopped using Windows.
Damn that’s the equivalent of going cold turkey.
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.
Always do an echo first before you put rm in a script. You know the story.
I have a story that most of here might have faced. I ran dd on my external drive instead of my usb stick to create an iso. 1.8TB of data poof.
Lession learned: always unplug your important stuff, before you do disk operations.
Happens to everyone at least once.
Just recently I have skill issue’d myself by doing
git clean -rf
in my home directory where my dotfiles live and therefore deleted all of my home files. I was tired and looked for a quick way to resolve my conflicts and made the stupidest mistake one can do: execute a command you do not really understand.At least I know what it does now and now I also do hourly local backups of my files with cron and borg.
Btw you can just use
rm -rf bin
So you can’t forget the dot or put a space between
./
or after the slash.My biggest fuckup that I can remember was when I ran out of disk space and thought that the /var directory contained only unimportant things that will be recreated automatically. Oops, bye bye rpm database.
Trying to add my user to wheel: sudo groupmod -a wheel Deleted my group membership in everything but wheel. That was fun! Remote system too! Edit: I still don’t remember the syntax. Geez.