Operating System - HP-UX
1834938 Members
2414 Online
110071 Solutions
New Discussion

Booting into single user mode for V-Class.

 
SOLVED
Go to solution
Steve Post
Trusted Contributor

Booting into single user mode for V-Class.

In order to expand the size of /usr filesystem, I need to boot into single user mode. This is not the normal single user mode. This is the mode where the computer is powered down, then I interrupt the boot process, then run "BO PRI".

At this point on the K class computers, the console asks if I want to interact with the IPL. But for this V-Class computer it just keeps on going into full multi-user mode.

I would guess there is some special boot parameter that must be set prior to running the "BO PRI" command. But I can't find it, and I would not want to guess.

Any ideas?
Thanks. Steve
11 REPLIES 11
Ian Dennison_1
Honored Contributor

Re: Booting into single user mode for V-Class.

How about bringing the system up into a stable state (Run Level 3 or 2), and then performing an 'init s' from the console workstation?

Share and Enjoy! Ian
Building a dumber user
Ian Dennison_1
Honored Contributor

Re: Booting into single user mode for V-Class.

PDF Manual attached. Page 74 - Steps 10-4 should suffice.

Share and Enjoy! Ian
Building a dumber user
Steve Post
Trusted Contributor

Re: Booting into single user mode for V-Class.

Nope. There are 2 single user modes. The one everyone uses (shutdown -s), and the one that will let me unmount /usr (the powering down one).
I wasted a lot of time last year trying to unmount a /var filesystem in single user mode. But it was kinda funny. I was told to carefully kill all processes that hook to the mount point. ....So I carefully killed...UNIX.
No. There's a DIFFERENT single user mode.
Steve Post
Trusted Contributor

Re: Booting into single user mode for V-Class.

Ian, Your PDF file was empty. And I was writing when you were writing. I could try this "init -s", but I doubt it will work.
Ian Dennison_1
Honored Contributor
Solution

Re: Booting into single user mode for V-Class.

Extract from PDF,...

Rebooting or shutting down the system

To reboot or shut down your V-Class server, perform the following steps:

Step 1. Select the sppconsole window on the teststation. See Teststation sppuser windows.
Step 2. Log in as root.
Step 3. Change to the root directory. Enter:

cd /
Step 4. Shut down the system using the shutdown command. Enter:

shutdown

Progress messages detailing system shutdown activities print to your terminal. Upon reaching run-level 0, the system:
Restarts in single-user mode


Displays the root prompt

Step 5. Bring the system to a complete stop with the reboot command. Enter:

reboot -h

As I recall, the limiting factor in unmounting and extending a file system that the OS uses, is that the processes tie up the mount point and executables/files below it. Is there an alternative that can provide a kernel to issue the lv and newfs commands yet free up the mount point? Booting from a Core CD?

I would be interested to know what 'fuser -c /usr' in single user mode actually produces. I was always under the impression that once no processes were tying up a mount point, it could be manipulated at will.

Hope this is of some assistance. Ian
Building a dumber user
Steve Post
Trusted Contributor

Re: Booting into single user mode for V-Class.

There is another forum entry that talks about extending the /usr file system. In it, it talks about booting into single-user mode by interacting with the IPL (initial program loader?).
The answers from the other forum are fine, EXCEPT I don't get the option to Interact with the IPL.

The lvextend and fsextend commands are under /sbin. So I don't need to have /usr mounted to use them. But the df and bdf commands are under /usr. So I would mount /usr, run bdf, umount /usr, extend it, mount /usr, then run bdf again.

But I can't get hpux into this super-secret-single-user mode.
Eugen Cocalea
Respected Contributor

Re: Booting into single user mode for V-Class.

Hi,

May I suggest a workaround of this? This would be:

choose any another partition but /usr, of a similar size, backup it, expand it (you will have no problems to do so because /usr is usually the only one 'un-umount-able'), copy the content of /usr into it, switch the mount points of it and /usr, reboot, copy the backup in the old /usr (now mounted in the place of the old partition) and that's it.

Ugly workaround but it works.

E.
To Live Is To Learn
Ian Dennison_1
Honored Contributor

Re: Booting into single user mode for V-Class.

If you with to have this feature on bootup, why not use 'lifcp' to get the AUTO file off the LIF area of the boot disk, modify it to pass an option of 'hpux -is' to the boot process, then save it back to the LIF area?

This will give you single user mode automatically on reboot, and will need to be set back once you have amended /usr.

Share and Enjoy! Ian
Building a dumber user
Steve Post
Trusted Contributor

Re: Booting into single user mode for V-Class.

Thanks both of you for two nice plan-B's. They would probably help someday during a disaster recovery.
But plan A is to run "______________" at the boot prompt, to allow me to have an IPL prompt when I run "BO PRI".
I bet it is as simple as "run BO IPL=YES". But I can't find any documentation on the boot menu for a V2500.
Sanjay_6
Honored Contributor

Re: Booting into single user mode for V-Class.

Steve Post
Trusted Contributor

Re: Booting into single user mode for V-Class.

Aha! So boot into the powered-down single user mode, I run "boot pri -is" from boot menu, instead of "boot pri".
I KNEW it had to be simple.
Thanks!