1833758 Members
2544 Online
110063 Solutions
New Discussion

Re: filesystems recovery

 
Juan Borras
New Member

filesystems recovery

Hi,
My init can't find /bin/sh and therefore no logins are allowed. Ops!
No Ignite nor other fancy tools installed.
HP9000 A400 server. No tape, only external CD available.
Strategy: boot from CD and try to mount manually all filesystems.
But how?
Thanks in advance,
JC
7 REPLIES 7
Andy Monks
Honored Contributor

Re: filesystems recovery

Root should be able to log in. Assuming your on a network and only /usr/bin/sh is missing (/bin is linked to /usr/bin). you could just ftp sh over from another machine. Is anything else missing in /usr?
Sandor Horvath_2
Valued Contributor

Re: filesystems recovery

Hi !

Power on server, and interrupt booting whet You see in console.
search CD driver with sea command
boot from CD with bo CD_HW_path command
example>
boot 0/0/1/0.1
Interact with IPL (Y, N, or Cancel)?> n

choose Run a Recovery Shell option.

regards, Saa
If no problem, don't fixed it.
Clemens van Everdingen
Honored Contributor

Re: filesystems recovery

If user root is the only problem then there is a possiblity that the account for root in /etc/passwd has the wrong shell.

In Ux-11.00 it should be /bin/sh instead of /bin/ksh.

Boot in single user mode and check /etc/passwd.
Had this one myself once.

Good luck,
CvE
The computer is a great invention, there are as many mistakes as ever, but they are nobody's fault !
Dan Hetzel
Honored Contributor

Re: filesystems recovery

Hi,

Watch out !!! root shell HAS TO BE /sbin/sh and NOT /bin/sh.

As the /bin directory is a symbolic link to /usr/bin, the shell /bin/sh won't be available at boot time as long as /usr isn't mounted.

/sbin/sh is the only statically linked shell, all other shell are dynamically linked and need access to the /usr/lib directory.

You should URGENTLY correct this in the passwd file.

Best regards,

Dan
Everybody knows at least one thing worth sharing -- mailto:dan.hetzel@wildcroft.com
James R. Ferguson
Acclaimed Contributor

Re: filesystems recovery

Juan:

It sounds like you may only have lost (removed) your transition links. At the root directory (/) an ls should show:

lr-xr-xr-t 1 root sys ... bin -> /usr/bin
lr-xr-xr-t 1 root sys ... lib -> /usr/lib

If not, then you can recreate these by doing:

# /opt/upgrade/bin/tlremove
# /opt/upgrade/bin/tlinstall -v

...JRF...
Clemens van Everdingen
Honored Contributor

Re: filesystems recovery

good remarks,

I forgot the s from s(bin)/sh

CvE
The computer is a great invention, there are as many mistakes as ever, but they are nobody's fault !
Juan Borras
New Member

Re: filesystems recovery

Hi all,
Worst than that: my root shell was /bin/bash which as you all well know is actually /usr/bin/bash due to the /bin symlink.
Therefore the binary was not available at that point since no other filesystems than / were mounted at that time.
(In fact it was worst than that since that binary was dynamically
linked...).
However the start-up procedure complained of a missing /sbin/sh which is not the case at all since /sbin/sh did actually exist.
Anyway, I nice guy came along with a portable CD and we try to mount the filesystems by using the recovery CD. We didn't succeed so we
used a second SCSI hard disk. We installed HP-UX on the later, booted the machine from it and finally we mounted the old filesystems and
fixed the darn /etc/passwd entry.
Time needed to make the fix: 10 sec.
Time until we mounted the filesystems: 4 h.
I have ordered an external CD already. This thing shouldn't happen again, but just in case.

Anyway, I'm a happy newbie administrator again since the server actually boots and I even got rid of the flashing "Attn" LED.

Yeah, HP-UX is not exactly a Linux box.
Thanks to all for the answers. Though I'm afraid you'll keep reading me.
Clemens, could you please contact me for a small remark?
Best Regards,
juan.borras@smartner.com