Subject: Re: single user mode file comparisons
To: William Allen Simpson <wsimpson@greendragon.com>
From: Luke Mewburn <lukem@netbsd.org>
List: current-users
Date: 06/09/2003 10:27:03
On Sun, Jun 08, 2003 at 06:14:07PM -0400, William Allen Simpson wrote:
  | There are many files that are in /rescue, but not in /bin or /sbin:
  |   bunzip2
  |   bzcat
  |   bzip2
  |   ftp
  |   gunzip
  |   gzcat
  |   gzip
  |   kdump
  |   ktrace
  |   ktruss
  |   ldd	
  |   zcat
  | 
  | Is there any rationale for how these were chosen?  It's not obvious 
  | why a "rescue" program wouldn't be used in single user mode.

All of those programs (with the exception of ftp) used to be statically
linked even though they were in /usr/*bin, to assist in the recovery
of the system if the shared libraries were corrupted.  (As /rescue is
provided for that purpose, those programs are now dynamically linked
again.)

/rescue is intended to help you recover your system in the event of
various failures, which is why programs such as ftp have been added
to it; whilst ftp is not necessary to get a system from single-user
mode (possibly with a minimal / and separate /usr) to multi-user mode,
it can be extremely handy in recovering a system that is broken.

There are some programs in /rescue which are only there because the
"master" copy is in /bin and /sbin, and may not strictly be necessary
for a "system recovery" directory.  It was just "easier" to provide
all of the /bin and /sbin programs as part of /rescue.