this post was submitted on 22 Jan 2024
29 points (93.9% liked)

Linux

47341 readers
1156 users here now

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

founded 5 years ago
MODERATORS
 

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?

(page 3) 50 comments
sorted by: hot top controversial new old
[–] [email protected] 1 points 8 months ago

Oh, i have a brilliant one:

A few years ago i spent a lot of time converting .flac-files into .ogg-files in order to put on my oldschool iPod. As I did a lot of repetitive typing - entering $dir / for file in flac ; do convert etc / mkdir -p $somewhere/$artist/$album / mv $somewhere/.ogg->$new_dir/ and so on - I thought: "hm lets just write a loop over loops for all the artists here and then all the albums and at the same time create the nested directories somewhere else... hm actually in the home directory.... and later love everything on the iPod at once."

so i was in my music folder with the artists-folders i wanted to convert. i did something wrong

So i did my complicated script directly in the shell. I made something wrong and instead of creating a folder "~/artist/album" I created 3 folders in my current working directory: "~", "artist" and "album". hmph dammit gotta try again... but first : i have to clean up these useless folders in the current dir. so i type of course this: "$ rm -r ~ artist album " after about 5 seconds of wondering why it took so long i realized my error. o_O I stopped the running command, but it was (of course) too late and i bricked my current installation. All the half-deleted config files made or impossible to start normally and extremely tedious to repair it by hand, so i reinstalled.

[–] [email protected] 1 points 8 months ago* (last edited 8 months ago) (3 children)

Nooo I have so many.. This one I can explain in English:

Xubuntu but blind

So, this is ~2016. Ubuntu is hip and a handful of my students use it. On my PCs I only use Debian and Suse. So to help them better I take out an old ASUS laptop and install Ubuntu on it. Try out Xubuntu instead.

At that time I was also huge into alternative keyboard layouts. I had a slightly modified Neo keyboard layout installed when I switched to Xubuntu.

Here the fun starts because the obscure internal graphics card built into the laptop didn't have driver support under Xubuntu. Black screen but I could hear it working. This was the hardest driver fix I ever did. No monitor and a keyboard layout I wasn't used to, under a Linux distro I wasn't used to. And I also was at the university library, so no hardware support or Debian stick in reach.

load more comments (3 replies)
[–] [email protected] 1 points 8 months ago

I've not broken my setup (yet), but I've came close to it one time when I accidentally made a lesser fork bomb.

I was writting a function that would display how many jobs I currently had in the command prompt, but when writting the function instead of calling jobs I called the function itself, sourced .bashrc and now everything was laggy (my pc only has 4GB). Thankfully I was able to shut down the terminal before my swap got completely consumed.

[–] [email protected] 1 points 8 months ago (3 children)

stupid was when I wanted to test Linux Mint on an external SSD, and didn't check that the bootloader wasn't going to overwrite my internal drive's.

So anyway I'm running Linux Mint now.

load more comments (3 replies)
[–] [email protected] 1 points 8 months ago

Wanted a cool bootscreen on my Nixos machine - commented out the bootloader to troubleshoot, why my meme-boot-picture wouldn't show - after rebooting, it loaded straight into the BIOS and finally realized what I had done... Was able to fix it thankfully

[–] [email protected] 1 points 8 months ago

Before I understood how to properly build and test mesa (graphics driver), I compiled it and then procedeed to manually symlink the files in the lib and lib32 directories. When I pressed enter on that ln command, the UI immediately crashed and X would no longer start after rebooting the computer. Reinstalling mesa from a virtual terminal wouldn't fix it so I just reinstalled the system. Good times :)

[–] [email protected] 1 points 8 months ago

I was running Fedora. Something like 27 or so. I needed drivers. I don't remember if it was AMD or Nvidia, but they were only available on RedHat.

So I downloaded the RedHat drivers for the GPU and forced it to install. It worked! It was great.

Then when I updated the distro to the next release... everything failed. It was dropping into grub, but no video was output. Ooof.

So I ended up enabling a terminal console and connecting to it via a serial port to debug. I had to completely uninstall that RPM and I was never happy that it was properly gone. So a few months later I ended up reinstalling the whole OS.

On the plus side, I learned a lot about grub and serial consoles. Worth it.

[–] [email protected] 1 points 8 months ago* (last edited 8 months ago) (3 children)

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

Note the space.

[–] [email protected] 3 points 8 months ago (2 children)

Oh man, you really owned those libs

load more comments (2 replies)
[–] [email protected] 1 points 8 months ago (1 children)

Might be recoverable if you had a live distro ready. Otherwise, o7.

load more comments (1 replies)
load more comments (1 replies)
[–] [email protected] 1 points 8 months ago

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).

you can do that from your phone using etchdroid

i don't remember ever breaking my system in a terrible way, but when i started using linux (with linux mint) i uninstalled ca-certificates and i think that uninstalled the whole DE

[–] [email protected] 2 points 8 months ago (2 children)

I uninstalled Python.

I was playing around with Pygame of all things, and it wasn't behaving as the (apparently out of date) documentation was saying it should, so I figured I'd just uninstall and reinstall Python.

EVERYTHING borked. APT wouldn't even work.

[–] [email protected] 1 points 8 months ago

Ha! Came to say this too!

I tried to uninstall Python because I was just trying to minimize junk on my computer and I usually code in Bash, Node or Java.

[–] [email protected] 1 points 8 months ago* (last edited 8 months ago)

Oh that's a good one. It feels like it should be doable and then.... BAM

[–] [email protected] 1 points 8 months ago

sudo usermod -a cdrom

Forgot the -G and wasn't sudo anymore...

I did recover eventually, but it was not nice.

[–] [email protected] 1 points 8 months ago* (last edited 8 months ago) (1 children)

I mistyped my SU password when setup the OS...

[–] [email protected] 1 points 8 months ago (1 children)
load more comments (1 replies)
[–] [email protected] 1 points 8 months ago

I somehow locked myself out of sudo when trying to give my user permission to read serial devices.

Had to reinstall.

[–] [email protected] 1 points 8 months ago

I wanted my top bar in DWM toshow the time, so I put the script directly into the .xinitrc file instead of the path to the script.

[–] [email protected] 1 points 8 months ago

Ubuntu GUI/apt fail

Back when I used ubuntu, Unity was stuck with old gnome packages. This meant that the version gnome-terminal packaged with ubuntu (up to at least 18.04) didn't have text reflow on window size changes.

You could add the upstream sources, upgrade the specific text reflow package only, and then disable the sources.

I forgot to disable the sources, or typed dist-upgrade (this happened multiple times...). Broke the whole desktop/lightdm setup with half upgraded packages, and half removed packages (for preparation to install new versions). Way easier to reinstall the os than to disentangle. Unity was a mess then anyway.

Moral: Actually read the package change summaries when doing updates/removes/installs, and [ y/N ] means actually check what the fuck you think you're agreeing to.

BtrFS snapshots for idiots

I've also run automated snapshots on my btrfs partition, then run out of space doing multi-hop system upgrade on fedora (dnf has a plugin that creates a snapshot every time it kicks in.

You can imagine there were many changes happenning per snapshot, and I effectively could have rolled back 4 major fedora versions... Til I ran out of space.

I couldn't get a replacement drive in time, and I had an hour to rebuild my laptop before needing to be on a customer site, so sadly I couldn't preserve my drive for later investigation. My best guess is the high-water-mark was configured incorrectly, and somehow it was able to 'write' data past the extents of the filesystem.

Rollback did work for my home partition, but I had to mount it from another OS to get it to work - so no data loss!

By that time I'd already reinstalled the os to the root partition/subvolume however, so I couldn't determine the exact cause of failure :(

Moral: Snapshots are not backups, and 'working' is not 'tested'

[–] [email protected] 1 points 8 months ago

I've had the typical disasters with partition tables and boot loader mixups, but the one I keep coming back to is updating my Nvidia drivers too eagerly. Whether something gets messed up with an external monitor, or the laptop starts resisting switching away from the integrated GPU, or an electron app I use regularly that makes heavy use of 3D acceleration breaks, or I just need to bump the driver version in a reproducible system state record... it's just bad news.

[–] [email protected] 1 points 8 months ago

@fl42v I have thousands from my early days, but my only recent-ish one was pretty funny.

On an Arch install that hadn't been updated for a while, in a rush, had an app that needed OpenSSL 3. Instead of updating the whole system, I just updated the openssl package.

*Everything* broke immediately. Turns out a lot of stuff depends on openssl. Who knew?

To fix, booted to the arch installer, chrooted into my env, and reverted to the previous version of the package — then updated properly.

[–] [email protected] 2 points 8 months ago (1 children)

This was pre-linux for me but something you can still do in most distros so I think it's a valid story.

In 1999 I was using Napster on computer running MS-DOS. I was 12 years old and an aspiring open media enthusiast/stupid script kiddie. I was using the file explorer interface in Napster and accidentally gave access to my entire C drive. I also had opened ports to share certain media and to fuck with my friends using daemon tools (back then you could do stupid stuff like control a friend's desktop with certain versions of daemon tools). Immediately I started receiving packages called things like "sleep.tight.tiny.mite" and I knew I was fucked so I clicked in the Napster interface and clicked "delete" and deleted my entire active drive.

I panicked and installed the only operating system we had which was a random copy of Red Hat. When my dad came home I pretended like it had always had Linux on it. I do think he was more impressed than mad.

load more comments (1 replies)
[–] [email protected] 1 points 8 months ago (1 children)

Just straight up overwriting boot sector and superblock of my hard drive thinking it's the USB drive.

Udev tried to warn me, saying there's no permission, and I just typed sudo without thinking.

Then after a second I remembered USB block devices are usually writable by users, but it was too late.

load more comments (1 replies)
[–] [email protected] 1 points 8 months ago (1 children)

Accidentally deleted system Python, which on GNOME meant my DE was toast as well. Luckily very freshly set up, so no harm done.

Related note, add this in your shell profile:

bash
export PIP_REQUIRE_VIRTUALENV=true

proper scripting language
set PIP_REQUIRE_VIRTUALENV true

[–] [email protected] 0 points 8 months ago (1 children)

What does it do? Is it some kind of failsafe?

[–] [email protected] 1 points 8 months ago

Makes it so when you install packages with pip, it will only work if it's using a virtual environment. This keeps any installed packages separate from ones your system uses.

If you want to learn about python virtual environments, check this out.

[–] [email protected] 0 points 8 months ago

I copied a program into the /bin/ folder while in a file browser with sudo permissions and somehow overwrote every file except the one I was moving. It, of course, couldn't boot, but copying the bins from a live iso made it at least boot able. Reinstalled Linux after that, of course.

[–] [email protected] 1 points 8 months ago

Once I succumbed to a proprietary software's allure, post-usage, I felt like a digital pariah! To rid myself of the taint, I wiped my system clean – reinstall time!

[–] [email protected] 1 points 8 months ago

Years ago a friend mistakenly typed in killall5 as root on a remote server. Didn't break things but resulted in extra work and effort.

[–] [email protected] 1 points 8 months ago

On OpenSUSE, in Yast bootloader tool, there is a checkbox to to do something like locking the bootloader (it has been a while, I don't remember the exact thingy). Rebooted and oh, surprise, the bootloader was locked... Which mean Grub didn't load.

I had to reinstall the whole OS 🤣

[–] [email protected] 1 points 8 months ago* (last edited 8 months ago)

Years ago I was dual-booting with Ubuntu just to try out whatever this Linux thing was that all the nerds were talking about. Liked it and played around with it, but for whatever reason I wanted to go back to just Windows, I needed the space I had partitioned off or something, can’t remember why. So I just uninstalled or deleted the bootloader somehow (maybe I just deleted the Linux partition and expected the space to clear up like normal).

Go to restart the computer… oh shit. Ohshotohshitohshitohshit.

[–] [email protected] 1 points 8 months ago* (last edited 8 months ago)

At one point I had the coolest Ventoy USB; CyberRe, LABEL=hakr. But then I got a new computer and apparently the ssd was /dev/nvme0n1 instead of /dev/sda. While I was installing Arch, When I created a new GPT partition on /dev/sda, it wiped my beautiful Ventoy 😢

[–] [email protected] 1 points 8 months ago* (last edited 8 months ago)

I thoroughly backup up my slow nvme before installing a new faster one. I actually didn't even want to reuse the installation, just the files at /home.

So I mounted it at /mnt/backupnvme0n1, 2, etc and rsynced

The first few dry runs showed a lot of data was redundant, so I geniously thought "wow I should delete some of these". And that's when I did a classic sudo rm -rf in the /mnt root folder instead of /mnt/dirthathadthoseredundantfiles

[–] [email protected] 1 points 8 months ago (1 children)

I can't even remember how I did this, but overwriting the partition table on the main production server at our small startup (back when "the server" would usually live on the premises of the startup). I remember my boss starting to hyperventilate from panic while I reconstructed it from memory / notes, and all the filesystems came back and he calmed down.

Same job, they gave me a little embedded-systems unit for me to use to build a prototype on. I hooked it up, nothing worked. I brought it back to them.

Hey, this one doesn't work.

Huh... that's weird, it was working before. Did you break it?

I don't think so. Can I have one that works?

They literally told me, as they were handing me the second one: Okay, here's another one. Don't break it.

I figured it out literally seconds after breaking the second one... I was hooking it up to 12 volts of power when it needed 5. Second dead computer. Explaining that and that I needed a third one now was fun.

[–] [email protected] 1 points 8 months ago

Had something similar several years ago: prototype stopped working for some reason, one of the hardware engineers and I were troubleshooting on a second prototype, and we exploded a large capacitor... The rest of the team were not amused that we destroyed 2 out of 3 working prototypes within 10 minutes.

load more comments
view more: ‹ prev next ›