Operating System - HP-UX
1838330 Members
3456 Online
110125 Solutions
New Discussion

Re: How to go into Single Mode on HP-UX

 
SOLVED
Go to solution
Chris2005
Regular Advisor

How to go into Single Mode on HP-UX

I am wondering how to go into single mode on HP-UX 11.x
19 REPLIES 19
DCE
Honored Contributor
Solution

Re: How to go into Single Mode on HP-UX


Reboot the system and interupt to boot process when prompted to press any key ny pressing any key

issue the command
bo pri
to continue the boot process

When asked if you want to interact with ISL, answer yes

at the ISL prompt enter hpux -is

the system should then boot up in single user mode
Court Campbell
Honored Contributor

Re: How to go into Single Mode on HP-UX

restart, or power on the machine. interrupt the boot process. You should see a prompt to press any key within 10 seconds to interrupt the process. then type "boot pri", and type "y" to interact with the ipl. at the ISL> prompt tpye "hpux -is".
"The difference between me and you? I will read the man page." and "Respect the hat." and "You could just do a search on ITRC, you don't need to start a thread on a topic that's been answered 100 times already." Oh, and "What. no points???"
Chris2005
Regular Advisor

Re: How to go into Single Mode on HP-UX

So I guess I have to do this from the server console terminal, or is it also possible with a telnet connection?

Regards,
Chris
Sundar_7
Honored Contributor

Re: How to go into Single Mode on HP-UX

No, you cannot do this from a telnet session. You will have to be on the console. But you can connect to GSP or remote web console (if you have one configured) and perform this remotely.
Learn What to do ,How to do and more importantly When to do ?
Court Campbell
Honored Contributor

Re: How to go into Single Mode on HP-UX

you coule use the gsp/mp or the console.
"The difference between me and you? I will read the man page." and "Respect the hat." and "You could just do a search on ITRC, you don't need to start a thread on a topic that's been answered 100 times already." Oh, and "What. no points???"
Court Campbell
Honored Contributor

Re: How to go into Single Mode on HP-UX

you could use the gsp/mp or the console.
"The difference between me and you? I will read the man page." and "Respect the hat." and "You could just do a search on ITRC, you don't need to start a thread on a topic that's been answered 100 times already." Oh, and "What. no points???"
DCE
Honored Contributor

Re: How to go into Single Mode on HP-UX



A telnet session will not work it is a network communcation method and since networking does not start until run level 2 there is no way you can monitor the boot process with it.

Chris2005
Regular Advisor

Re: How to go into Single Mode on HP-UX

Thank you all.

Regards,
Chris
Jollyjet
Valued Contributor

Re: How to go into Single Mode on HP-UX

Hi,

The other way for the system console you can give init s ---> it will take to single user mode.

you need to umount the filesystem if you want to increase or decrease . or from the ISL prompt you can use hpux -is --> for init s or hpux -i1 or i2 or o3 to various init levels from the pdc menu ie. boot menu.
Chris2005
Regular Advisor

Re: How to go into Single Mode on HP-UX

I did a init s, but after that I can not umount the /var filesystem.
Chris2005
Regular Advisor

Re: How to go into Single Mode on HP-UX

Tried the method via ISL and hpux -is on the Console itself. It seems to work but eventually I get all sorts of strange characters on the Console terminal, so I can't read and do anything then.

Pls help.

Regards,
Chris
Herbert Loevenich
Frequent Advisor

Re: How to go into Single Mode on HP-UX

Hello Chris,

when do need to increase /var /usr /opt without console access, you are be able to do so during a reboot of your system.

You have to prepare the very first startup script
/sbin/init.d/crashconf

After the line export PATH add the following lines for each logical volume which
needs expanded:
umount
lvextend -L
extendfs

For example, the code snippet below extends /usr and /opt:
# Configure kernel crash dumps
#
PATH=/sbin
export PATH
umount /usr
lvextend -L 2300 /dev/vg00/lvol5
extendfs /dev/vg00/rlvol5
umount /opt
lvextend -L 1200 /dev/vg00/lvol7
extendfs /dev/vg00/rlvol7
rval=0

Make sure the are no subdirectories mounted
on the volume you would like to increase.

This is a "proven" solution.

Best regards,

Herbert
50% of all problems are based on communication issues, lets talk
Chris2005
Regular Advisor

Re: How to go into Single Mode on HP-UX

Ok thanx Herbert, will try that.

But can anyone tell me why I get a mixed up console when going into single mode on the console and how I can prevent/solve this?

Thanx in advance.

Regards,
Chris
A. Clay Stephenson
Acclaimed Contributor

Re: How to go into Single Mode on HP-UX

Of course, the system doesn't have a clue about your TERM type and even if it did the terminfo library is in /usr --- which ain't mounted yet. The most common problem is that the erase character is probably set to '#' and silly you, you keep trying to use the backspace key to backspace. So the best approach is to make no typing mistakes which require correction. If you don't have to expand the size of /usr, then you can mount /usr, export TERM=vt100, and then you can use vi, for example. You will typically also need to mount /var.

The init -s method is hopeless on HP-UX because it does not unmount critical filesystem because they are busy.
If it ain't broke, I can fix that.
Chris2005
Regular Advisor

Re: How to go into Single Mode on HP-UX

Hi Clay,

The scenario you described is not quite mine. Almost every character is replaced by anotherone.

I followed your advise, but still the same situations persists.

This is what I did:
Booted
Interrupted boot process
"bo pri"
Interact with ISL: Yes
"hpux -is"
mount /usr
export TERM=vt100

--

Also tried whether mounting /var would help but unfortunately not. By the way /var is the filesystem I want to increase, so I hope this one does not have to be mounted.
DCE
Honored Contributor

Re: How to go into Single Mode on HP-UX


Chris, what method are using to access the console?

A standard HP console? if so, hold down the D key while powering up the console - this will return it to the default settings

A PC connected vis serial cable? if so try a different software to connect, or change the terminal setting on the one you are using
A. Clay Stephenson
Acclaimed Contributor

Re: How to go into Single Mode on HP-UX

The export TERM=vt100 only works if indeed, your terminal is a vt100 (or emulates a vt100). If your terminal is something else, e.g. ansi, (or emulating something else) then set TERM=ansi. This will get utilities like vi which use the terminfo library to behave well.

However, setting TERM is not enough for the shell because you also need to run some stty commands to define various keys.

The most annoying is erase:
stty erase="^h"
will set erase to ctrl-h which is often mapped to the BS key but that depends or your terminal or emulator.

This all stems from the dim mists of time when UNIX was born and the common terminals were teletypes --- which could not backspace
so the '#' key was chosen as the default erase character.

So if you typed "Chro#is" the character preceding the '#' was ignored and the effective input became "Chris".

At login time, the system doesn't have a clue about your terminal type so it chooses some very old defaults.

If it ain't broke, I can fix that.
Sp4admin
Trusted Contributor

Re: How to go into Single Mode on HP-UX

Hi Chris,

You can use the shutdown command to boot into singel user mode. Or you boot and do the innterupt on the boot process as stated above. You need to be on the console unless you have a GSP LAN connection which would allow you to boot remote.

sp,

Bill Hassell
Honored Contributor

Re: How to go into Single Mode on HP-UX

> mixed up console ...

Thanks to the GSP/MP designers (with dubious help from the authors of ttytype), the console is composed of a rigid pipe that knows more about your terminal than you do. There is a (painful) setting in the GSP (or MP depending on your machine model) that totally ignores what you are connecting to the console. This is not the case for network connections like telnet.

It is VERY important to know if you are using a 'real' HP terminal or a fake terminal created with a PC or some non-HP terminal box. If you are using a real HP terminal (like the 700/92 or similar) then you can change the emulation and fix your problem. If you are not using an HP terminal, most likely you have a basic ANSI or VT-series lookalike and the GSP/MP has been set to HP terminal mode. To fix this, go into the GSP/MP menu and select the CA (configure async) option, then change the terminal type to vt100 (assuming that this is what you are using).


Bill Hassell, sysadmin