[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: shells & re: profile



On Wed, 10 Feb 1999, Ofer Maor wrote:

>It is not bad.
>I do it too.
>Many system administrators like, however, to use sh/bash.
>
>In any case - it IS important that your tcsh will be on the root partition
>(e.g. - if ur tcsh is under /usr/local/bin/tcsh, and /usr is only mounted
>later on - don't use it as your root's default shell) - to allow you better
>operability in case of mount problems.
>
>ofer.

On Linux there is a tiny sh-lookalike that can be statically linked w/o
consuming much memory. It is called ash and has a very small footprint.
Can be recompiled with -static. It is used in all Slackware boot / root
floppy sets. I think that it is possible to run an ash instance directly
from the startup script to have it in case of oops.

BTW if you don't static-link init and login a static bash will not be very
helpfull:

plp:~ $ ldd $(which init)
        libc.so.5 => /lib/libc.so.5.3.12
plp:~ $ ldd $(which login)
        libc.so.5 => /lib/libc.so.5.3.12
plp:~ $ ldd $(which bash)
        libtermcap.so.2 => /lib/libtermcap.so.2.0.8
        libc.so.5 => /lib/libc.so.5.3.12
plp:~$ ldd $(which getty)
        libtermcap.so.2 => /lib/libtermcap.so.2.0.8
        libc.so.5 => /lib/libc.so.5.3.12

The other option is, to make copies of the vital libs into the
(empty) directory where the real /usr/lib etc gets mounted. If the mount
succeeds then these will become invisible. If it fails, they are there. 

Peter