Path: usenet.ee.pdx.edu!not-for-mail From: rootd@ee.pdx.edu (Conan the Librarian) Newsgroups: comp.sys.sun.admin Subject: Re: Help! I accidently deleted /etc :-( Date: 11 Aug 1994 20:05:46 -0700 Organization: Portland State University, Portland, OR Lines: 52 Message-ID: <32eoua$buv@potrzebie.ee.pdx.edu> NNTP-Posting-Host: potrzebie.ee.pdx.edu When we last left our story, our hero had run openwindows as root, dragged a directory around a little bit, let go of the mouse button, and watched the directory (/etc !!) disappear! Since then, our hero has received some advice regarding how to restore the /etc directory structure. My comment: First, I'd like to categorically deny that I once ran openwindows as root, and made the same mistake. Rumors to that effect are absolutely false! Hypothetically speaking, however, had I made the same mistake, I would have realized a few things: First, when you drag a folder around in openwindows, and release it in the same folder in which it originated, an rm -rf command is NOT generated! The actual command that is generated is: mv Second, if this command were to be executed (successfully), the directory would be moved inside itself. Third, non-root users are not allowed to do this, so if a sun testing engineer tried this (as non root) he would not even report it as a bug (nothing's supposed to happen, and nothing did happen, so lets not worry about it and go do another 15 sendmail patches...) Fourth, if a root user did this, it would appear that the directory structure was deleted. In reality, however, the root inode no longer points to the /etc inode; instead the /etc inode has two entries which point to the /etc inode: the normal . link, and another "etc" directory which is within the etc directory! Fifth, that's just an "unreachable" inode (I can't remember the precise term). Sixth, that's what fsck fixes! If I had made that stupid mistake, I would have found a directory (labeled with an inode number) in lost+ found after the next fsck run. Running fsck may be a problem because /etc is on your root partition. Someone who knows the answer to that for certain can address that problem. Darrell Root rootd@ohsu.edu