Operating System - HP-UX
1833735 Members
2939 Online
110063 Solutions
New Discussion

Re: how many ways to go to single user mode?

 
Steven Chen_1
Super Advisor

how many ways to go to single user mode?

Can someone sum up all different ways to go to single user mode?

I know we can do:
/reboot/interrupt/bo pri/hpux -is

Can we do init 1, or shutdown to go to single user mode?
Steve
7 REPLIES 7
John Palmer
Honored Contributor

Re: how many ways to go to single user mode?

Yes, 'shutdown 0' will take you to single user mode but it does this by executing all the /sbin/rc kill scripts. This may not have the same results as booting to single user mode when none of the /sbin/rc get run at all.

For example shutting down to single user mode will almost certainly leave /var busy (probably in use by init) whereas booting up will always leave it mounted.
Anthony deRito
Respected Contributor

Re: how many ways to go to single user mode?

Steven, in addition to hpux -is you can do shutdown without any options. Shutdown will eventually calls the boot init to perform the action.

Tony
Antoanetta Naghiu
Esteemed Contributor

Re: how many ways to go to single user mode?

From any run level, as root if you issue:
#shutdown is going to go in single user mod.

Also init -s or init -S is doing the same thing.

If you interrupt the boot process (after reboot or shutdown, or at initial load after the box has been halted), you can get single user mod if you boot in lvm maintenance mode: hp-ux -lm

If you are going to execute all K scripts from /sbin/rc3.d, /sbin/rc2.d you are going to get the same thing. Same if using kill command but I do not think is professional.

Also, you can design your own scripts and have edit /etc/inittab....

Could be other ways as well, depends on your imagination...
Antoanetta Naghiu
Esteemed Contributor

Re: how many ways to go to single user mode?

Typing correction: hpux -lm
And the shutdown that is bringing your machine to single user mode is, as I said:
#shutdown with no option.
Rick Garland
Honored Contributor

Re: how many ways to go to single user mode?

To be in 'true' single-user mode, boot into it. At the ISL prompt, enter the hpux -is
Anthony deRito
Respected Contributor

Re: how many ways to go to single user mode?

Steven, if your bringing the OS down to run level S from a higher run level, I would suggest using the shutdown command with no options. The reason for this is that shutdown will perform several "preperatory" steps to achieve a clean run level transition. Run a man on shutdown to see this. As mentioned before, shutdown will eventually call the "boot init" when it is ready and the "boot init" process will actually perform the transition.

Tony

Re: how many ways to go to single user mode?

cd /
shutdown -y 0

because single user means all the filesystems except /stand and / should be unmounted.
Sundar