Major problem trying to install 5.0beta3 for linux

  Yesterday, I downloaded the linux binary tarball for 5.0beta3. During
lunch today I decided to install it. Not knowing whether or not the tar file
creates its own base directory (but assuming that it did), I copied the
tarball to /usr3, a partition physically located on another machine on my
network.

  I gunzipped and untarred the file in one step and watched files being put
into directories with names of /bin, /dev, /etc, /driver, /fonts, /garde.
/txt and so on. These all showed up as subdirectories under the /usr3
partition. Since I want all of GRASS in a directory called
/usr3/GRASS-5.0beta3, I started rm'ing the files and directories. It was
after I invoked 'rm -rf /bin' that I discovered that I trashed the /bin
directory on my main workstation!!

  This is not a subdirectory under /usr3 located on a nfs-mounted partition,
but the basic /bin directory on the machine to which I am logged in! The
only thing I can figure has happened is that a symbolic link has been
created from the system directories under / so that they appear as
directories under /usr3.

  Unfortunately, I am having major problems with my tape backup system (it
has been running now for 28.5 hours and is only 93% complete on a 5.4G
backup. The drive manufacturer shipped a replacement drive over night (it's
sitting here now), but I now have to wait for this backup to complete and
hope that I can restore /bin from it.

  This is a terribly dangerous situation. When I installed the last 4.x.x
release of GRASS, none of this occurred. I'm not sure what to do about
cleaning up the directory structure now and getting the 5.0 beta in the
right place. In the meantime, every executable program and utility in /bin
(such as 'ls') is gone.

Rich

Dr. Richard B. Shepard, President

                       Applied Ecosystem Services, Inc. (TM)
              Making environmentally-responsible mining happen. (SM)
                       --------------------------------
            2404 SW 22nd Street | Troutdale, OR 97060-1247 | U.S.A.
+ 1 503-667-4517 (voice) | + 1 503-667-8863 (fax) | rshepard@appl-ecosys.com

Hello Rich,
to you happend, what happens to every unix system administrator sooner
or later. You used the power of "rm -rf".

Generally you should be _very_ careful about issueing "rm -f" at all.
If a "-f" and wildcards are in the game it is like doing surgery on the
open heart. :slight_smile:

On Wed, Sep 22, 1999 at 12:34:48PM -0700, Rich Shepard wrote:

Not knowing whether or not the tar file
creates its own base directory (but assuming that it did), I copied the
tarball to /usr3, a partition physically located on another machine on my
network.

Be absolutely sure what your commands do.
I test every unpacking command first, if operating under
such conditions.
  tar -tvmlzf file.tar.gz
usually tests it.

  I gunzipped and untarred the file in one step and watched files being put
into directories with names of /bin, /dev, /etc, /driver, /fonts, /garde.
/txt and so on. These all showed up as subdirectories under the /usr3
partition. Since I want all of GRASS in a directory called
/usr3/GRASS-5.0beta3, I started rm'ing the files and directories. It was
after I invoked 'rm -rf /bin' that I discovered that I trashed the /bin
directory on my main workstation!!

I testdrive superuser rm commands with a
  ls whatever
first.

If you actually did a "rm -rf /bin" then you targeted the root "/bin"
directory. You wanted a "rm -r ./bin" (being in the right directory)
or an "rm -r /usr3/bin".

  This is a terribly dangerous situation. When I installed the last 4.x.x
release of GRASS, none of this occurred. I'm not sure what to do about
cleaning up the directory structure now and getting the 5.0 beta in the
right place. In the meantime, every executable program and utility in /bin
(such as 'ls') is gone.

Next time, unpack the stuff not as root, but as a new user for this
purpose and in its own directory, like you did. E.g. create "grass" as user
and as group. As "grass" you cannot eliminate root's files.
You might need to set a few paths after installation being root, but it
generally is worth the trouble.

And be more carefull with your superuserpowers.

Tonge-in-cheek-ly-yours,
  Bernhard
--
Research Assistant, Geog Dept UM-Milwaukee, USA. (www.uwm.edu/~bernhard)
Association for a Free Informational Infrastructure (ffii.org)