Tinkering is all fun and games, until it’s 4 am, your vision is blurry, and thinking straight becomes a non-option, or perhaps you just get overly confident, type something and press enter before considering the consequences of the command you’re about to execute… And then all you have is a kernel panic and one thought bouncing in your head: “damn, what did I expect to happen?”.

Off the top of my head I remember 2 of those. Both happened a while ago, so I don’t remember all the details, unfortunately.

For the warmup, removing PAM. I was trying to convert my artix install to a regular arch without reinstalling everything. Should be kinda simple: change repos, install systemd, uninstall dinit and it’s units, profit. Yet after doing just that I was left with some PAM errors… So, I Rdd-ed libpam instead of just using --overwrite. Needless to say, I had to search for live usb yet again.

And the one at least I find quite funny. After about a year of using arch I was considering myself a confident enough user, and it so happened that I wanted to install smth that was packaged for debian. A reasonable person would, perhaps, write a pkgbuild that would unpack the .deb and install it’s contents properly along with all the necessary dependencies. But not me, I installed dpkg. The package refused to either work or install complaining that the version of glibc was incorrect… So, I installed glibc from Debian’s repos. After a few seconds my poor PC probably spent staring in disbelief at the sheer stupidity of the meatbag behind the keyboard, I was met with a reboot, a kernel panic, and a need to find another PC to flash an archiso to a flash drive ('cause ofc I didn’t have one at the time).

Anyways, what are your stories?

  • Binzy_Boi@lemmy.ca
    link
    fedilink
    arrow-up
    18
    ·
    8 months ago

    Perhaps not the same definition of “broken” that you’re looking for, but when I first started using Linux, I was using Kubuntu as my first distro have some brief experimenting with Manjaro.

    Anyway, back then, I for some reason had the Skype snap installed. Can’t recall why I had it to begin with, but I decided later on that ofc I didn’t need Skype, and of course uninstalled the snap.

    A few days later, I was met with some storage issues, where I had a limited amount of storage left on my SSD. I’m sitting there a little confused since I swore I was using less storage, but I did a thorough cleaning of my computer by deleting files I didn’t necessarily need, and uninstalling any programs that I hardly ever used. That seemed to do the job, even if it was less storage space…

    Until the next day, when the storage was full again. After getting some help from someone, I found that Skype, despite being uninstalled, was still running in the background, and found that there were residual files. The residual stuff running in the background was trying to communicate with what I had uninstalled, and logged multiple errors per second in a plaintext file that ended up being 176GB.

    Whether I did something wrong or if there was something up with the snap, I still don’t know as this was over a year ago and I was still learning the ropes of Linux at the time.

    • Petter1@lemm.ee
      link
      fedilink
      arrow-up
      4
      ·
      8 months ago

      I agree in blaming Snap for that 😂 good ol apt would have done a better job, I guess.

      • Turun@feddit.de
        link
        fedilink
        arrow-up
        3
        ·
        8 months ago

        I had this problem before as well. Something was spamming log messages and filled up the boot drive. No snap needed.

    • nyan@lemmy.cafe
      link
      fedilink
      English
      arrow-up
      3
      ·
      8 months ago

      I would blame Skype itself for being a corporate-owned closed-source flaming pit of doom in this case, not your actions or the snap.

  • devnull406@lemmy.world
    link
    fedilink
    arrow-up
    13
    ·
    8 months ago

    Connect via ssh to my home server from work

    Using a cli torrent client to download stuff

    Decide I need a VPN.

    Install VPN again from CLI

    Run VPN which disconnects my ssh connection

    Even when I get home, the server is headless so I have to locate a keyboard and mouse before I can fix.

    • fl42v@lemmy.mlOP
      link
      fedilink
      arrow-up
      2
      ·
      8 months ago

      Dang, similar stuff happened to me on nixos. Had to instruct one of the relatives on how to reboot the machine and choose a previous generation in the boitloader 🤣

  • papertowels@lemmy.one
    link
    fedilink
    arrow-up
    12
    ·
    8 months ago

    Not strictly Linux related, but in college I was an IT assistant. One day I was given a stack of drives to run through dariks boot and nuke.

    I don’t remember exactly what happened, but I think midway through, my laptop shut off.

    Guess who picked the wrong drive to wipe with DBAN :)

  • evatronic@lemm.ee
    link
    fedilink
    English
    arrow-up
    12
    ·
    edit-2
    8 months ago

    sudo rm -f /lib /usr/share/backup/blah blah.tar.gz

    Note the space.

    • martinb@lemmy.sdf.org
      link
      fedilink
      arrow-up
      2
      ·
      8 months ago

      Top tip, if tired, replace the rm -f part of the command with something innocuous for a first run. Actually, is better to do this mistake once so that the two important lessons are learned… Backup (obviously, in your case it was backups, but the point still stands) and double check your command if it has potential for destruction 👍

      • evatronic@lemm.ee
        link
        fedilink
        English
        arrow-up
        7
        ·
        8 months ago

        Oh no, this was back in the days when we loaded our distros by way of a stack of floppy disks.

  • Adanisi@lemmy.zip
    link
    fedilink
    English
    arrow-up
    11
    ·
    edit-2
    8 months ago

    Writing and running a script to delete the first 2 characters from all files and folders recursively.

    It started backtracking to my home folder. :/

  • MTK@lemmy.world
    link
    fedilink
    arrow-up
    11
    ·
    8 months ago

    sudo apt autoremove

    Who ever made this shit and then decided to always show you this message that you should do it. What a dick

  • Mahonia@lemmy.world
    link
    fedilink
    arrow-up
    11
    ·
    edit-2
    8 months ago

    I set up 2FA via a hardware security key (a yubikey) for login, sudo etc. I then tried to switch security keys, removing the old pam files and adding a new one. But I didn’t tidy the pam files up before logging in, and there was effectively no way to log in, since editing the pam files required sudo access to edit in the first place. So basically the whole system required access to a pluggable authentication module that it no longer had any ability to recognize. It was honestly pretty funny. I did manage to recover my data by booting from a live system and decrypting my drive from there.

    I’ve also accidentally removed my desktop environment twice while trying to update Python versions and then cleaning up old packages, but that’s kinda not that big deal and is just a facepalm moment.

  • krimson@feddit.nl
    link
    fedilink
    arrow-up
    10
    ·
    edit-2
    8 months ago

    Many many years ago I wanted to clean up my freshly installed Slackware system by removing old files.

    find / -mtime +30 -exec rm -f {};

    Bad idea.

  • AnthropomorphicCat@lemmy.world
    link
    fedilink
    arrow-up
    9
    ·
    8 months ago

    One day on my main Arch installation I created a container inside a directory, and “booted” into it by using systemd-nspawn. When I was done with it I decided to do a rm -rf / inside the container just to be funny. Then I noticed that my DE on the host froze and I couldn’t do anything. Then I realized that systemd-nspawn mounts some important host’s directories on the container, and I deleted those when I did the rm -rf /. I didn’t lose anything, but it was scary.

  • Dandroid@dandroid.app
    link
    fedilink
    arrow-up
    9
    ·
    8 months ago

    It was my first time using a Linux GUI. I was comfortable with CLI, but it was my first time having it installed on a laptop instead of just sshing into a server somewhere.

    So naturally, instead of learning how the GUI worked, I tried changing it to be exactly like Windows. I was doing things like making it so I could double click shell scripts and other code files and they would run instead of opening them up in an editor. I think you see where this is going, but I sure as hell didn’t.

    Well, one of my coworkers comes over and asks me to run this code on this device we were developing. We were still in the very early stages of development, we didn’t even have git set up, so he brought the code over on a USB stick. I pop it into my laptop. I went to check it once by opening it in an editor by double clicking on it… Only it ran the code that was written for our device on my laptop instead of opening in an editor.

    To this day, I have no idea what it did to fuck my laptop so bad. I spent maybe an hour trying to figure out what was wrong, but I was so inexperienced with Linux, that I decided to just reinstall the OS. I had only installed it the day before anyway, so I wasn’t losing much.

  • stinerman [Ohio]@midwest.social
    link
    fedilink
    English
    arrow-up
    8
    ·
    8 months ago

    I’ve literally done the rm -rf / thing. I thought I was in a different subdirectory, but I was in / and did rm -rf .

    When it didn’t return after half a second, I looked at the command again and hit CTRL+C about 20 times in the span of 3 seconds.

    I had to rebuild the install, but luckily didn’t lose anything in /home.

  • HuntressHimbo@lemm.ee
    link
    fedilink
    arrow-up
    8
    ·
    8 months ago

    So I am sort of an embedded developer, and I like to mess around with weird configurations. So the craziest experiment I did was trying to reflash a rasberry pi from a system running in the pi’s RAM. It honestly might have worked, but during the prep work I forgot to resize the filesystem before mucking with the paritions and had to reflash the normal way before I could try again. Ended up just turning it into a pihole instead, but I still learned a lot about pivot_root

  • HotChickenFeet@sopuli.xyz
    link
    fedilink
    arrow-up
    8
    ·
    edit-2
    8 months ago

    Installed python3 before it was made the native python on the dist. Half broke everything, including apt & python. So I uninstalled it, and then everything was broken. Finally got python3 reinstalled, and lived with it kindof working & awful distribution updates.

    I have finally freed myself of that prison last month, by nuking everything and starting fresh.

    • martinb@lemmy.sdf.org
      link
      fedilink
      arrow-up
      3
      ·
      8 months ago

      You can have both python 2 and 3 on the system. It just depends upon which is the default as to how much you break it 👍 The symlink to /usr/bin/python is the important bit for most software. For deb-based at least, update-alternative is your friend.

      • HotChickenFeet@sopuli.xyz
        link
        fedilink
        arrow-up
        2
        ·
        8 months ago

        I’ll happily say I must have overlooked something, but I did try using update-alternatives. I don’t remember all the nuts and bolts from the start, but it involves python3 and distribution upgrades. I spent a good number of nights over the years trying to unmess it up, and am happy to never think about it ever again.

        • thedevisinthedetails@programming.dev
          link
          fedilink
          arrow-up
          3
          ·
          8 months ago

          There was definitely a time when python3 was not recommended and plenty of scripts weren’t yet differentiating between the two. Everything was breaking back then.