Operating System - Tru64 Unix
cancel
Showing results for 
Search instead for 
Did you mean: 

Single user mode boot prompt = ">"

SOLVED
Go to solution
Joseph P. Smith
Regular Advisor

Single user mode boot prompt = ">"

Good Morning,

Essential information:
AlpahServer ES45 Model 2B
OS: Tru64 V5.1B, Rev 2650
FW: 6.7-2

At console prompt I enter >>> b -fl s in order to get to single user mode. Rather than the expected #, the system returns a ">" prompt. No environment is available, so C shell is also not available.

In order to execute any commands, e.g. mount file systems, the explicit path must be referenced. I don't necessarily have a problem doing this, but the unexpected behavior may point to deeper problem or misunderstanding.

I have used ITRC search function, & have ReadTheFunnyManual(s), but have not found a relevant article. If one is available, please reply with search string/pointer.

Answer is appreciated also. Thanks for your help.
Joe S.
8 REPLIES
Venkatesh BL
Honored Contributor

Re: Single user mode boot prompt = ">"

what is the output of 'mount'?. What is the shell chosen for root (from /etc/passwd)?
Joseph P. Smith
Regular Advisor

Re: Single user mode boot prompt = ">"

BL,

I think you're on to something. In /etc/passwd the shell for root is /bin/ksh.

However, "find / -name ksh", "whereis ksh", and "which ksh" all return "/usr/bin/ksh".

Because /usr is an ADVFS file system, /usr/bin/ksh is not available. If /sbin/bcheckrc is executed mount executes and it becomes so.

But,
ls -l /usr/bin/ksh /bin/ksh
-rwxr-xr-x ... /bin/ksh
-rwxr-xr-x ... /usr/bin/ksh

Why is /bin/ksh not used as /etc/passwd instructs?

I can't test right now. The system is a production server for financial applications, so a shutdown to single user mode would cause some heart aches.

I will test when it's available. Any other suggestions/experiences? Thank-you.

Joe Smith
Vladimir Fabecic
Honored Contributor

Re: Single user mode boot prompt = ">"

Try to change root login shell to /bin/sh.
In vino veritas, in VMS cluster
Joseph P. Smith
Regular Advisor

Re: Single user mode boot prompt = ">"

/bin/sh sounds about right.

I will use the most "vanilla" shell possible to avoid a lack of shell in single user mode.

Like I say, I will try when I can get the system away from those darn, pesky users - end of week 9/23 - 9/24.

Joe S.
Han Pilmeyer
Esteemed Contributor

Re: Single user mode boot prompt = ">"

Actually /sbin/sh is the correct shell for root. It should be a statically linked shell.

/bin is a symbolic link to /usr/bin. Usually it's okay to use /bin/ksh as the shell for the root account, but we only support /sbin/sh as the root shell.

I'm not sure why you got the ">" prompt, but I suspect you .profile may have something to do with it.
Joseph P. Smith
Regular Advisor

Re: Single user mode boot prompt = ">"

Good Morning,

Han's discussion revealed my ignorance of links. Of course ksh is in both /bin and /usr/bin! And because /bin/ksh is linked to the /usr file system that isn't yet mounted in single user mode, then it can't execute.
The ">" prompt is an artifact of root's .profile where
PS1="`hostname`> " executes.
(But, why doesn't hostname return the host's name at least? So much to learn, my brain hurts.)

Lessons learned:
1. If two files are identical in all respects, then one possibly/probably the two are linked, or there's link somewhere in one of their paths.

2. Don't expect things to work in single user if they reference items that aren't available, or run /sbin/bcheckrc at least, and create a nominal environment if that is appropriate.

3. Implement root's shell as /sbin/sh in root's etc/passwd entry.

I'll keep the thread open a bit longer, for additional comments, but I won't be able to subject the change on the production system to real-world conditions for a while.

Again, thanks. ... Joe S.
Han Pilmeyer
Esteemed Contributor
Solution

Re: Single user mode boot prompt = ">"

If you do a "ls -li" on a file, you get the i-node number of the file. If those are the same, the file is the same one.

The hostname isn't set until the init.d scripts run (when you go to multi-user mode).
Joseph P. Smith
Regular Advisor

Re: Single user mode boot prompt = ">"

Thus clearing up these last mysteries, and requiring that I dive more deeply into init.

I'm finding that *nix flavors always have a way of getting the info needed to understand.

Thanks. ,,, Joe S.

(splash)