Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

how to recover ld.so.1

500 views
Skip to first unread message

winter_of...@my-dejanews.com

unread,
May 6, 1999, 3:00:00 AM5/6/99
to
I accidentally moved ld.so.1 under /usr/lib to ld.so.1.old. Now I cannot run
any UNIX command in my shell session. They all came back with the error
message Cannot find /usr/lib/ld.so.1 Even with mv and cp command.

The only thing I can run is shell buildin since I have a shell window open for
root login. I cannot create a new login session, nor can I ftp or telnet into
the machine.

Is there any way to recover the file?

Thanks,

Winter

-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own

Barry Margolin

unread,
May 6, 1999, 3:00:00 AM5/6/99
to
In article <7gt2fk$mpv$1...@nnrp1.deja.com>,

<winter_of...@my-dejanews.com> wrote:
>I accidentally moved ld.so.1 under /usr/lib to ld.so.1.old. Now I cannot run
>any UNIX command in my shell session. They all came back with the error
>message Cannot find /usr/lib/ld.so.1 Even with mv and cp command.
>
>The only thing I can run is shell buildin since I have a shell window open for
>root login. I cannot create a new login session, nor can I ftp or telnet into
>the machine.

Boot from cd-rom, mount the file system, and rename it.

--
Barry Margolin, bar...@bbnplanet.com
GTE Internetworking, Powered by BBN, Burlington, MA
*** DON'T SEND TECHNICAL QUESTIONS DIRECTLY TO ME, post them to newsgroups.
Please DON'T copy followups to me -- I'll assume it wasn't posted to the group.

gopal...@my-dejanews.com

unread,
May 6, 1999, 3:00:00 AM5/6/99
to
In article <7gt2fk$mpv$1...@nnrp1.deja.com>,
winter_of...@my-dejanews.com wrote:
> I accidentally moved ld.so.1 under /usr/lib to ld.so.1.old. Now I cannot run
> any UNIX command in my shell session. They all came back with the error
> message Cannot find /usr/lib/ld.so.1 Even with mv and cp command.
>
> The only thing I can run is shell buildin since I have a shell window open for
> root login. I cannot create a new login session, nor can I ftp or telnet into
> the machine.
>
> Is there any way to recover the file?
>
> Thanks,
>
> Winter
>
> -----------== Posted via Deja News, The Discussion Network ==----------
> http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
>
Use the installation CD( ok boot cdrom) or Jumpstart (ok boot net) and open a
cmdtool using the rightmouse button click.
mount /dev/dsk/c0t3d0sx (usr filesystem) on /a/usr, cd to /a/usr/lib and mv
ld.so.1.old ld.so.1, Sync the filesystems and reboot.
-Gopal

Peter Wittich

unread,
May 6, 1999, 3:00:00 AM5/6/99
to
In comp.unix.solaris winter_of...@my-dejanews.com wrote:
> I accidentally moved ld.so.1 under /usr/lib to ld.so.1.old. Now I cannot run
> any UNIX command in my shell session. They all came back with the error
> message Cannot find /usr/lib/ld.so.1 Even with mv and cp command.
> [...]

> Is there any way to recover the file?

I think /usr/sbin/static/mv exists for this purpose.

Peter

--
Peter Wittich
Dept. of Physics, U.Penn There's no small talk on walkie-talkies.
wit...@upenn5.hep.upenn.edu
------------------------------------------------------------------

Jim Davis

unread,
May 6, 1999, 3:00:00 AM5/6/99
to
In article <7gt2fk$mpv$1...@nnrp1.deja.com>,

<winter_of...@my-dejanews.com> wrote:
:I accidentally moved ld.so.1 under /usr/lib to ld.so.1.old. Now I cannot run
:any UNIX command in my shell session. They all came back with the error
:message Cannot find /usr/lib/ld.so.1 Even with mv and cp command.

There are a few commands in /usr/sbin/static, including mv and cp,
that might save the day.
--
Jim Davis | "Professor! You turned it down again!!"
jda...@CS.Arizona.EDU | -- Bubbles

bill schaub

unread,
May 7, 1999, 3:00:00 AM5/7/99
to
In article <7gt2fk$mpv$1...@nnrp1.deja.com>,
<winter_of...@my-dejanews.com> wrote:
>I accidentally moved ld.so.1 under /usr/lib to ld.so.1.old. Now I cannot run
>any UNIX command in my shell session. They all came back with the error
>message Cannot find /usr/lib/ld.so.1 Even with mv and cp command.
>
>The only thing I can run is shell buildin since I have a shell window open for
>root login. I cannot create a new login session, nor can I ftp or telnet into
>the machine.
>
>Is there any way to recover the file?
>
>Thanks,
>
>Winter
>
Ever hear of boot media and a single user shell ?

winter_of...@my-dejanews.com

unread,
May 7, 1999, 3:00:00 AM5/7/99
to
Thanks a lot. That saved my day.

I thought there might be some static linked program there, and even looked
into /usr/sbin (using echo *, of course :), but never noticed the static
subdirectory.

One interesting point I'd like to share. In an effort to assembly a "cp"
command with shell buildin, I tried the following, but it did not succeed in
copying all the bytes.

while read -r save
do
print -R $save >> ld.so.1
done < ld.so.1.old

Winter

In article <7gt3mv$8no$1...@netnews.upenn.edu>,
Peter Wittich <wit...@higgs.hep.upenn.edu> wrote:


> In comp.unix.solaris winter_of...@my-dejanews.com wrote:
> > I accidentally moved ld.so.1 under /usr/lib to ld.so.1.old. Now I cannot
run
> > any UNIX command in my shell session. They all came back with the error
> > message Cannot find /usr/lib/ld.so.1 Even with mv and cp command.

> > [...]


> > Is there any way to recover the file?
>

> I think /usr/sbin/static/mv exists for this purpose.
>
> Peter
>
> --
> Peter Wittich
> Dept. of Physics, U.Penn There's no small talk on walkie-talkies.
> wit...@upenn5.hep.upenn.edu
> ------------------------------------------------------------------
>

-----------== Posted via Deja News, The Discussion Network ==----------

Casper H.S. Dik - Network Security Engineer

unread,
May 7, 1999, 3:00:00 AM5/7/99
to
[[ PLEASE DON'T SEND ME EMAIL COPIES OF POSTINGS ]]

winter_of...@my-dejanews.com writes:

>I accidentally moved ld.so.1 under /usr/lib to ld.so.1.old. Now I cannot run
>any UNIX command in my shell session. They all came back with the error
>message Cannot find /usr/lib/ld.so.1 Even with mv and cp command.

>The only thing I can run is shell buildin since I have a shell window open for


>root login. I cannot create a new login session, nor can I ftp or telnet into
>the machine.


Try /usr/sbin/static/mv (may not exist)

Casper
--
Expressed in this posting are my opinions. They are in no way related
to opinions held by my employer, Sun Microsystems.
Statements on Sun products included here are not gospel and may
be fiction rather than truth.

Barry Margolin

unread,
May 7, 1999, 3:00:00 AM5/7/99
to
In article <7guq36$61r$1...@nnrp1.deja.com>,

<winter_of...@my-dejanews.com> wrote:
>One interesting point I'd like to share. In an effort to assembly a "cp"
>command with shell buildin, I tried the following, but it did not succeed in
>copying all the bytes.
>
>while read -r save
>do
> print -R $save >> ld.so.1
>done < ld.so.1.old

That will work for text files, but almost certainly can't deal with the
null bytes that exist in binary files. Most commands that ordinarily deal
with text use C's string functions, which treat a null byte as the end of
string marker, and thus ignore anything on the line after the null.

Chris Thompson

unread,
May 7, 1999, 3:00:00 AM5/7/99
to
In article <casper.9...@nl-usenet.sun.com>,
Casper H.S. Dik - Network Security Engineer <Caspe...@Holland.Sun.Com> wrote:
[...]

>
>Try /usr/sbin/static/mv (may not exist)

Specifically, the /usr/sbin/static contents are in package SUNWsutl. This is
included in the SUNWCall cluster, but not (for example) in the SUNWCprog one.

Chris Thompson
Email: cet1 [at] cam.ac.uk

Christopher Ho

unread,
May 10, 1999, 3:00:00 AM5/10/99
to
How about for the "ls" command? That would be useful doing guest FTPs
with WU-FTPD.

--
ChrisHo

On 6 May 1999 22:05:19 GMT, Peter Wittich
<wit...@higgs.hep.upenn.edu> wrote:

>In comp.unix.solaris winter_of...@my-dejanews.com wrote:
>> I accidentally moved ld.so.1 under /usr/lib to ld.so.1.old. Now I cannot run
>> any UNIX command in my shell session. They all came back with the error
>> message Cannot find /usr/lib/ld.so.1 Even with mv and cp command.

0 new messages