Have you done some stupid thing in openSUSE?

As the title says…
Have you done some stupid thing in openSUSE?
Please don’t try this at home (or at work).


I think it may be on oS 11.1 - 11.3 time…
I manage to change ID-number on root user … Hard to reverse that :sarcastic:Don’t know how that was possible, can’t remember if live disc was available.
Well … I install again rotfl! and don’t change the number.

I ran this by mistake in 8.1 (not _open_SUSE yet, but still…) while being logged in as root:

rm -rf /

In detail, I typed "rm -rf " because I wanted to delete a specific folder, then wanted to copy/paste the folder name from another xterm window. By accident I copy/pasted a ‘/’ with a line-feed…
Although I did recognize my mistake immediately, I wan’t able to abort it with Ctrl+C fast enough any more, everything was gone. (back then there wasn’t even a confirmation question :’()

I was able to recover most files (and a lot of garbage) with reiserfsck, but some were broken anyway afterwards.
Fortunately, this was quite a fresh system where I didn’t have really important data yet.
I had to reinstall the system and all applications though.

My worst mistake was in MS-DOS.

I wrote a small program, somewhat similar to unix “find”.

My first test was to recursively backup everthing on the disk.

My second test was to recursively delete everything under the current directory. I screwed up on the second test (I was in the wrong directory). Fortunately, I had that backup from the first test.

I have seen this one on the forums. Someone wanted to remove as root all in /home/someuser. While typing, he stumbled over the space bar after the second / (not the first one, he still had some luck).

And to make this not only a thread of what stupid things to do, but also how you can avoid some of them: make it your habit to

  • first cd to the directory where you want to do things, it is called the working directory for good reasons;
  • use the file name expansion feature of your shell to avoid typos;
  • first try e.g. an ls on the expression you want to use to get a list of what the system will act on when you type the rm, then bring the statement back (up arrow) and change the ls into rm, no further changes of course.

These practises should become automatic behaviour because people (yes, me and also you) are stupid in thinking that computer are intelligent.

I think the worst thing I did in openSUSE was to switch from KDE3 to
KDE4 before it had reached 4.3 - or was it 4.4? Resulted in permanently
lost data through a Konqueror bug.

Worst thing I saw someone else do happened about 35 years ago. A young
lad at work found a command to change the screen size of a VDU terminal.
After a few experiments, he tried an “x,y” of “1,1”. This just gave
room for the cursor with nowhere for it to move to, let alone for a new
command to be entered. The computer operators had to reboot the
mainframe (an IBM 360/195) in order to get the terminal functioning
again. The young lad wasn’t too popular.

Of course, many people have dropped a tray full of punched cards. A
nuisance, but especially if they hadn’t been verified and so had no
printing along the top edge.


Graham P Davis, Bracknell, Berks.
openSUSE 13.2 (64-bit); KDE 4.14.9; AMD Phenom II X2 550 Processor;
Kernel: 4.1.3; Video: nVidia GeForce 210 (using nouveau driver);
Sound: ATI SBx00 Azalia (Intel HDA)

On 2015-08-03 18:26, quinness wrote:
>
> As the title says…
> Have you done some stupid thing in openSUSE?

Several.

For instance… I was doing a backup with rsync. I did a second run to
compare files. Unfortunately, there was a “–delete” in the line, and I
made a mistake in the “destination” directory. This meant that no file
in the destination matched the source, and thus, everything in the
source was deleted.

And I had no recent backup, as the backup was of another directory…

Yiks.


Cheers / Saludos,

Carlos E. R.
(from 13.1 x86_64 “Bottle” at Telcontar)

:XWOW… Nice ones
I got a colleague that felt that the SQL-DB needed some data from a big costumer. But when the import was finished and other small stuff should be change the SQL-DB was empty…
But lucky for all of us the computer front desk backup everything every hour.
A short phone call : “Can you, ohh big master of computers (support), can you revert back to what it was 10 a.m.”
The person couldn’t look others in the eyes rest of the day.

I think it was on 11.3 or somewhere around that time. I removed all kernel packages and reloaded :slight_smile:
After that I wrote a guide how to recover your kernel from net-install dvd.

https://forums.opensuse.org/showthread.php/457265-How-to-recover-from-a-deleted-kernel

On 2015-08-04 09:46, glistwan wrote:
>
> I think it was on 11.3 or somewhere around that time. I removed all
> kernel packages and reloaded :slight_smile:
> After that I wrote a guide how to recover your kernel from net-install
> dvd.

LOL :slight_smile:


Cheers / Saludos,

Carlos E. R.

(from 13.1 x86_64 “Bottle” (Minas Tirith))

once have done a wrong rsync statement using an old one and editing it… (page up and find one to the folders I want to have a copy)
chanced the ip but forgot to change the path and the --delete option and bam! :’(

On 2015-08-04 16:26, maniat1k wrote:
>
> once have done a wrong rsync statement using an old one and editing it…
> (page up and find one to the folders I want to have a copy)
> chanced the ip but forgot to change the path and the --delete option and
> bam! :’(

Yep. That’s about the same as I did.


Cheers / Saludos,

Carlos E. R.

(from 13.1 x86_64 “Bottle” (Minas Tirith))

I backup my /home folder about every 10 days or so onto an external HDD.
I had 2 windows set up for both so I can D & D copy them. I hit in Edit>Select All then deleted the whole thing. that whole thing was my /home folder. What fun!!!
Ever since I set a warning for what I mark for deletion.

I was writing scripts as root user for the tar -G/-g behaviour, and I was in some /tmp directory. I knew it was wiser to use a regular user, but whatever, I already had some test environment setup and nothing really went wrong. But I wanted to test deleting and adding to and backup up and restoring large directory trees. The only large directory trees are the ones installed by the system. But, I guess, Instead of backup up one of those tries, I found it not worth the hassle although I understood the risks.

I deleted all of the directories in /usr/include/ that started with an “n”. Of course there was no real issue yet as I had a backup after all I was testing putting back backups and all. But I stopped doing that task and forgot what I had done.

Then today I was compiling some software package and it failed on <netinet/in.h> I believe. I found after a while (zypper wp didn’t work) that it belonged to glibc-devel. But it was installed. At that moment it dawned on me. But it was not over yet.

My way of restoring my backup used the -G option as I had become accustomed to use, but I’m very tired and depleted and did not Know what would happen.

The -G option deletes files that were not present in the backup. But since I had sinstalled a lot of -devel packages since, now all of those header files were gone :stuck_out_tongue: :D.

Since I had simply restored into /usr/include using -C /usr/include.

I go back to my compilation task and now it fails completely right away. Within seconds really I know what has happened. Bah.

So I created a list of all the -devel packages and put it into an array.

a=( zypper packages -i | grep devel | grep x86 | awk '{print $5}' )

Then I called zypper -f on the array:

zypper in -f ${a@]}

Then I apparently also needed to reinstall automoc4, not sure.

zypper in -f automoc4.

That was a weird error. Probably a problem with cmake output still remaining when I called it again.

Now it is building for the first time :D. So happy there was an easy fix. My last backup is a while ago (the rate of change I do is too fast for it now).

Upgrading from openSUSE 11.2 to 12.1 i liked to have LVM on the hdd.
But i didn’t make a complete backup from the first hdd, i thought i did and lost a lot of data.:frowning:
Also some very important stuff that i had to make again, that was work for a lot of days.:shame: