Stupid things you've done that broke your Linux installation

Follow-up from “Dumbest Thing you have done distro-hopping?”.

Here’s mine - the laptop from which I’m typing right now has a broken touchpad that keeps jumping and clicking randomly, and does not work. Well, I can’t afford to fix it, but at the moment, I was so pissed off I punched the touchpad really hard, and the machine panicked with all the lights blinking. A few more revival abuses, and the machine was back to life, but since I was running a nixos-rebuild switch --upgrade in the background, I blew off my boot partition. I think I just broke the unbreakable distro.

kryllic,

I managed to bork my first Linux mint install by not paying attention to my permissions I was setting for a usb drive and basically locked myself out of the system and prevented it from booting into the desktop environment. Lesson learned, don’t copy/paste commands from StackOverflow and run them without thinking about what you’re trying to do

lordgoose,

I had a slightly screwed up Fedora install due to being a noob with an NVIDIA 1060 and little clue on their drivers. I hooked my laptop up to an old TV (720p if that tells you how old it is lol) and… my entire desktop got absolutely screwed up. Everything was stuck in 4:3 resolution for some reason and my icons got bloated (for lack of a better term). I tried to fix it but IIRC, it just got worse and I had to reinstall.

Joltey,

Mine would probably be: sudo apt install steam on Pop OS, it warned me I was about to delete essential packages but I went through with it and just like that my de was gone (I was still relatively new to Linux). Those who have watched the Linus Tech Tips linux challenge knows what I’m talking about

jernej,

Ran rm -rf /* insteas of rm -rf ./*

KISSmyOS,

Create an alias with:
alias rm=‘rm -i’

jernej,

I actually fixed that issue by writing a script that just moves sruff I want to delete to a folder (in my case TrashBin)

palordrolap,

If you're on a GNOME or GTK system, check if you don't already have the gio command. It has a trash subcommand that puts a file into the desktop trash/rubbish bin. It can also be used to resurrect files from there. gio help trash shows the usage.

You might even want to incorporate it into your existing script.

palordrolap,

It's not recommended to alias a command, especially a common one, to something that fundamentally changes the behaviour like this. The reason is that one day you might be on a different system - or a fresh install - that doesn't have the alias in place.

And suddenly files disappear without the now-expected prompt.

By all means set up an entirely different or unused command name. rmi might be ok, but then again, you could miss the i and still be in hot water.

The usual exception to this is aliasing commands like ls to include user preferences that only change output behaviour. On a different or fresh system, the worst that happens is the user doesn't quite see what they're expecting, but will see something close enough and no files go missing.

UdeRecife,
@UdeRecife@literature.cafe avatar

Early 2002. I read about Linux somewhere, and I was trying a Mandrake install. I also read about control+alt+Backpage, which eagerly proceed to try.

Now I’m on tty, cursor blinking, thinking: I broke Linux.

Scared, I cleverly undid that mistake by simply… reinstalling the distro. Ignorance is NOT bliss.

art,
@art@lemmy.world avatar

I separate my boot and home partition but often make my root not big enough to install the packages I need. I’ve done this so many times over the last 20 years you’d think I’d learn from my mistakes. Nope.

I’ll probably do it again the next time I do a clean install.

FractalsInfinite,

Running dd on the wrong partition on multiple occasions, wiping my OS

257m,

Ran yay in the background (forgot about it) and then a few minutes later closed my computer because I was all of a sudden at 100% cpu usage and I didn’t know what process was causing it and the easiest way to kill it would be too shut down the machine. I probably should’ve just opened btop and killed it but I was too lazy. I ended not being able to boot my computer for a few days untul some nice lemmy folk walked my through my first chroot rescue. It was a educational experience. Next time someone makes the same mistake I can help them out.

pineapplelover,

Wait how do you do a chroot rescue? I just updated my arch with kde computer and the login screen is frozen. I feel like it’s a kde issue from a gentleman I talked to on the Arch Matrix server.

gayhitler420,

boot the damaged system using a media with the chroot command, use it, do whatever is needed to fix the damaged system from inside it.

UdeRecife,
@UdeRecife@literature.cafe avatar

Not OP, but here’s how. You live-distro yourself to a running command prompt. You then connect to the internet, mount the partitions, finally chrooting to your computer’s storage install. Once there, you clear pacman’s lock from var and run a full update: pacman -Syyu. Wait until it finishes, exit chroot, reboot. 9 out 10 times works as expected.

257m,
rekliner, (edited )

In my first weeks with it i had a subdirectory named “home” somewhere in a project directory I was done with. It must have been finger memory but when i went to delete it I typed

rm -Rf /home

That slash ruined my day

KISSmyOS,

Protipp: Don’t ever create a directory called ~ anywhere.

bhamlin,

dd if=/dev/zero of=/dev/hda count=1 bs=4M; fdisk -l /dev/hdb

I ran that line a few times before I realized what I had done, and couldn’t remember the exact sizes of the old partitions…

chronicledmonocle,

So when I was more of a newb, I had a media server that I had a storage drive mounted in fstab using the /dev/ path, rather than the UUID. I had my main boot drive mounted as / and my storage drive mounted to /mnt/storage. The root drive was /dev/sda and the storage drive was /dev/sdb.

So this was stupid, but not nearly as stupid as what I did as a hack to work around a problem I had. Transmission Daemon would set the ownership of files to the user “transmission-daemon”, rather than my user account, so when I accessed files I downloaded via torrent over SMB. I was constantly having to chown the files to myself as sudo to fix them via SSH before I could manipulate them via SMB. There is a setting in transmission to change the UID/GID that it uses by default in the JSON configuration file, but I screwed with it for about an hour, couldn’t get it working, got annoyed, and gave up. I got so frustrated I just made a cron task that ran /5 minutes to chown the directory to nobody:nobody and chmod recursively to 777 permissions. When I moved the files after download they’d change to my user permissions when cut and pasting, so it was good enough for me until I could revisit it another day (which I never did until I reaped the consequences of my actions).

So here is how it broke: One day I needed to rewire my server to make room for additional storage. I accidentally, it seems, swapped the SATA cables for my boot and storage drive, which resulted in /dev/sda and /dev/sdb swapping places so that sdb was my boot drive and sda was my storage drive. My fstab then mounted /dev/sdb, my boot drive, to /mnt/storage, which was basically recursive infinitely. / was /dev/sdb, but if you went to /mnt/storage, you would then go /mnt/storage/mnt/storage/mnt/storage…and so on. And then the fireworks happened. My crontab script kicked off and since it was “chown -R nobody:nobody /mnt/storage/" and "chmod -R 777 /mnt/storage/” it immediately re-wrote all of the permissions of my root partition to have nobody as the owner and group permissions with all read/write permissions allowed. This broke…basically everything. And it was ext4, not ZFS or something, so I couldn’t roll back to a snapshot or anything. I spent 2 hours trying to fix permissions one directory at a time until I just gave up, reinstalled, and set things back up again from scratch. Since it didn’t touch my storage drive and I had an rsync backup to a second drive, I just eventually figured it was faster to fix my operating system/software by reinstalling and then re-mounting the drives.

I learned/was reminded of two things that day:

  1. Always use UUIDs for fstab mounts
  2. Don’t write stupid, hack scripts to work around a problem you’re running into that you leave for 2 years because you’re a lazy SOB.
kadu,
@kadu@lemmy.world avatar

I installed the Screaming Frog SEO tool on Ubuntu, using the official .deb.

Turns out it needed one specific lib that was no longer in Ubuntu’s repositories for the current release, just older releases.

So I downloaded and installed that lib manually. It completely broke Gnome, but in subtle ways, like the interface would still exist and work but icons would randomly glitch out and menus would vanish.

Honestly, I’ll take Windows’ duplicated DLL files over this mess every time.

andruid,

Flatpaks and containers really are the next step forward for reasons like this.

phoenixz,

Installing MySQL tungsten, or something like that. Uninstalled original MySQL which removed KDE and bye bye

One I sudo rm lib/ -rf in a project but accidentally typed /lib

captain_aggravated,
@captain_aggravated@sh.itjust.works avatar

I was messing around with pygame, it wasn’t working the way I thought it should, and I decided I was going to uninstall and reinstall Python just to see if that would help.

Apparently uninstalling Python is an unrecoverable stnank in Linux Mint; apt wouldn’t even work.

fernandu00,

Back in the day I had the idea to install Debian, but then for some reason I added a bunch of Ubuntu and other debian version sources in the sources.list to install some program I wanted … Can’t remember what happened but I do remember having to install the OS again … Ubuntu this time

  • All
  • Subscribed
  • Moderated
  • Favorites
  • random
  • uselessserver093
  • Food
  • [email protected]
  • aaaaaaacccccccce
  • test
  • CafeMeta
  • testmag
  • MUD
  • RhythmGameZone
  • RSS
  • dabs
  • oklahoma
  • Socialism
  • KbinCafe
  • TheResearchGuardian
  • SuperSentai
  • feritale
  • KamenRider
  • All magazines