On Tue, May 21, 2002 at 03:46:47PM -0700, Karl E. Jorgensen wrote:
> On Tue, May 21, 2002 at 12:58:48PM -0700, Petro wrote:
> >     This is something that has been bothering me for a while now. 
> >     See, you guys who put these distributions together are pretty
> >     bright. It takes a lot of work, and I see a lot of the discussions
> >     that go in to figuring out all the nit-picky little details that
> >     give polish to a distribution. 
> >     However, one thing is driving me absolutely Bug F*** crazy. 
> >     I use, or have used several versions of RedHat and SuSe, and now I'm
> >     on my second "version" of Debian. 
> >     Why the sam hell is there not, by default, no questions asked, it's
> >     installed because it's *right*, a statically linked /sbin/sh as
> >     roots default shell? 
> You do have a valid point, but a statically linked root shell will not
> always work. At least you shouldn't rely on it being sufficient...

    You don't rely on your airbag (no, not your local politician, the
    one in your car) being sufficent, nor your seat belt (or if you ride
    a motorcycle, your Helmet etc.), however you want them there when
    you need them, right? 

> If you were to nuke /lib/ld-linux.so* (or other essential libraries),
> then chances are that you won't be able to log in anyway:
> $ ldd /sbin/getty
>       libc.so.6 => /lib/libc.so.6 (0x4001d000)
>       /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)
> [OK. I admit that if you can find an already-running getty, this may be
> a moot point]
> $ ldd /bin/login
>       libcrypt.so.1 => /lib/libcrypt.so.1 (0x4001d000)
>       libpam.so.0 => /lib/libpam.so.0 (0x4004a000)
>       libpam_misc.so.0 => /lib/libpam_misc.so.0 (0x40053000)
>       libdl.so.2 => /lib/libdl.so.2 (0x40056000)
>       libc.so.6 => /lib/libc.so.6 (0x40059000)
>       /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)
> Besides, even /sbin/init is dynamically linked, so a severly damaged
> system won't be able to boot...

    I'm not so much worried about rebooting, as trying to diagnois and
    scavange an already running system. 

> So, to follow your line of thought (i think), then at least getty &
> login need to be statically linked too. And init if you plan on
> rebooting using only the existing (hypothetically damaged) root fs. And
> you need to prepare by having root's login shell be statically linked.

    Yeah, it might be a good idea to build static versions of those as
    well. 

> To repair such a system you may need other tools, e.g. dpkg, ar, apt-get
> (which for the purposes of this, are rather inconveniently located in
> /usr), mount, tar and gzip. All of which (i believe) are dynamically
> linked.

    Mostly just some basic copy tools. 

    Looks like I'm going to have to learn how to make custom debs. 

> As others have suggested, sash will help here - assuming that you can
> log in...
> Another solution could be to boot your kernel with init=/bin/sash. And
> make sure that this boots with the root fs in read-write mode; as the
> mount command is dynamically linked...
 
> At least you should always be able to boot from the install floppies,
> and mount/fsck your root filesystem from there. If not, then it's time
> for you to create new boot floppies. The standard ones may not have a
> suitable kernel if you have some esoteric hardware...

    You say that like I can wander over and stick a floppy in.

    The vast majority of my machines, and the ones I worry about are 50
    miles from here. 

    


-- 
My last cigarette was roughly 29 days, 14 hours, 30 minutes ago.
YHBW


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to