Operating System - HP-UX
1833016 Members
2680 Online
110048 Solutions
New Discussion

mounting /usr in recovery mode

 
SOLVED
Go to solution
TMcB
Super Advisor

mounting /usr in recovery mode

Hi everyone

Our server wont boot as it gives an error message - can't find dld.sl.
If I boot in single user mode, I get the same error message.

So I have been able to boot from OS cd and go into recovery mode.
The / file system is mounted as /ROOT, but the /usr folder is empty.
When I try to use mount command I get :
/sbin/sh : mount : not found.

Does anyone tell me how I can get /usr mounted in recovery mode.

Much appreciated
5 REPLIES 5
Solution

Re: mounting /usr in recovery mode

Probably down to PATH being set incorrectly - does /ROOT/sbin/mount not work?

HTH

Duncan

I am an HPE Employee
Accept or Kudo
Dennis Handly
Acclaimed Contributor

Re: mounting /usr in recovery mode

There is something wrong if during the boot process it wants to run a program with shlibs. And it shouldn't occur in single user mode either.

Does it tell you the name of the executable that wants to use dld?

Did you happen to illegal change the shell for root? You absolutely must NEVER change it from /sbin/sh.

But since you an error with "/sbin/sh", perhaps that isn't it? Or the recovery CD fixes your shell goof up?

You could have broken the shell PATH? Try using "/sbin/mount -a"
TMcB
Super Advisor

Re: mounting /usr in recovery mode

Hi guys

I have /usr now mounted after rebooting into single usr mode and setting PATH to include /sbin - thanks for the pointer on that.

The file that is causing me trouble is /usr/lib/dld.sl.

Initially we were having trouble with our applications (they dive an error against dld.sl) so I recovered this file from an older version to dld2.sl. It wouldnt let me overwrite dld.sl, so I deleted it - but it then wouldnt let me rename dld2.sl back to dld2.sl.

I'm back now to seeing the file /usr/lib/dld2.sl; but it wont let me copy or rename this to /usr/lib/dld.sl.

When I try to copy or rename, I get the error message :
crt0: ERROR couldnt open /usr/lib/dld.sl error no 000000002.

Any ideas how I can get dld2.sl back to dld.sl?
Thanks

Re: mounting /usr in recovery mode

The problem is (I suspect) that the cp command itself uses shared libraries.

So firstly you have to be in single user mode, and then have mounted /usr

Then instead of tring to use cp, use /sbin/cat :

/sbin/cat /usr/lib/dld2.sl > /usr/lib/dld.sl

HTH

Duncan




I am an HPE Employee
Accept or Kudo
Dennis Handly
Acclaimed Contributor

Re: mounting /usr in recovery mode

>I'm back now to seeing the file /usr/lib/dld2.sl; but it wont let me copy or rename this to /usr/lib/dld.sl.

If the system is up, you should use ln -f:
# ln dld.sl dld.sl.old
# ln -f dld2.sl dld.sl
# rm dld2.sl # if you want

If you have already broken dld.sl, then you can use /sbin/ln.

And finally if that doesn't work, you can use the /sbin/link hammer.

>Duncan: The problem is (I suspect) that the cp command itself uses shared libraries.

Exactly.

>So firstly you have to be in single user mode, and then have mounted /usr

These are not the droids you want. ;-)

>Then instead of trying to use cp, use /sbin/cat

This is not the way to do it.
The proper way is ln or /sbin/ln. (You do have to be on the same filesystem.)
If the link count of the target is 2, then ln -f can rename to that file.