Operating System - HP-UX
1851755 Members
2557 Online
104062 Solutions
New Discussion

Re: login a single user mode server

 
James Ellis_1
Super Advisor

login a single user mode server

I needed to extend the /var fs, so I brought down the server in single user mode (shutdown). Well, I used the command 'fuser' to check to see if anyone was accessing /var (probably should have not done this). Well, the server kicked me out. Now I cannot log in my account, and I have root privilege thru sudo. How do I log in the server which is not in single user mode? Also, while I was in the server as single user mode, I tried to umount /var and got this message :Cannot umount busy etc. What is the problem or why can I not umount?
Thanks,
Jim
"In the middle of difficulty lies opportunity" -Einstein
21 REPLIES 21
Jeff Machols
Esteemed Contributor

Re: login a single user mode server

the only way to find wjat is using /var is to do an fuser -cu /var. That should have worked. Where you in the /var directory when you tried to unmount?
James Ellis_1
Super Advisor

Re: login a single user mode server

No, I was not in /var when I tried to umount.

Here is what I did:

while in as root:
#shutdown (note that when I did a BDF, there were some files still mounted)
#fuser -cku /var
then got booted out?

Should have shutdown and interrupted and typed hpux -is. However, how do I interrupt the bootup process?

Also, the system is currently in single user mode, and I cannot log in, how do I log in?

Thanks,
Jim
"In the middle of difficulty lies opportunity" -Einstein
S.K. Chan
Honored Contributor

Re: login a single user mode server

You probably shouldn't use the -k option in fuser. At this point it's best you cycle power or goto GSP mode to reset the server. Interrupt the bootup with ESC key, keep a close watch on the console, it'll tell you what to do to interrupt the bootup. Then in ISL do hpux -is.
Hope this helps.
Darrell Allen
Honored Contributor

Re: login a single user mode server

Hi Jim,

The -k option to fuser killed your shell because it was using /var.

Are you at the console and don't have a prompt? If that's the case, you may have to power off the server then bring it back up. Or try on the console then reset the server.

When booting you are given the option to interrupt the boot process (simply by pressing a key when prompted) and to interact with IPL.
"What, Me Worry?" - Alfred E. Neuman (Mad Magazine)
Krishna Prasad
Trusted Contributor

Re: login a single user mode server

When you boot the box it will prompt you to interupt the boot within 10 seconds.

When you do it will ask you if you want to interact with IPL type y for yes.

then at the ISL>prompt type

hpux -is

Also, A suggestion purchase on-line JFS. Hopefully all your filesystems are created using vxfs. ( With the exception of stand it has to be hfs. )

Then it won't matter if a file filesytem is mounted. You simply use lvm to extend the logical volume and fsadm to extend the filesystem with no reboot required.
Positive Results requires Positive Thinking
James Ellis_1
Super Advisor

Re: login a single user mode server

No, I am not at the console. I have tried to login (via XSession for example), and am unable to login. I think this is because when the server is in single user mode, it only accepts root logins? I don't have the root password, but I sudo root from my initial login account. Now, I am booted out, and don't know the root password. Does this make sense?

Jim
"In the middle of difficulty lies opportunity" -Einstein
Darrell Allen
Honored Contributor

Re: login a single user mode server

Hi again,

Unless others can help, I believe you're out of luck if you can't get to the console or work with someone who has access to the console.

Darrell
"What, Me Worry?" - Alfred E. Neuman (Mad Magazine)
James Ellis_1
Super Advisor

Re: login a single user mode server

I just got the root password. Now, I tried to log in using the root password, and got this error message:

"Unable to connect to hose using specified method"

I use the Exceed program and Xstart or Xsession to connect to the server from my desktop.

Why am I unable to log into the server with this root password? Remember that the server is currently in single user mode.

One respondant said I should do the cycle over? How do I do this? Just go down and push the shutdown button? This will not bring down the 4 or so files cleanly.

Thanks,
Jim
"In the middle of difficulty lies opportunity" -Einstein
James Ellis_1
Super Advisor

Re: login a single user mode server

Darrell,
We have a web console...is this what you are talking about? I would have to try that and see if I can log in that way.

Thanks,
Jim
"In the middle of difficulty lies opportunity" -Einstein
Patrick Wallek
Honored Contributor

Re: login a single user mode server

When the machine is in single-user mode, you generally do NOT have any network services running. That is why you can't get access to the machine.

Typically, the only way to access a machine that is in single-user mode is from the console, be it a regular 700/9X serial console, web-console, secure console, whatever.

Unless you can get access to the console, you are out of luck.
Darrell Allen
Honored Contributor

Re: login a single user mode server

Absolutely, try the web console. I hope it will work. Shutdown should have pointed /etc/ioctl.syscon to the pseudo tty device you ran the shutdown command from. Hopefully when that tty was released, syscon reverted back to the real console. I don't have any info on if that actually happens.

Darrell
"What, Me Worry?" - Alfred E. Neuman (Mad Magazine)
James Ellis_1
Super Advisor

Re: login a single user mode server

Well, the web console is not going to work, I tried it and could not login. My guess is, as one user says, that when the server is in single user mode, there are NO network service running, so telneting, or connecting via the web console, will not work. The server does not have a console attached. I am stumped! Generally, when in a single user mode, if you get booted out then you cannot get into the server except by a console physically attaached to the server, right?

Jim
"In the middle of difficulty lies opportunity" -Einstein
S.K. Chan
Honored Contributor

Re: login a single user mode server

Yes, like what Patrick said and I would get a serial console and hook it up to the server.
Darrell Allen
Honored Contributor

Re: login a single user mode server

I was afraid of that. /etc/ioctl.syscon is probably pointing to the pty you had for the xterm (or dtterm) session you had. Networking services are down so forget about getting back with an Xsession.

However, you should still be able to get to the web console just like normal. It has it's own networking built in and doesn't rely on the HP servers (it is serially attached to the console port of the HP). So, access the web console (from a browser, right?) and see what happens.

Further, place a call to HP.

Darrell
"What, Me Worry?" - Alfred E. Neuman (Mad Magazine)
James Ellis_1
Super Advisor

Re: login a single user mode server

Ok, maybe I should look for a console to hook up to the server. Can any console do? I don't know if we have one lying around, but will look for one. Will the server need to be configured with a console driver? I kinda doubt it though. Let me see what I can do...now I see the drawback of not having a console physically attached to the server!!! -Jim
"In the middle of difficulty lies opportunity" -Einstein
Darrell Allen
Honored Contributor

Re: login a single user mode server

Jim,

Have you successfully connected to the web console before? It IS the console. Hooking up a regular terminal as the console is going to have the same results. So if the web console has been functioning before, the the problem isn't going to be what console you hook up.

At least that's the way my Secure Web Console works on my N and K.

Darrell
"What, Me Worry?" - Alfred E. Neuman (Mad Magazine)
James Ellis_1
Super Advisor

Re: login a single user mode server

Yes, I've accessed the server via the web console before...in fact I've used two different web consoles attached to two different servers. However, this time its not working, so I went to the computer room, and found the serial port not connected on one server. I connected the serial cable, came back and same problem. I think there is a difference between the web console and the plain old console. The web console enables you to connect via any computer using a web browser. On the other hand, a regular console will just allow you to view the sctivities of the computer via the terminal. Now, the web console doesn't work for TWO servers, so I cannot say if the console is the culprit. Am still looking into it though. -Jim
"In the middle of difficulty lies opportunity" -Einstein
Joseph C. Denman
Honored Contributor

Re: login a single user mode server

Jim,

If you have a laptop or another computer you can move next to your server, you could plug into the serial interface. You could then use Hyperterminal to access.?????

Can you ping the web console interface? Have you attempted to reset the web console?

Just a thought.

...jcd...
If I had only read the instructions first??
James Ellis_1
Super Advisor

Re: login a single user mode server

Folks,

The server has been fixed. The userid for the web console got mixed up, and I never got the right userid. Anyway, the server was brought down in single and the /var fs extended. Everything is up and running. Many thanks!
"In the middle of difficulty lies opportunity" -Einstein
Darrell Allen
Honored Contributor

Re: login a single user mode server

Hi Jim,

That's good news! Thanks for updating you post.

So, did you have to do anything special to get in on the console? Or were you able to access the system once you connected to the web console?

Thanks,
Darrell
"What, Me Worry?" - Alfred E. Neuman (Mad Magazine)
James Ellis_1
Super Advisor

Re: login a single user mode server

Darrell,

No I did not have to do anything special to get in the console. Just that the userid was not what I thought it would be. Once logged in the web console, I was able to access the server quite easily. I now know that to bring the server down in true "single-user" mode, you I got to do it via shutdown and catch it while its booting up. Thanks for your help Darrell! -Jim
"In the middle of difficulty lies opportunity" -Einstein