1The /rescue build system here has three goals:
31) Produce a reliable standalone set of /rescue tools.
5The contents of /rescue are all statically linked and do not depend on
6anything in /bin or /sbin. In particular, they'll continue to
7function even if you've hosed your dynamic /bin and /sbin. For
8example, note that /rescue/mount runs /rescue/mount_nfs and not
9/sbin/mount_nfs. This is more subtle than it looks.
11As an added bonus, /rescue is fairly small (thanks to crunchgen) and
12includes a number of tools (such as gzip, bzip2, vi) that are not
13normally found in /bin and /sbin.
152) Demonstrate robust use of crunchgen.
17These Makefiles recompile each of the crunchgen components and include
18support for overriding specific library entries. Such techniques
19should be useful elsewhere. For example, boot floppies could use this
20to conditionally compile out features to reduce executable size.
223) Produce a toolkit suitable for small distributions.
24Install /rescue on a CD or CompactFlash disk, and symlink /bin and
25/sbin to /rescue to produce a small and fairly complete FreeBSD
28These tools have one big disadvantage: being statically linked, they
29cannot use some advanced library functions that rely on dynamic
30linking. In particular, nsswitch, locales, and pam are likely to all
31rely on dynamic linking in the near future.
36# cd /usr/src/rescue
37# make obj
39# make install
41Note that rebuilds don't always work correctly; if you run into
42trouble, try 'make clean' before recompiling.