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?

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)

Ozy,

after reading what “set -u” does, bro this should be default behavior, wtf?

fl42v,

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

NaibofTabr,

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.

jfc, is ignoring arguments the intended behavior?

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

Yes: same command name, two different semantics:

AIX man page

The Linux one

Cross-Unix scripting is fun ☺️

aard,
@aard@kyu.de avatar

On a real UNIX (not only AiX) killall is part of the shutdown process - it gets called by init at that stage when you want to kill everything left before reboot/shutdown.

Linux is pretty unique in using that for something else.

raoul,
@raoul@lemmy.sdf.org avatar

I didn’t know that, good to know.

They could have send a SIGTERM by default instead of a SIGKILL. I would not have corrupt everything 😅

aard, (edited )
@aard@kyu.de avatar

killall typically sends SIGTERM by default. It accepts a single argument, the signal to send - so shutdown would call it once with SIGTERM, then with SIGKILL. killall is not meant to to be called interactively - which worked fine, until people who had their first contact with UNIX like systems on Linux started getting access to traditional UNIX systems.

It used to be common to discourage new Linux users from using killall interactively for exactly that reason. Just checked, there’s even a warning about that in the killall manpage on Linux.

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 :/

jws_shadotak,

Yes, I grew the existing one. Lesson learned I guess. 30.5 hours into it and it’s at 41%.

INeedMana, (edited )
@INeedMana@lemmy.world avatar

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?”.

Nah, that’s when the fun really starts! ;)

The package refused to either work or install complaining that the version of glibc was incorrect… So, I installed glibc from Debian’s repos.

:D That one is a classic. Most distributions don’t include packagers from other distros because 99% of the time it’s a bad idea. But with Arch you can do whatever you want, of course

My two things:

  • I’ve heard about some new coreutils (rm, cp, cat… this time the name really fits the contents :D) and I decided to test it out. Of course it was conflicting with my current coreutils package and I couldn’t just replace it because deleting the old package would break requirements. So without thinking I forced the package manager to delete it “I’ll install a new one in just a second”. Turns out it’s hard to install a package without cp, etc :D
  • I don’t remember what I was doing but I overwrote the first bytes of hdd. Meaning my partition table disappeared. Nothing could be mounted, no partitions found. Seemingly a brick.
    Turns out, if you run a rescue iso, ask it to try and recognize partitions and recreate the table without formatting, Linux will come back to life as if nothing happened
fl42v,

Nah, that’s when the fun really starts! ;)

Well, on the upside, it definitely works better than coffee or energy drinks :D

Also, nice save with the last one!

wahming,

Funny, that’s when I give up for the night and go to sleep

halfway_neko, (edited )
@halfway_neko@lemmy.dbzer0.com avatar

Deleted my entire efi partition while trying to install some grub themes.

And then my backup didn’t work when I tried to restore it.

I have pretty colours now though, so it was all worth it :)

lemmyreader,

😁

Cwilliams,

Been there, done that. But I haven’t had any problems once I switched to systemd-boot 🤷

SSUPII,

Debian sid a few years ago: Uninstalled Python2, system became unusable and couldn’t neither reinstall from APT neither recompile it

luk,

Did it on Ubuntu and nothing worked anymore. Somehow managed to recover.

SSUPII,

I was much more inexperienced in Linux at the time, I could probably fix it now if the same thing happened again.

Quazatron,
@Quazatron@lemmy.world avatar

Found out the hard way that if you edit /etc/sudoers with anything other than visudo you best be absolutely sure the syntax is correct, otherwise sudo will refuse to read it and you’ll be locked out.

Also learned to add -rf to the rm command at the end, after I re-read it to make sure it does what it should do. Something like rm /path -rf instead of rm -fr /path. That protects you from your fat fingers hitting the enter key half way through.

fl42v,

Been there with sudo. Fortunately, su still works, as well as going to another tty and logging in as root. Well, as long as the root login is enabled; otherwise that old hack with init=/bin/bash may work, unless you’ve prohibited editing kernel cmdline in the boitloader or decided on efistub

Quazatron,
@Quazatron@lemmy.world avatar

IIRC the root account was disabled (with no password), so I resorted to my trusty SystemRescueCD pen to fix things. Never leave home without it.

captainjaneway,
@captainjaneway@lemmy.world avatar

Linux Mint: removed all taskbars from the desktop. I was hoping it would just allow me to reset them to the default. But in reality, it breaks the GUI and it’s very hard to reset from the GUI. Suddenly my keystrokes weren’t being detected and I couldn’t open up applications with any sort of regularity. After a lot of dicking around, I got the terminal working so I could reset Cinnamon.

It’s not the worst way I’ve broken a machine. But it was one of the most annoying.

Petter1,

Always remember, there is always a “terminal” accessible: Don’t forget poor tty

Nibodhika,

One thing I learnt a while back is that if you break your GUI you can always use Ctrl+Alt+F<1-9> to go to different terminals to try to solve it. Worst case scenario I would do something like mv .config .config.bkp and sudo systemctl restart that should hopefully get you back to default settings on the UI.

Source: been there, done that. Not exactly your error but similar enough.

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.

Petter1,

You could have used the netplan yaml file 😇 or chroot from live distro

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.

fl42v,

Been there, and even without encryption: took me to reinstall a few times before I realized I can chroot again and repair 😅

Petter1,

Archinstall python script is your friend 😄😉 I tried install arch manually, but as I learned that not even sudo is included in the Linux essential packages, I stopped the process and went back to aromatic script install, lol, got no time for that S*** 😂

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.

rzlatic,
@rzlatic@lemmy.ml avatar

I can totally feel that sudden clot in the gut the moment you realize on which drive the action is happening, just by reading this.

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.

fl42v, (edited )

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 🤣

Checked it out: on arch that results in inability to run tty on reboot, then you’re dropped into initramfs’s rescue shell where you can simply +x new_root’s /usr/bin/* and be back up and running

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.

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…

zako,
@zako@lemmy.world avatar

rm -rf /var

I don’t know what I was thinking on to type it 😅

musicmatze, (edited )
@musicmatze@lemmy.ml avatar

Not really a “braking my linux setup”, but still fun as hell! Back in university, a friend of mine got a new notebook at a time… we spent the night at the university hacking and they wanted to set the notebook up in the evening. They got to the point where they had to setup luks via the cryptsetup CLI. But they got stuck, it just wouldn’t work. They tried for HOURS to debug why cryptsetup didn’t let them setup LUKS on the drive.

At some point, in the middle of the night (literally something like 2 in the morning) they suddenly JUMPED from their seat and screamed “TYPE UPPERCASE ‘YES’ - FUCK!!!”

They debugged for about six hours and the conclusion was that cryptsetup asks “If you are sure you want to overwrite, type uppercase ‘yes’”. … and they typed lowercase. For six hours. Literally.

The room was on the floor, holding their stomach laughing.

ulkesh,
@ulkesh@beehaw.org avatar

Renaming a mount point while mounted was a fun experience in losing data back in the big box Redhat 5.0 days.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • linux@lemmy.ml
  • localhost
  • All magazines
  • Loading…
    Loading the web debug toolbar…
    Attempt #