What's (are) the funniest/stupidest way(s) you've broken your linux setup?

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?

krimson, (edited )
@krimson@feddit.nl avatar

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.

jordanlund,
@jordanlund@lemmy.world avatar

Not me, but one I saw… dude used chmod to lock down permissions across the board… including root… including the chmod command.

“What do I do?”

🤔

“Re-install?”

fl42v,

Yeah, a very unfortunate one: probably, the most painful to recover from. I’d just reinstall, honesty 😅 At least with mine I could simply add the necessary stuff from chroot or pacstrap and not spend a metric ton of time tracking all the files with incorrect permissions

Kjev,
@Kjev@discuss.tchncs.de avatar

oh… uh…

cmnybo,

I managed to do that back when I was new. Luckily it was a fresh install, so I didn’t lose much when I had to reinstall.

So far, that has been the only time I really screwed something up outside of a virtual machine.

elkalbil,
@elkalbil@jlai.lu avatar

You could boot on an USB, mount the filesystem and change the permissions. But if the dude changed a whole lot of permissions, reinstalling might be the smart thing to do…

captainjaneway,
@captainjaneway@lemmy.world avatar

There’s got to be other tools though that could change the file permissions on chmod, right? Though I suppose you’d need permission to use them and/or download them.

fl42v,

You can dump the permissions from the working system and restore them. Quite useful when working with archives that don’t support those attributes or when you run random stuff from the web 😁

jws_shadotak,

Not quite catastrophic but:

I’m in the process of switching my main server over from windows to Linux

I went with Deb 12 and it all works smoothly but I don’t have enough room to back up data to change the drive formats so they’re still NTFS. I was looking at my main media HDD and thought “oh, I’ll at least delete those windows partitions and leave the main partition intact.”

I found out the hard way that NTFS partitions can’t just reclaim space like that. It shuffles all the data when you change the partition. It’s currently 23 hours into the job and it’s 33% done.

I did this to reclaim 30 MB of space on a 14 TB drive.

fl42v,

You mean you’ve removed the service partitions used by windows and grown the main one into the freed space? Than yes, it’s not the way. 'Cause creating a new partition instead of growing the existing one shouldn’t have touched the latter at all :/

avidamoeba,
@avidamoeba@lemmy.ca avatar

Tried to convert Ubuntu to Debian by replacing the repos in sources.list and apt dist-upgrading. 💣 Teenagers…

glibg10b, (edited )

Before installing Arch on a USB flash drive, I disabled ext4 journaling in order to reduce disk reads and writes, being fully aware of the implications (file corruption after unexpected power loss). I was confident that I would never have to pull the plug or the drive without issuing a normal shutdown first. Unfortunately, there was one possibility I hadn’t considered: sometimes, there’s that one service preventing your PC from turning off, and at that stage there’s no way to kill it (besides waiting for systemd to time out, but I was impatient).

So I pulled the plug. The system booted fine, but was missing some binaries. Unfortunately, I couldn’t use pacman to restore them because some of the files it relied on were also destroyed.

This was not the last time I went through this. Luckily I’ve learned my lesson by now

Kjev,
@Kjev@discuss.tchncs.de avatar

Somehow convinced a person to run sudo chmod -x /usr/bin/*

I don’t remember the exact command so it could be a bit different but it did the job. It was a fun evening.

avidamoeba, (edited )
@avidamoeba@lemmy.ca avatar

An intern nuked their workstation by sudo chmod -R 777 /. Turns out adding exec to everything isn’t good either.

fl42v,

Daaem, I guess the poor dude at the receiving end did not consider it particularly fun. Well, at least they had sbin working, so probably possible to recover without a live cd. Huh, guess who’s now spinning up a VM to check it out 🤣

fhein,

I have a stupid one, but far from funny… I’ve been using and building computers for a very long time so I’m far from a noob, but I’m still quite cautious, bordering on paranoid, so I like to unplug all other drives when re/installing an OS just to avoid stupid mistakes. I go through the installer on the livecd, there’s only one drive to choose from so I don’t think much about it, select that it should erase everything, I set up the new partition structure, and start the process. After about a minute I begin wondering “why is it taking so long?”, and “what is that ticking noise? SSDs shouldn’t be making any sounds when written to”, when I realize that I had unplugged the wrong drives and that I was currently overwriting my main storage drive. Of course I had backups of the most important things like photos and code, though not really synced for a couple of months so I lost some stuff permanently.

escapedgoat,

ran chown -R www-data: ./ from /var instead of /var/www.

glibg10b,

I wanted to use fio to benchmark my root drive. I had seen a tutorial saying that the file= parameter should point to the device file, so I pointed it at /dev/sda. As you might expect, the write test didn’t go so well.

d950,

When Ubuntu 16.04 had just been released, I tried upgrading my 14.04, the whole system broke and I had to install another os (Manjaro won).

That day I learned Ubuntu too can be a bit stupid.

Static_Rocket,
@Static_Rocket@lemmy.world avatar

This is where someone tracks down an upgrade path chart you didn’t know existed and points out some goofy intermediary release, not an lts for some reason, that you were supposed to upgrade to first…

topperharlie,

One that I can remember many years ago, classic trying to do something on a flash drive and dd my main hdd instead.

Funny thing, since this was a 5400rpm and noticed relatively quick (say 1-2 minutes), I could ctrl-c the dd, make a backup of most of my personal files (being very careful not to reboot) and after that I could safely reformat and reinstall.

To this day it amazes me how linux managed to not crash with a half broken root file system (I mean, sure, things were crashing right and left, but given the situation, having enough to back up most things was like magic)

raoul, (edited )
@raoul@lemmy.sdf.org avatar

First, the classical typo in a bash script:

set FOLDER=/some/folder

rm -rf ${FODLER}/

which is why I like to add a set -u at the begining of a script.

The second one is not with a Linux box but a mainframe running AIX:

If on Linux killall java kills all java processes, on AIX it just ignore the arguments and kill all processes that the user can kill. Adios the CICS region 😬 (on the test env. thankfully)

fl42v,

Wow, the last one is quite unexpected. What a useful command

msmc101,

First time trying Linux I went with an arch install because I Googled “best version of Linux” and went with arch. Followed a guide to the point of drive formatting and I decided to go with a setup with drive encryption. I didn’t understand what I was doing, ended up locking myself out of my hard drives and couldn’t get windows to reinstall on them. I used a MacBook for a week until I installed Ubuntu and managed to wipe and reset my drives and reinstalled. Needless to say I am going to read up a little more before I try that again.

jerrythegenius,
@jerrythegenius@lemmy.world avatar

I once deleted the network system in alpine. I’d been having some trouble with with the default one (I think wpa_supplicant) so I decided to try the other one (I think iwctl). But I thought that there might be problems with havung both of them so before I installed iwctl I deleted wpa_supplicant (thinking that it was more of a config utility than the whole network system), only to find that I couldn’t connect to the internet to install iwctl.

BlueEther,
@BlueEther@no.lastname.nz avatar

I’ve broken systems far too many times in the last 24 years, since Mandrake 6.x, to count:

  • I’ve dd a disk or more
  • I’ve rm *
  • I’ve chmod
  • I’ve brought down the network, with every intention tar it would come back - on a remote box
  • I’ve failed to RTFM far too many times
  • All
  • Subscribed
  • Moderated
  • Favorites
  • linux@lemmy.ml
  • localhost
  • All magazines
  • Loading…
    Loading the web debug toolbar…
    Attempt #