What has been your most painful Linux experience?
I once found a folder in my system that was named ~. Yeah! literally named "~". I have no idea why it was in my system. I think I found it in the .cache directory and decided to remove it so I opened up a terminal in that directory and run the command rm -rf ~ and then BOOM! GAME OVER! Luckily, thanks to my dotfiles repo I was able to quickly restore my home directory.
I was so used to typing rm -rf instead of just rm -r ... After the incident, I added the alias rm='rm -i' into my .bashrc so that I can be sure what the heck I'm removing.
About this post
- Posted
- Archived
- Score
- 196 · 97% up
- Kind
- Text
- ID
- 122wpva
193 comments
My most painful experience was learning what happens when you don't get
if=andof=right indd.I once destroyed about 3 years of game and web servers from that exact mix-up. About 2 years later I was messing with my new proxmox install and accidentally wiped the entire drive once again. But this time, I had everything back up and running by the end of the night with less than 3h of stuff lost. Backups. They're nice. Do them.
You know what's extra nice? Finding old backups. I found a 15 year old backup. Fun to see what i thought was important back then.
X j
Truly a classic rite of passage for any young linux user.
I accidentally of=/dev/sda instead of a flash drive once... On my work PC.
gg reinstall.
Painful! and embarrasing I'm sure.
I had that happening to my Windows to Go drive before.
Nowadays with Linux it’s usually /dev/nvme0n1 so it becomes harder to accidentally wipe my internal drives.
Remember to check your /dev/sd* numbers twice or more
More better: study the listing from lsblk to be sure you have the right drives.
Deleted before we saved it.
ifandofwere terrible name choices, considering they're common English words. But noooo they have to stand for Important File and Obliterate FileI remember it being the opposite order of another command I was using a few seconds before it years ago and it burned me hard.
Yeah,
ddis the one tool that I read, re-read, and read again to make sure that it’s right.I had to deal with that earlier this month because I was copying an Arch install from a USB stick to a hard drive. Thankfully I caught it early, as it only damaged the primary GPT and the bootloader. I still needed to completely reinstall GRUB and reconfigure the GPT, though...
Hehe, mine was when I typed /dev/sda instead of the actual flash drive. I was trying to make a bootable flash drive with MeeGo (that was back in 2011). After I lost my system I was thinking - well, at least I'll look at MeeGo on my main machine instead. But it didn't boot :D
Thankfully it was relatively fresh, so I didn't lost any important data. Just had to reinstall OS
Classic DiskDestroyer
Not to offend or attack you, but I really don't understand how that can be messed up,
ifis "input file" andofis "output file".It's not the knowing that's the problem; it's the connection between the brain and the fingers.
Look at where the I and O keys are placed on a standard QWERTY layout.
Others:
Working on a project for 12 hrs and then accidentally deleting it, without a backup. (not a good way to impress your supervisor)
Performing destructive actions in a chroot, when you're really not.
Using ssh to execute commands remotely, only to discover you did some of them on the local host.
Copying hundred of valuable files over, and deleting the source, before double checking everything got copied over.
I've developed a few habits helping me too work safely in such an environment:
Edit: typos.
Great ideas. I esp like your rsync pointer! Tks
I admit, this made me wince
Be a 13 year old kid.
Pay $100+ for ordering Red Hat Linux 6-CD box-set via phone from the USA, because your country only has upto 56kbps internet connections that are priced as you use it and you tried downloading an .iso but it got to 20% in hours, then failed, and it ended up in a huge telephone bill and some scolding from parents.
Get the box in the mail after more than a month later. Read up and try installing it. Succeed, but fail to get Internet to work over an entire weekend. Play games and draw pictures using apps that are included in KDE and Gnome in the Red Hat distro CDs.
Cannot boot into Windows, family PC is useless now.
Spend the next weekend trying to fix it, and miraculously it is solved. A floppy disk obtained from a university was involved in the process.
Forget about Linux until 19 years later.
At least the cool Red Hat stickers that came with the box were nice and useful.
It was difficult to get Linux connected to the internet with a modem back then. So many PC’s had a “winmodem” that only worked in Windows. I remember trying a bunch of distros before figuring that out. I eventually bought an external modem and got it to work.
Winmodems were the bane of my existence. Even under Windows they were crap, and even worse when your phone line was crap. Crappy things stacked.
The day I got broadband was the day I felt the biggest relief.
Let's put it this way, I can tell you first hand that the early 90s greybeards were not kidding when they warned to triple check the correct values for your XFree86 config file. RIP NEC Multisync, you died too young.
what did you set wrong?
Got millivolts and volts mixed up?
Invalid modelines configuration if memory serves. This was back when there was much less in the way of sanity checking.
Ooft
Not mine, but this was a very painful read: https://blog.mnus.de/2023/03/archlinux-zfs/
Yeah I run LTS kernel to avoid things like this, but it's not bulletproof.
I just don't use dkms anymore and instead wait for kernel compatibility with the zfs module
What's even more painful is the author still gets it wrong. They downgrade to 6.2.7. At the moment ZFS is only officially supported on kernels up to 6.1. The DKMS build process evidently succeeds for 6.2.7 but that does not mean that all ZFS features will behave as expected. And just because it seems to work fine doesn't mean there aren't silent failures that are happening under the hood that don't manifest until say you scrub or you lose a disk and try to resilver.
If you're going to use ZFS on Linux you should never upgrade the kernel past the version officially supported by ZFS
Dumb question. But why not rollback to a previous snapshot when that happens and hold the kernel version? At least, that's what I do.
It's mentioned at the bottom of the page (snapshots are not bootable afaik), but previous kernel would have helped:
Seems to be arch-specific.
Keeping old kernels around for a version or two would be nice. A kernel update deletes the old modules and if I plug in sone device the kernel can't load the modules forcing a reboot.
You can use this pacman hook so that old modules survive a kernel update https://github.com/saber-nyan/kernel-modules-hook
My most painful Linux experience is reading this subreddit regularly.
Other than that, I tried to do a persistent install of Debian to a USB stick. That's why I use Arch, in fact.
As someone who hasn’t tried the persistent install, what happens?
you get a debian system with persistence on a USB stick if you do it right. =D
Left
sshdrunning on a machine connected directly to the internet (modem in bridge mode, soeth0got a valid IP address straight from the ISP instead of 192.168.xxx.yyy), with weak passwords.Only realized my mistake when I was banned from an IRC server due to being part of a botnet.
But did you not have an ssh password or key?
Only a very weak password and a common username.
This is why I never install an SSH server. It's a huge security hole!
No, it's not. Weak passwords are huge security hole.
Nvidia drivers
Same. They were a pain to setup, especially the proprietary ones. I think I fixed it with nvidia dkms, because I didn't know how to enable nvidia kernel drivers manually in the initramfs or kernel parameters.
This was my main issue with my archlinux installation on my nvidia gpu laptop, before archinstall script was an official thing. I did the installation manually. Now it's easier than ever with archinstall script built-in the iso, but it was a great learning experience for learning how kernel modules / drivers work.
Yep. I literally had to get a new workstation at my job because the one I had was an ancient iMac with an nVidia GPU, and the proprietary driver couldn't display post + ttys, and the open source driver developed a bug that would cause LibreOffice and a few other applications to randomly hard lock the machine.
Had an nVidia GPU in my home desktop for a while, learned to cross my fingers and pray to the computer gods whenever I saw a kernel or driver update when running pacman -Syu.
Jup. Been there done that. "Why is this ~ directory here? Let me delete it." "Wait why is it deleting things in my homdir? Was that a symlink? ... Ah no, shit!"
I also was playing around with coding in python back in the day on my Ubuntu system. I started with a bit of python2 but soon thought "Python 3 is the future so let's use that." Then I thought: "Well not using Python 2 for my coding any more, so let me uninstall it. But I don't want any clutter, so let's purge it even" Well, that was back when python2 still was a heavy system dependency, I realized my mistake when my desktop was being removed. :D Gave me a reason to distro-hop.
My most painful Linux experience is trying to teach people that have no idea what they're talking about parroting memes like they're irrefutable truths eg systemd bad, where linux, arch breaks all the time, etc.
Trying to shut down my local box with shutdown -h now, but not realizing I'm in the terminal window that is logged into the server at work at a root prompt.
During COVID, when getting into the office was a PITA to say the least.
Without remote management, because management wouldn't pay for a server with it.
Isn’t BMC or KVM standard?
Not if you're using old Xeon based workstations as servers...
Trying to parse the arch wiki was a very painful, irritating experience for me at the start. Yeah, there's tons of information, but it's all "to do X, do this.." with no indication or advice on whether you SHOULD do x, especially boot loader, encryption setups.
Grub
"This world shall now know pain"
This might be heresy 'round these parts, but I really like
systemd-bootpersonally. It's nice and simple, does what I need it to, and hasn't ever broken for me at least. :)I'm using refind as my bootloader. It might not be the best, but it's easy.
When I first encountered Linux back in 2006, I installed Kubuntu 6.06 on my machine. I was amazed by its looks, but right after that I was very dissapointed, because back in the day playing MP3 music was PITA to configure.
I was a kid back then, so I had a ton od time to make it work, but man, the feeling of dissapointment, and then of hardly making it work was a great pain.
Finally I made it work, so in the end there was a great relief, but I wouldn't repeat it again in the same situation now.
Ahh, I remember the good ol' days when ALSA was in its infancy and sound cards were a thing. I spent way too much time trying and failing to make my Sound Blaster work with Debian circa 1999.
Sound Blaster. Memory unlocked!
Screwing up Arch installs. Man, how frustrating that time was. I know it's blasphemous to say this around here, but what helped me the most at the beginning was watching installs on YouTube. I then went to the Wiki and had a better understanding of each process since I already had a reference point.
I've never had any catastrophic issues with rm or dd like many of you. Everything has always been great for me.
RPM Hell... back in the days of Linux 2.4 & 2.2, and Win-modems & early sub-768k DSL and such
As someone who did a lot of technical work back in the day, I still shudder when I hear the name Conexant.
RPM hell aint no thing compared to DPKG hell IME. Yum was painfully slow, but at least the
yum historyfunctions likeyum history undo lastcan help when figuring out what broke what. I even prefer SuSE'szypperfront-end toapt. I had a WSL instance of Kali Linux running for work and the Python transition from 2 to 3 broke both apt and dpkg somehow. Ended up switching to Arch WSL and adding the repo for ArchStrike.I tried to install windows on a separate drive. I booted windows installer, i selected the correct drive (yes i checked many times to assure myself in the cmd). And i just installed it to the drive. It went smooth but my 4TB luks drive, containing all my data was magically wiped. When i reviewed the damage all that was left was a 100M efi partition and a wiped drive with destroyed luks header. That was nice :')
There's some value in removing drives that aren't needed in the installation process. :-)
i learned that the hard way.
There's no place like home.
I'm not sure if it counts here, but I managed to mindlessly ran chmod on root once.
My encrypted flash drive I stored years of work on corrupted itself and had to be reformatted. I didn't back any of it up. I lost it all, except what things I had sent to others in emails.
Having to edit X config was always a bad time.
Being forced away from it for a week . Damn near killed me.
I'm not positive, but I think the -f option overrides the -i option for rm. I aliased rm = rm -i a long time ago, but I still delete stuff all the time with rm -rf and never go through an interactive prompt.
I think it does. -f is short for —force, which typically bypasses any interactive prompt.
whatever you do... don't try to rescue drives from a qnap nas with linux. just buy another one and use that.
i lost many hairs that day trying to get their lvm thin kernel module to compile
in 2018 i started using linux, i chose lubuntu for a decent machine, it worked fine until when installing "x package" it installed all gnome, and when i deleted "x package" it uninstalled all my graphical interface, leading a novice person to reinstall everything from a live USB (This happened to me 8 times before I realized that ubuntu is not something for me). After a while I launched into archlinux and everything is so simple that I can't use anything else, for now. I think the worst thing that happened to me with arch was not being able to access my laptop anymore :p, it happened that I was using "ly" as login manager and I changed to fish and I suppose that it failed when executing the script and didn't get past the login, now 2 Years later, I could simply get into the tty, uninstall ly and do "startx", but things are learned with time :D
When spectre and meltdown just came to light, a bunch of tools to test if your system was vulnerable started to show up. I tested one and for some reason it completely corrupted my ESP partition. Didn't discovered that after I tried to start my rig again and it wouldn't boot. Had to take out the good ol' arch usb.