Re: ash vs. bash
On Mon, Jul 26, 1999 at 01:37:05AM +0200, Fabien Tassin wrote:
> According to Marco d'Itri:
> > >(*) with /bin/sh -> bash, there's no way to obtain a shell if you lose /lib.
> > You will need at least /bin/login too.
> not in single user mode where you only need /sbin/sulogin.
> $ file /sbin/sulogin
> /sbin/sulogin: ELF 32-bit LSB executable, Intel 80386, version 1, dynamically linked (uses shared libs), stripped
> $ ldd /sbin/sulogin
> libcrypt.so.1 => /lib/libcrypt.so.1 (0x40006000)
> libc.so.6 => /lib/libc.so.6 (0x40033000)
> /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x2aaaa000)
> ouch ! (oh yes, the latest sysvinit upgrade). Next time I will rename mine
> sulogin-static :)
Any rescue disk/cd can offer you more tools than a static sulogin and sash. A
rescue disk is also more convenient. Just plug it in, mount your root
partition and start to fix things. This works always, not only if /lib went
fubar, but also if you have problems with init etc.
ulysses:/var/spool/exim/input# ldd /sbin/init
libc.so.6 => /lib/libc.so.6 (0x40005000)
/lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x2aaaa000)
The decision to have everything linked with shared libraries was a good one.
Otherwise you end up linking everything on mother earth statically, just to
be able to repair your system under each and any failure situation.
Do It Right (tm) - Have A Rescue Disk Ready
`Rhubarb is no Egyptian god.' Debian http://www.debian.org finger brinkmd@
Marcus Brinkmann GNU http://www.gnu.org master.debian.org
Marcus.Brinkmann@ruhr-uni-bochum.de for public PGP Key
http://homepage.ruhr-uni-bochum.de/Marcus.Brinkmann/ PGP Key ID 36E7CD09