Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Your worst mistake so far with Gentoo, or Jaguar
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Gentoo Chat
View previous topic :: View next topic  
Author Message
kgdrenefort
Guru
Guru


Joined: 19 Sep 2023
Posts: 312
Location: Somewhere in the 77

PostPosted: Wed Apr 24, 2024 3:19 pm    Post subject: Your worst mistake so far with Gentoo, or Jaguar Reply with quote

Hello,

Today I made the worst mistake one can make while trying to fix his own poop.

Will not get into details, but I had to remove the content of my root partition and apply a xfsdump backup with xfsrestore.

I mount on my old Debian the root of my actual OS, Gentoo.

Then, I type, while in the /mnt/gentoo directory:

Code:
# rm -rf /*


Five seconds later…

OH NO PLEASE NO GOD WHAT DID I JUST DONE ?!

Reflex is Ctrl^C, which is purely useless by the way, that moment of panick turned my brain off for a second.

Then, I realize the damage: Destroyed the root of Gentoo, which was the goal, then my old Debian.

In the process, lucky me my home wasn't mounted, as my external backup drive. The datas are safe.

This was so much a newbie move, honnestly.

I wanted to type:

Code:
# rm -rf *


While in that directory, usually I also type destination, then options, THEN rm. Not today. Nope.

What's yours ?

Regards,
GASPARD DE RENEFORT Kévin
_________________
Traduction wiki, pour praticiper.
Custom logos/biz card/website.


Last edited by kgdrenefort on Wed Apr 24, 2024 7:33 pm; edited 2 times in total
Back to top
View user's profile Send private message
eeckwrk99
Apprentice
Apprentice


Joined: 14 Mar 2021
Posts: 231
Location: Gentoo forums

PostPosted: Wed Apr 24, 2024 3:42 pm    Post subject: Reply with quote

Quote:
While in that directory, usually I also type destination, then options, THEN rm. Not today. Nope.

This is definitely good practice to do so.

Starting the command with "#" so that if pressing Enter by accident, the command isn't run and is interpreted as an interactive comment instead is also good idea. I'm using setopt INTERACTIVE_COMMENTS in my Zsh config but even without it it seems that it only returns
Code:
zsh: command not found: #


I've just tried with Bash without any special config and it seems that the command isn't interpreted either when adding a leading #, at least on my current Gentoo install.
Back to top
View user's profile Send private message
Hu
Administrator
Administrator


Joined: 06 Mar 2007
Posts: 22640

PostPosted: Wed Apr 24, 2024 3:43 pm    Post subject: Reply with quote

While on a system with a glibc older than the latest stable of the day, I ran emerge --usepkgonly important-package (maybe sys-apps/coreutils? I don't remember exactly). Portage dutifully installed the requested update from my binhost, which had a newer glibc and had built coreutils with that newer glibc. The package's RDEPEND data does not instruct Portage to ensure that the target's glibc is not older than the build glibc. That left me with a coreutils that failed to start due to it needing the newer glibc's symbols. I remember being very pleased with myself that in less than an hour of work, and with no reboots, I got everything fixed. Statically linked busybox was key to recovering that system.
Back to top
View user's profile Send private message
kgdrenefort
Guru
Guru


Joined: 19 Sep 2023
Posts: 312
Location: Somewhere in the 77

PostPosted: Wed Apr 24, 2024 4:08 pm    Post subject: Reply with quote

eeckwrk99 wrote:
Quote:
While in that directory, usually I also type destination, then options, THEN rm. Not today. Nope.

This is definitely good practice to do so.

Starting the command with "#" so that if pressing Enter by accident, the command isn't run and is interpreted as an interactive comment instead is also good idea. I'm using setopt INTERACTIVE_COMMENTS in my Zsh config but even without it it seems that it only returns
Code:
zsh: command not found: #


I've just tried with Bash without any special config and it seems that the command isn't interpreted either when adding a leading #, at least on my current Gentoo install.


Well, actually the '#' was added for the purpose of this topic, showing that was in root. But you know what ? Damn good point you raised, if I have to rerun a rm, will definitly add this to the manual process, that would have MAYBE saved my things sit on my chair, since I would probably hit enter as fast but, it would be a comment, would have forced me to extra-check in case… Er.

That is also something I'll add to my wishlist to-do-myself: Adding an alias running a script for rm, merely asking you to be SURE you are aware of what you are doing, and maybe ask you to type: "Yes, I'm sure, remember that 24th April 2024 in the morning when you lost a whole day because you are AN IDIOT !". Can't be more sure than this, right ?  :twisted:

Hu wrote:
While on a system with a glibc older than the latest stable of the day, I ran emerge --usepkgonly important-package (maybe sys-apps/coreutils? I don't remember exactly). Portage dutifully installed the requested update from my binhost, which had a newer glibc and had built coreutils with that newer glibc. The package's RDEPEND data does not instruct Portage to ensure that the target's glibc is not older than the build glibc. That left me with a coreutils that failed to start due to it needing the newer glibc's symbols. I remember being very pleased with myself that in less than an hour of work, and with no reboots, I got everything fixed. Statically linked busybox was key to recovering that system.


That is an nice fix, the reboot would have been fatal I imagine, or at least you'll be hitting a non-booting system until chrooting to repair it.

Back a few years ago, Debian wasn't compatible with Discord, because glibc version was, in my memory, not the same. Or maybe that was another kind of package as glibc where the release is really important, had checked that at this time and the horrible fix I found was using the Ubuntu's version… On Debian. Which is possible, but is against Genevia Convention !

It worked, Debian was still able to run, but every update become me sweating hard in front of apt-get, hoping nothing will break.
_________________
Traduction wiki, pour praticiper.
Custom logos/biz card/website.
Back to top
View user's profile Send private message
Ralphred
l33t
l33t


Joined: 31 Dec 2013
Posts: 653

PostPosted: Wed Apr 24, 2024 5:15 pm    Post subject: Reply with quote

I've had an errant rm -rf * command, but we all know how that goes.
The real mistake was when using testdisk to recover the files, I accidentally dropped the recovery image on the same disk meaning all the files after the like the first 5 were of "zero bytes". Had to restore from backup in the end, no real losses, just embarrassed annoyance, well and a new appreciation of physically writing down dev names against "normal" mount points when booting from "foreign" media.
Back to top
View user's profile Send private message
Goverp
Advocate
Advocate


Joined: 07 Mar 2007
Posts: 2179

PostPosted: Wed Apr 24, 2024 5:42 pm    Post subject: Reply with quote

I did an oil change but forgot to put the drain plug back before I refilled.
Oh, sorry, that was a Jaguar, not Linux. Still messy. ;-)
_________________
Greybeard
Back to top
View user's profile Send private message
rab0171610
Guru
Guru


Joined: 24 Dec 2022
Posts: 423

PostPosted: Wed Apr 24, 2024 5:59 pm    Post subject: Reply with quote

I keep daily backups with Timeshift. If anything goes wonky, I just roll back to midnight last. Thanks to that, I haven't had these types of problems in years. I have actually installed a different OS over my partitions to see how it would work on bare metal, and within just a few minutes had my system restored back with Timeshift as if it never happened. If I delete or overwrite something by accident, I have daily backups on a separate drive I can just browse through and restore the files individually if needed.
Anyway, I think the biggest mistake anyone could ever make in Linux is not keeping good, reliable and easily accessible backups. That would seem to prevent a lot of problems that I see users, both inexperienced and advanced, experiencing on Linux OS forums.
Back to top
View user's profile Send private message
Spanik
l33t
l33t


Joined: 12 Dec 2003
Posts: 999
Location: Belgium

PostPosted: Wed Apr 24, 2024 7:20 pm    Post subject: Reply with quote

Not yet with linux. But I had a moment with W2K when with some friends we were recording a demo for their band and I added an extra disk to the pc (just to be sure you know). Windows changed the drive letters and I formatted the drive with all the recordings on instead of the new one. We had some backups but not everything.

This was one of the reasons I went to linux, to get rid of those idiotic drive letters. But that took some years to really switch.
_________________
Expert in non-working solutions
Back to top
View user's profile Send private message
kgdrenefort
Guru
Guru


Joined: 19 Sep 2023
Posts: 312
Location: Somewhere in the 77

PostPosted: Wed Apr 24, 2024 7:32 pm    Post subject: Reply with quote

Goverp wrote:
I did an oil change but forgot to put the drain plug back before I refilled.
Oh, sorry, that was a Jaguar, not Linux. Still messy. ;-)


Once I cleaned the filter of my washing machine… forgot the joint, put the filter back and started a cycle.

There is a lot of water in a washing machine, did you know that ?!
_________________
Traduction wiki, pour praticiper.
Custom logos/biz card/website.
Back to top
View user's profile Send private message
Leonardo.b
Guru
Guru


Joined: 10 Oct 2020
Posts: 308

PostPosted: Wed Apr 24, 2024 7:51 pm    Post subject: Reply with quote

Easter holydays. Bank account password change.
I create a new random password, and store it in a safe place on disk.
Soon I want to manually backup it, but I type cp command in the reverse order and I override the new password.
Got locked out for almost a week.

I call it a mistake but Freud may agrue...
https://en.m.wikipedia.org/wiki/The_Psychopathology_of_Everyday_Life
Back to top
View user's profile Send private message
wuzzerd
Guru
Guru


Joined: 05 Jan 2005
Posts: 467
Location: New Mexico

PostPosted: Wed Apr 24, 2024 9:02 pm    Post subject: Reply with quote

Trying systemd.
Back to top
View user's profile Send private message
Taigo
Tux's lil' helper
Tux's lil' helper


Joined: 09 Nov 2022
Posts: 105
Location: the Netherlands

PostPosted: Thu Apr 25, 2024 7:17 am    Post subject: Re: Your worst mistake so far with Gentoo, or Jaguar Reply with quote

I tried installing LFS for the funs one day. And i still have no clue how it happened but i messed up my root file permissions.
I could not fix it i had to reinstall my system but at least i learned from this.
It's either:
- Do not install LFS on your main host system ( use a VM )
- Watch out with changing permissions

I think this could be similar to OP's issue where instead of changing recursively from ./* i did /*
Back to top
View user's profile Send private message
Genone
Retired Dev
Retired Dev


Joined: 14 Mar 2003
Posts: 9608
Location: beyond the rim

PostPosted: Thu Apr 25, 2024 3:02 pm    Post subject: Reply with quote

To add some non-FS related content: Accidentally put a "DROP ALL" rule at the top (instead of bottom) of the iptables rules on my headless server and wondered why my SSH session froze instantly.
Back to top
View user's profile Send private message
dartleader
Tux's lil' helper
Tux's lil' helper


Joined: 21 Apr 2019
Posts: 126

PostPosted: Fri Apr 26, 2024 10:41 pm    Post subject: Reply with quote

Genone wrote:
To add some non-FS related content: Accidentally put a "DROP ALL" rule at the top (instead of bottom) of the iptables rules on my headless server and wondered why my SSH session froze instantly.
Are you me? See also: being in a really complicated, confusing ssh session and editing config files on the wrong computer.
Back to top
View user's profile Send private message
lekto
Apprentice
Apprentice


Joined: 20 Sep 2014
Posts: 207
Location: Ancient Rome

PostPosted: Sat Apr 27, 2024 5:02 pm    Post subject: Reply with quote

For some reason, I have decided to switch from AMD64 to ~AMD64. About halfway through rebuilding, I changed my mind and stopped it. But instead of rebuilding stuff back, I decided to restore it from my rsnapshot backup. After I restored it, I ran emerge to check if everything was up to date, and emerge wanted to rebuild packages back, like I didn't restore them at all. So, I restored them again, and emerge still wanted to rebuild them, so I started investigating. I compared a few files that belong to packages that I was 100% sure were rebuilt, and they matched files in backup, so I did restore them. It took me a while, but I found that I didn't have /var/db/pkg in my backup, so I had a system with files in the right versions, but portage was thinking they were in the wrong versions, and it wanted to downgrade them, but it couldn't because dependencies were in the wrong versions. I couldn't use genlop to check what exactly I rebuilt because I restored emerge.log. I had to manually run qcheck to find what was wrong and then ebuild merge to rebuild it, but I had to do it in the right order, and then I ran emerge -e @world. In the end, instead of waiting a few hours for downgrading, I wasted many times more trying to fixing that mess manually.

To this day, this machine is working, and according to find: 35528/736397 (~4.82%) files in /usr/ are older than the 2020 year and are probably leftovers from that mess.

P.S. By restoring from backup, I mean I copied files from backup, but didn't deleted files that weren't in backup.
Back to top
View user's profile Send private message
mrbassie
l33t
l33t


Joined: 31 May 2013
Posts: 821
Location: Go past the sign for cope, right at the sign for seethe. If you see the target you've missed it.

PostPosted: Sun Apr 28, 2024 4:47 pm    Post subject: Reply with quote

I convinced my parents to buy me an Atari Jaguar.

I do feel somewhat vindicated after seeing what people have been able to get out of them since, visually approaching PS1 or Saturn level stuff. Clearly the hardware was capable of more than what any of the published games ever produced, a step ablove the 3do, cdi etc.
_________________
I spent a christmas in Vienna twenty something years ago. It was a beautiful city. Everyone was so friendly.
Back to top
View user's profile Send private message
OpenSauce04
n00b
n00b


Joined: 25 Apr 2024
Posts: 2

PostPosted: Sun Apr 28, 2024 6:38 pm    Post subject: Reply with quote

I don't remember exactly how it happened, but one time I was trying to delete everything inside a directory I was in, and typed in:
Code:
rm -rf ./*

Turns out, I was in my home directory instead of the directory I thought I was in.
That was not a fun day :?
I now always use absolute paths when using rm -rf without exception. At least it was a learning experience.
Back to top
View user's profile Send private message
Goverp
Advocate
Advocate


Joined: 07 Mar 2007
Posts: 2179

PostPosted: Mon Apr 29, 2024 7:50 am    Post subject: Reply with quote

mrbassie wrote:
I convinced my parents to buy me an Atari Jaguar. ...

Just be careful when you do an oil change :-)
_________________
Greybeard
Back to top
View user's profile Send private message
XaetaCore
n00b
n00b


Joined: 11 Aug 2016
Posts: 25
Location: The Netherlands

PostPosted: Fri May 24, 2024 6:34 am    Post subject: Reply with quote

Not keeping up with `eselect news` then discovering that the reason for my system not updating correctly was the merged-usr i forgot to perform :lol:
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gentoo Chat All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum