1832592 Members
3206 Online
110043 Solutions
New Discussion

moved /usr/lib/dld.sl

 
dattu_1
Regular Advisor

moved /usr/lib/dld.sl

Hi guys,
plz help me out........one of the app guy has moved the /usr/lib/dls.sl file and now the server is not booting..........what do i do.........?please let me know.........
7 REPLIES 7
Robert-Jan Goossens
Honored Contributor

Re: moved /usr/lib/dld.sl

Hi,

Reset the server.

When system boots hit a key when you get the 10sec interupt message
enter
bo pri
Y - to interact with ipl
ISL> hpux -is (will boot to single user)

at hpux single user mode.
# mount -a
# /usr/lib/dld.sl.old /usr/lib/dld.sl
# shutdown -r -y now

Robert-Jan
dattu_1
Regular Advisor

Re: moved /usr/lib/dld.sl

Hi but im not able to use cp or move how will i rename it?..............
Robert-Jan Goossens
Honored Contributor

Re: moved /usr/lib/dld.sl

Hi,

can you mount /usr ?

# mount /usr

# mv ... ...

Regards,
Robert-Jan
dattu_1
Regular Advisor

Re: moved /usr/lib/dld.sl

Hi robert,
I can mount /usr.....with mount -o rw /usr
but not able to use cp,mv at all....giving /usr/lib/dld.sl error..........


Bill Hassell
Honored Contributor

Re: moved /usr/lib/dld.sl

It sounds like you have messed with root's shell. You CANNOT have any other shell for root except /sbin/sh. The reason is that the sbin directory contains the commands which do not require /usr (and the /usr/lib directory) to be available.

To get out of your current mess, use this command:

mount /usr
/sbin/mv /wrong/dld.sl /usr/bin

Then you should be able to reboot. The next step is to change root's shell to /sbin/sh and then to immediately change root's password and never give it to the DBA again. Most likely, the DBA is trying to 'fix' HP-UX to match some other system like Linux -- a plan that will destroy your system.


Bill Hassell, sysadmin
Steve Post
Trusted Contributor

Re: moved /usr/lib/dld.sl

Remember when using the mv command, used the full path /sbin/mv. The cp command is not here.
(I'm pretty sure I got this right, others can correct me easily enough.)
When you run cp, it is trying to use that dld.sl program. Since the dld.sl file is moved, it won't find it. So it bombs out.
bdf? yep. same thing.

I actually had a similar problem once after a disaster. My solution was to boot up into maintenance mode via an ignite tape shell. Then I ran:
/sbin/mount /dev/vg00/lv??? /usr
mv /usr/bin/dld.sl.mistake /usr/bin/dld.sl
Then I rebooted.

If you're lucky, you will not need to boot from ignite.

dattu_1
Regular Advisor

Re: moved /usr/lib/dld.sl

Hi Bill,
i even tried that i.e. /sbin/mv...but was not able to do it........I just booted it from ignite and restored /usr......