Operating System - HP-UX
1832276 Members
1892 Online
110041 Solutions
New Discussion

Bad Shell - System didn't boot!!!!

 
SOLVED
Go to solution
GTI
Occasional Advisor

Bad Shell - System didn't boot!!!!

Hello Everybody,

I've made some changes in the 10.20 aiming enable the "bash" shell. Unfortunately, when the system rebooted, the following message appeared:

"
/sbin/ioinitrc:

INIT: SINGLE USER MODE

INIT: WARNING: Bad shell "/usr/bin/bash" for root
FIX root ENTRY in /etc/passwd AND REBOOT !!!
"

Could somebody give me a clue ?

Stenio
12 REPLIES 12
Patrick Wallek
Honored Contributor
Solution

Re: Bad Shell - System didn't boot!!!!

Do NOT EVER use any shell other than /sbin/sh for root. If you do you will have MAJOR problems rebooting the system.

To correct this, boot into single-user mode, which you may already be at, activate the vg00 volume group (vgchange -a y /dev/vg00) mount your root filesystems (mount -a -- don't worry about failures of other volume groups) and use the vipw command to edit the password file and fix the root user.

melvyn burnard
Honored Contributor

Re: Bad Shell - System didn't boot!!!!

The clue is in the error message you got.
You should not change the root shell to anything other than POSIX /sbin/sh shell.

As posted already, you need to fix this.
My house is the bank's, my money the wife's, But my opinions belong to me, not HP!
A. Clay Stephenson
Acclaimed Contributor

Re: Bad Shell - System didn't boot!!!!

HI,

You did a bad,bad thing.

First, unless /usr/bin/bash is in /etc/shells,
you can't use it.
Secondly, in single user mode /usr is not mounted.

Clay
If it ain't broke, I can fix that.
James R. Ferguson
Acclaimed Contributor

Re: Bad Shell - System didn't boot!!!!

Hi:

...as the others have aptly noted, you "bash"ed yourself. root's shell *must* always be /sbin/sh.

...JRF...
GTI
Occasional Advisor

Re: Bad Shell - System didn't boot!!!!

Thank you for the tips.

It will be simple if I had a shell available. There is nothing available (vi, ls, mount, vgchange, ...).

What should I do now?

Stenio.


-----------------------------------------------
Hello Everybody,

I've made some changes in the 10.20 aiming enable the "bash" shell. Unfortunately, when the system rebooted, the following message appeared:

"
/sbin/ioinitrc:

INIT: SINGLE USER MODE

INIT: WARNING: Bad shell "/usr/bin/bash" for root
FIX root ENTRY in /etc/passwd AND REBOOT !!!
"

Could somebody give me a clue ?

Stenio


Do NOT EVER use any shell other than /sbin/sh for root. If you do you will have MAJOR problems rebooting the system.

To correct this, boot into single-user mode, which you may already be at, activate the vg00 volume group (vgchange -a y /dev/vg00) mount your root filesystems (mount -a -- don't worry about failures of other volume groups) and use the vipw command to edit the password file and fix the root user.


melvyn burnard


---------------------------------
The clue is in the error message you got.
You should not change the root shell to anything other than POSIX /sbin/sh shell.

As posted already, you need to fix this.
Ramon Irizarry_1
Occasional Contributor

Re: Bad Shell - System didn't boot!!!!

You'll have to hard boot the system.
Stop the boot process by hittin
Type bo pri
When it ask you if you want to interact with ISL?
Answer [Y]
In the ISL> prompt type: hpux -is
When you get a root prompt #
Type vipw --> this will let you edit your passwd file.
Change the root shell to /sbin/sh.

and
init 3

Or
try to mount your
/usr /var.

If it fails you would have to fsck /dev/vg00/lvolxx where /usr and /var are.
Then mount /usr and /var
and vi your passwd file and edit it.

Mark Vollmers
Esteemed Contributor

Re: Bad Shell - System didn't boot!!!!

You could always boot from a recovery disk, if you have one. I'd do this as a last resort, if you can't get it any other way. Of course, this is assuming that the bash shell isn't in the recovery disk. I guess you could go to the CD as well. Good luck!

Mark
"We apologize for the inconvience" -God's last message to all creation, from Douglas Adams "So Long and Thanks for all the Fish"
GTI
Occasional Advisor

Re: Bad Shell - System didn't boot!!!!

Thanks again for the tips.

But...

I've entered interactively with ISL and tried to load the OS using "hpux -is" option. The system failed in the same way that before: load it in single user with a bad shell. I still do not have a shell available after this procedure.

I've tried to boot using another kernel in the ISL (hpux -is /stand/vmunix.prev) but it didn't work.

Any other tip ? Should I have to reinstall the entire system ?

Stenio
A. Clay Stephenson
Acclaimed Contributor

Re: Bad Shell - System didn't boot!!!!

HI,

In your case, booting single-user doesn't help at all. You need to boot from a recovery CD so that your root is actually on another filesystem. You then mount your old system / and edit or copy /etc/passwd.

The other option you have (if you have a spare system) is to removbe the drive and put in a bootable system and make the changes. In any event, a recovery CD is your easist option.

Clay
If it ain't broke, I can fix that.
Stefan Schulz
Honored Contributor

Re: Bad Shell - System didn't boot!!!!

you removed the engine of your car while driving. When you tried to restart you got stuck in the middle of nowhere. What you need now is another car to help you out.

So you need a working system where you can mount and correct your /etc/passwd. The best option is to boot an a recovery CD and mount your harddrive. Another option is to install this harddrive as a second disc an a working system and mount it.

I can't think of any other option than to use a CD or another Workstation. Using a previous kernel doesn't help as your kernel is prefectly ok, its your configuration which is wrong. Also as you are stuck in single user mode, you can't use any networkservices (rcp, ftp ...)

Hope this helps

Regards Stefan
No Mouse found. System halted. Press Mousebutton to continue.
GTI
Occasional Advisor

Re: Bad Shell - System didn't boot!!!!

Ok, Ok! I got it. I did the most stupid thing... My boss will gonna kill me!!

The last try:

Using the recovery disk I've got a support shell. But, I couldn't mount the old /etc in order to replace the old /etc/passwd with the new one available. It won't work if I mount a NFS in another system either. There are some unavailable tools and options in that support shell (fstyp, mount -v, etc.). When I try to mount any point the OS returns with "unrecognized file system".

I promise that is the last question to the forum. If doesn't work... Forgetaboutit!! I've got a full backup.

Stenio.
Patrick Wallek
Honored Contributor

Re: Bad Shell - System didn't boot!!!!

Here's a document from the ITRC TKB on how to boot your system from the Support CD:

http://us-support2.external.hp.com/cki/bin/doc.pl/sid=10521465193e37104f/screen=ckiDisplayDocument?docId=200000047869320

The part you are interested in is where you do the chroot_lvmdisk. Be sure you know the hardware path to your boot disk.

Hopefully this makes sense.