this post was submitted on 22 Jan 2024
296 points (96.5% liked)

Linux

47231 readers
761 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] 8 points 7 months ago

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

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

One time I rebooted. The system never recovered.

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

One day on my main Arch installation I created a container inside a directory, and "booted" into it by using systemd-nspawn. When I was done with it I decided to do a rm -rf / inside the container just to be funny. Then I noticed that my DE on the host froze and I couldn't do anything. Then I realized that systemd-nspawn mounts some important host's directories on the container, and I deleted those when I did the rm -rf /. I didn't lose anything, but it was scary.

[–] med 8 points 7 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] 8 points 7 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] 8 points 7 months ago

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)

[–] [email protected] 7 points 7 months ago

I've literally done the rm -rf / thing. I thought I was in a different subdirectory, but I was in / and did rm -rf .

When it didn't return after half a second, I looked at the command again and hit CTRL+C about 20 times in the span of 3 seconds.

I had to rebuild the install, but luckily didn't lose anything in /home.

[–] [email protected] 7 points 7 months ago

I was new to Linux, I made the not so calculated decision to use manjaro as my daily, deleted xorg to in an attempt to reinstall xorg to then hopefully fix the stuttering. Everything went wrong, no display obviously, /boot/ files where corrupt. I now use arch and am wiser

[–] [email protected] 7 points 7 months ago

I ran firejail config or something, which replaces a lot of home directory app files. Not sure if binaries or desktop entries.

But things broke, randomly, screenshots not working, not even inside firefox etc. I reinstalled the system and imported the home folder... and it was there again!

[–] [email protected] 7 points 7 months ago

I set up a progressive backup of my home folder... to my home folder. By the time I got home that day it was impossible to log in because there was no room to create a login record. Had to fix that by deleting the backup file using a live CD.

[–] [email protected] 7 points 7 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] 7 points 7 months ago

I was trying to extract some files from a a Linux image of one of those ARM boards. It was packed into the cpio format, and I had never used the format before. Of course I was trying to extract to a root owned directory and I sudo'ed it. I effed up the command and overwrote all my system directories (/bin, /usr, /lib, etc...). Thankfully I had backed up my system recently and was able to get it working again.

[–] [email protected] 6 points 7 months ago* (last edited 7 months ago) (4 children)

I once did an apt-get upgrade in the middle of when debian testing was recompiling all packages and moving to a new gcc version. I get it, using testing invites stuff like this. But come on, there should at least be a way to warn people beforehand.

load more comments (4 replies)
[–] [email protected] 6 points 7 months ago* (last edited 7 months ago)

I had issues with a new version of glibc that prevented me from working on music in Ardour on Manjaro. I then proceeded to force-downgrade glibc (in the hopes of letting me get back to work) and that broke sudo and some other things, which I found out after rebooting. That was an interesting learning experience. Now I snapshot before I do stupid stuff. :]

[–] [email protected] 6 points 7 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] 6 points 7 months ago (3 children)

Accidentally executed a JPEG (on an NTFS partition) and the shell started going crazy. reboot was not successful =[

load more comments (3 replies)
[–] [email protected] 5 points 7 months ago (3 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

load more comments (3 replies)
[–] [email protected] 5 points 7 months ago

I installed python one time

[–] [email protected] 5 points 7 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] 5 points 7 months ago

It was only in a container on a Chromebook, but I'll share it anyway. One time, I had installed Android Studio but found it mildly annoying that I got a line when using apt about Android Studio and some error on a certain line of this one file. I believe the file was something related to dpkg, and after changing some things within the file, I seemed to have broken apt. Luckily, I had a backup, but it was a few days old, so I had to reinstall some apps.

[–] [email protected] 5 points 7 months ago

About a year ago I somehow fucked up installing a new window manager on my tablet so badly I had to start from scratch - to this day I have no idea what happened there, but it just wouldn't boot properly or anything after that 🤷 I needed it for school pretty quickly though so my top priority was getting it working again, so I set up a fresh install instead of continuing to fuck around.

Not the same level of destruction, but I fucked up my first ever install a couple months in trying to resolve dependencies related to python and wine, which is why I'm more interested in sandboxing whenever feasible these days. After only two months I guess I had been fucking around with linux long enough to have a little too much unearned confidence, lol

[–] [email protected] 5 points 7 months ago

I'm not sure how funny this will be, but here's how I broke my system twice in a single case. Step by step:

  1. Migrated from Manjaro KDE to EndeavourOS KDE. Kept the previous home directory.
  2. After a few updates, there was a problem with Plasma. Applications were not starting from the panels or the .desktop files (they worked from the terminal. The terminal emulator was in startup and worked that way)
  3. After a few google searches, found out that downgrading glibc would do something, so downgraded... Worked for a while
  4. While using pacman -Syu, I always checked for warnings (foolishly thinking that the downgraded and ignored glibc would cause a pacman warning if it broke dependencies) and there were none. So, the updated OS stopped working due to unmatched glibc. BREAK 1
  5. To fix it, I opened one of my multiple boots (another EndeavourOS) and made a script using pacman -Ql and cp to copy new glibc related files into the broken system (because I was too lazy to learn how to do it the correct way with pacman and chroot didn't work because glibc is needed by bash).
  6. Turned out the script I made was wrong and I hadn't checked the intermediate output from pacman -Ql, which was telling cp to copy the whole /etc /usr and other directories. (just if I hadn't given the -r to cp) BREAK 2

In the end, I just made a new installation, this time with a new home and hand-picked whatever settings I wanted from the previous home, Viva la multi-HDD

[–] [email protected] 5 points 7 months ago

sudo rm -r /run/timeshift

[–] [email protected] 5 points 7 months ago

The first time I wanted to try Linux I did by installing elementary OS in dual boot mode (with windows) and everything went well, I played with it a bit and then I returned to Windows..

So, few days after that I realize that I have a lot of space in the Linux partition and I didn't have plans to use it anymore so I go to drive's & partition's manager on windows to delete my elementary OS partition..

Oh Lord when I restarted my PC, grub was showing nonsenses and I couldn't boot on windows again, I was in panic, I spent the rest of the day trying to fix grub to boot windows. At the end of the day I did it and save all my files and I uninstall grub properly, but what a day 😂

load more comments
view more: ‹ prev next ›