Summary: Urgent! ld.so

From: Zhiyi Huang (zh@cc.bellcore.com)
Date: Thu May 30 1996 - 10:55:15 CDT


Thanks a lot to all of you who give me very good suggestions.

I've solved my problem by:

1) Using 'tar' command to copy "mount" and "ld.so" to a floppy;

2) Boot the system from a CDROM, install miniroot to my system disk's
swap space (partition "b");

3) Using 'tar' command to copy "mount" to my just-installed miniroot's
"/bin" directory from that floppy;

4) Using "mount" to mount my /usr's partition to /mnt;

5) Using "tar" to copy "ld.so" to /mnt/lib/ld.so from that floppy;

6) reboot.

-------------------------------
My original question was:
-------------------------------
>I removed /usr/lib/ld.so by mistake. I cannot type in any command now.
>Please help!
>Thanks a lot!
>-Judy

---------------------------------
Here are some good suggestions:
---------------------------------
1) From: Kris Briscoe <hxktb0@svho1ds_1.supervalu.com>
To: zh@cc.bellcore.com
Subject: Re: Urgent!!! /usr/lib/ld.so

boot cdrom, create mini-root, and recover from backup tape.

2) From: Anders Hammarquist <iko@dd.chalmers.se>
He, that's not fun I bet. If you can NFS-export /usr/lib/ld.so
from somewhere you should be able to get your system up using the
following procedure...

If you are NOT running sh, start /sbin/sh (statcially linked version
of sh - doesn't need ld.so). If your system is down, boot it
single-user. That will hopefully drop you into an sh shell...

Type:

shcat() {
        while test $# -ge 1
        do
                while read i
                do
                        echo "$i"
                done < $1
                shift
        done
}
then mount the filesystem with ld.so on an existing directory (mkdir
is not statically linked :( ) using

/sbin/mount box:/path /local_path

(/tmp is probably a good place if you rebooted the machine)

and then comes the fun part - copying ld.so...

shcat /path/to/ld.so > /usr/lib/ld.so

Now, if you rebooted you may need to fsck /usr before you can write to
it. Do

/etc/fsck /usr (or possibly special)

and then

/sbin/mount -o remount /usr

if none of this works, or if you can't find ld.so to NFS from
somewhere you need to boot from tape/cd/net and reinstall ld.so from
there. (If you can boot net, you can probably find an ld.so to NFS on
the boot server)

Good luck!

/Anders

3) From: Venkata Ramakrishna R <ramu@duettech.com>
you have to physically attach this disk to the other system and copy
ld.so. I think this is the only option you have.

-Ramu.

4) From: Herbert Wengatz <hwe@uebemc.siemens.de>
To: Zhiyi Huang <zh@cc.bellcore.com>
Subject: Re: Urgent!!! /usr/lib/ld.so

Reboot the system via CDROM or tape, install a mini-Solaris into your
old swap-space, then try to install networking support and try to get an
equivalent ld.so from another machine. (Mount you old "/usr" first!)

Lost of work, not easy to explain all that. - Else: reinstall your whole
system.
(Hope you do backups regularly...)

Good luck!

Herbert

5) From: Matt Hill <MHILL@graver.com>
To: zh@cc.bellcore.com
Subject: Re: Urgent!!! /usr/lib/ld.so

if you only moved it, not removed it, then you can use sln
(statically linked ln) to link it from the correct place, to get back
up and running again. you should still be able to use all the shell
built in commands, such as cd and echo. remember you can use echo *
as an acceptable ls.

if you actually removed it from your system, then no dynamically
linked programs can run until you get it back. since cp is
dynamically linked, you can't just copy it back. you will need to
halt your system (crash it if you have to) then find your original
SunOS install cd and bring the system up with a miniroot. then mount
the necessary filesystems from your hard drive onto the miniroot and
copy the file back from the cd.

 
HHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHH
                        Judy Z. Huang
http://www-ec.njit.edu/~zxh2341 http://ipoh.bellcore.com/~judyh
email:zh@cc.bellcore.com Tel:(908)699-3551 Beeper:(908)633-3181
Bellcore, 6 Corporate Place, Piscatway, NJ 08854-4199
HHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHH



This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:11:00 CDT