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?

hawgietonight,

Not the installation strictly speaking, but my most “funny” fuckup was setting up xfree86. There was a configuration for crt monitor scan frequency that you had to setup. I messed up something and the monitor started to squeel like crazy and quickly hit hard reset in panic.

The monitor didn’t die, but it had a slight high pitch noise to it after.

aard,
@aard@kyu.de avatar

Back then I was testing modelines to see the maximum I could push to my 14" monitor. I then backed it with a 1200x1600 virtual screen.

My girlfriend got sick from watching me scrolling around and bought me a 19" display which could do that resolution - and ended up frustrated when I added a larger virtual screen.

hawgietonight,

A 19" monitor was quite big for the day, and expensive! I hope your gf didn’t beat you up too much for that :)

Delta_44,

I know little about crt because I was born in 2000. Can you explain why did the monitor started to make scary sounds?

I know that crt monitors didn’t have any method to report the supported frequency, aside from more recent models, correct?

hawgietonight,

Yeah, monitors were somewhat dumb, just received and did what the vga output asked to do.

The noise most likely came from the semiconductors that controlled the magnet field that directed the rays onto the screen. These components are selected for a specific speed that the monitor can handle. So going under or over it’s spec can make something resonate in the audible range, and could even destroy the components if stressed too much.

The thing is that for each resolution and refresh rate you had two values to configure, one for the vertical speed in Hz, and horizontal speed in kHz. These values were usually specified in the owners manual. Typos can happen, and this was quite a risky operation.

aard,
@aard@kyu.de avatar

A good starting point for a wikipedia rabbit hole covering the software aspects on how to drive a display: en.wikipedia.org/wiki/XFree86_Modeline

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 🤷

Petter1,

For me, it was a simple enabling of AUR im manjaro, twice Now I use arch, lol.

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

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.

carcus,

Learned about the importance of trailing slashes in rsync by using the -delete flag.

mlg,
@mlg@lemmy.world avatar

fstab bind mount for /home that I misspelled, so I couldn’t login as myself.

fstab external hdd mount that didn’t have ignore flag so PC would pop if I booted while unplugged

Accidentally booting windows after a year and it overwrite my EFI boot entry.

The best I’ve see however was an acquaintance who accidentally set perms to own user on /usr/bin

So everything went from root:root to user:user which removed all the SUID/SGID bits as well so a bunch of bins broke lol.

Believe it or not, it was actually fairly easy to fix with chmod and chown

Nibodhika,

I’ve done my plenty of stupid stuff, from dd disks I was using to forcefully uninstall dependencies of the package manager. But the one that takes the cake for me happened back in 2012, I was working at a research lab in the university and was sharing a computer with another intern. That other intern used Gentoo and so we agreed that the machine should be Gentoo, I’ve installed it at my house on my PC and got comfortable with it before we shared that computer. One thing that I learnt when installing Gentoo is that the /dev folder is created on boot, you don’t populate it when installing, instead you mount the one from the host system you’re using to install.

The computer had an issue with a device, can’t even remember what it was, so I thought I’ll run rm -rf /dev that should take care of the issue and after a reboot it will be repopulated… It might have worked, but what I actually ran was rm -rf /etc.

Engywuck,

“Updating” a 5.2 RedHat install with a 6.0 Mandrake CD-ROM (or the opposite, can’t remember right now…). Fun stuff.

Kidplayer_666,

Man, this was a few months back. I’ve got fedora asahi Linux (Linux on an ARM Mac) and I was trying to install Pycharm to play a bit with Python. Unfortunately, they did not have it packaged for arm, so I had to download a pre compiled tar or zip folder. I test it, see that it is an assortment of bin folders and alike, and decide to put it all elsewhere so it wouldn’t get lost. So I put it on the root and merge the folders. I think immediately “wait this is stupid” and decide to get Pycharm out of there. (I was on nautilus with root privileges), so i simply Ctrl-Z outa there. It shows a warning whether I wanted to delete 4000 files, but because I am an idiot, I didn’t realise what rhay meant. So I did it. I then continue on with my life, and find myself unable to open apps. I was fairly confused, as the apps I already had open still worked. I decide to try to restart the laptop. It is when I see that there is no restart button anymore that I realise what I did, and I just think to myself. I’ll be dammed if this survives a restart, im already screwed so it doesn’t matter. (It didn’t survive the reboot, had to install from scratch. At least an excuse to use the K desktop environment)

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

Generated my grub configuration as grub.conf

This one took a stupid amount of time to debug - but on the other hand, when grub failed it did with “can’t find any bootable thingy” and not “missing configuration file” as, in my later opinion, it should.

Life Linux is a harsh mistresses, sometimes.

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)

Serinus, (edited )

Many years ago I was dual booting Linux and Windows XP. I was having issues with the Linux install, and decided to just reinstall. It wasn’t giving me the option to reinstall fresh, only to modify the existing install.

So I had the bright idea to just rm -rf /

Surely it’ll let me do a fresh Linux install then.

Immediately after hitting enter I realized that my Windows partitions would be mounted. I did clearly the only sensible thing and pulled the plug.

I think I recovered all of my files. Kind of. I only lost all the file paths and file names. There was plenty to recover if I just sorted though 00000000.file, 00000001.file, 00000002.file, etc. Was 00000004.file going to be a Word document or a binary from system32 directory? Your guess is as good as mine!

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.

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*** 😂

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

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