[comp.unix.i386] 2 more Q's about 386/ix

jonm@syma.sussex.ac.uk (Jonathan Meyer) (12/14/89)

Two quick questions -

I have both VGA and MDA cards + monitors. In DOS I can run both, switching
using the mode command. Can I do this for 388/ix?

Is it possible to run shutdown from anything other than the console VT?
Sometimes I would like to be able to reboot my system safely from a remote
login, but can't.

jon

pim@cti-software.nl (Pim Zandbergen) (12/16/89)

jonm@syma.sussex.ac.uk (Jonathan Meyer) writes:


>Is it possible to run shutdown from anything other than the console VT?
>Sometimes I would like to be able to reboot my system safely from a remote
>login, but can't.

init 6 </dev/console will usually do the trick.
-- 
Pim Zandbergen                           domain : pim@cti-software.nl
CTI Software BV                          uucp   : uunet!mcsun!hp4nl!ctisbv!pim
Laan Copes van Cattenburch 70            phone  : +31 70 3542302
2585 GD The Hague, The Netherlands       fax    : +31 70 3512837

plocher@sally.Sun.COM (John Plocher) (12/16/89)

+-- In <1910@syma.sussex.ac.uk> jonm@syma.sussex.ac.uk (Jonathan Meyer) writes
| Is it possible to run shutdown from anything other than the console VT?
| Sometimes I would like to be able to reboot my system safely from a remote
| login, but can't.
+--

You can do either

	shutdown -mumble < /dev/console		# -mumble is stuff like -g0 -y ...
			 ^^^^^^^^^^^^^^
or
	init 0		# shutdown and stay down
or
	init 6		# shutdown and reboot

  -John Plocher

darcy@druid.uucp (D'Arcy J.M. Cain) (12/16/89)

In article <1910@syma.sussex.ac.uk> jonm@syma.sussex.ac.uk (Jonathan Meyer) writes:
>Two quick questions -
>
>I have both VGA and MDA cards + monitors. In DOS I can run both, switching
>using the mode command. Can I do this for 388/ix?
>
>Is it possible to run shutdown from anything other than the console VT?
>Sometimes I would like to be able to reboot my system safely from a remote
>login, but can't.
>
>jon

Try "shutdown -y < /dev/console"

-- 
D'Arcy J.M. Cain (darcy@druid)     |   Thank goodness we don't get all 
D'Arcy Cain Consulting             |   the government we pay for.
West Hill, Ontario, Canada         |
No disclaimers.  I agree with me   |

dave@pmafire.UUCP (Dave Remien) (12/17/89)

In article <1651@ctisbv.cti-software.nl> pim@cti-software.nl (Pim Zandbergen)
writes:
+jonm@syma.sussex.ac.uk (Jonathan Meyer) writes:
+
+
+>Is it possible to run shutdown from anything other than the console VT?
+>Sometimes I would like to be able to reboot my system safely from a remote
+>login, but can't.
+
+init 6 </dev/console will usually do the trick.


So will batch. 
-- 
Dave Remien +*+*+*+*+*+*+*+*+*+*+*+*+*+*+ WINCO Computer Engineering Group 
{uunet|bigtex}!pmafire!dave or rzd@inel.gov     "Dave Barry for President" 

fischer@utower.gopas.sub.org (Axel Fischer) (12/18/89)

jonm@syma.sussex.ac.uk (Jonathan Meyer) writes:

>Is it possible to run shutdown from anything other than the console VT?
>Sometimes I would like to be able to reboot my system safely from a remote
>login, but can't.

Easy:
	- login from remote
	- make yourself root (via "su" or whatever)
	- cd / ; sync ; sync
	- /etc/init 0

That's it. Your system comes down safely.
But - now user is warned. After "init 0" you have no chance to cancel.

-Axel
-- 
fischer@utower.gopas.sub.org / fischer@db0tui6.BITNET / fischer@tmpmbx.UUCP
Bang-Europe : ...!{doitcr,gopnbg,tmpmbx}!utower!fischer
Bang-USA    : ...!uunet!unido!gopnbg!utower!fischer
                                                         Too low for zero ...

jrh@mustang.dell.com (James Howard) (12/19/89)

In article <1910@syma.sussex.ac.uk>, jonm@syma.sussex.ac.uk (Jonathan
Meyer) writes:
> 
> Is it possible to run shutdown from anything other than the console VT?
> Sometimes I would like to be able to reboot my system safely from a remote
> login, but can't.
> 
> jon

# init 6 < /dev/console

will work I believe, also

# powerdown -Y < /dev/console

will powerdown the system, but won't reboot.



James R. Howard                
cs.utexas.edu!dell!mustang!jrh

#include <disclaimer.h>

cpcahil@virtech.uucp (Conor P. Cahill) (12/19/89)

In article <S4NKS-@utower.gopas.sub.org>, fischer@utower.gopas.sub.org (Axel Fischer) writes:
> jonm@syma.sussex.ac.uk (Jonathan Meyer) writes:
> >Is it possible to run shutdown from anything other than the console VT?
> >Sometimes I would like to be able to reboot my system safely from a remote
> >login, but can't.
> 
> Easy:
> 	- login from remote
> 	- make yourself root (via "su" or whatever)
> 	- cd / ; sync ; sync
> 	- /etc/init 0

This does not work for 386/ix.  Init will tell you that you must be
on the console to run "init 0".  The best solution is to run
/etc/shutdown -g0 -y (or /etc/init 0) < /dev/console



-- 
+-----------------------------------------------------------------------+
| Conor P. Cahill     uunet!virtech!cpcahil      	703-430-9247	!
| Virtual Technologies Inc.,    P. O. Box 876,   Sterling, VA 22170     |
+-----------------------------------------------------------------------+

izen@amelia.nas.nasa.gov (Steven H. Izen) (12/20/89)

In article <4844@dell.dell.com> jrh@mustang.dell.com (James Howard) writes:
>In article <1910@syma.sussex.ac.uk>, jonm@syma.sussex.ac.uk (Jonathan
>Meyer) writes:

>> Is it possible to run shutdown from anything other than the console VT?
>> Sometimes I would like to be able to reboot my system safely from a remote
>> login, but can't.

>> jon

># init 6 < /dev/console
>will work I believe, also

>James R. Howard                
>cs.utexas.edu!dell!mustang!jrh

# init 5 </dev/console
also works, but the system doesn't take as long to reboot (at lease on my
compaq 386/20) becuase the system doesn't check out the memory before
rebooting.

Looking through the appropriate scripts reveals that 
init 0 eventually causes a uadmin 2 0 to be done <--- no reboot
init 6 eventually causes a uadmin 2 1 to be done <--- powerup reboot
init 5 eventually causes a uadmin 2 2 to be done <--- warm reboot
-- 
Steve Izen: {sun,uunet}!cwjcc!skybridge!izen386!steve  / Quote corner:
or steve%izen386.uucp@skybridge.scl.cwru.edu          / 
or izen@cwru.cwru.edu	   /-------------------------/ My second bike is a car.
                           | The problem is that I *was* paying attention.

thomax@utopia.uucp (Thomas Kaulmann) (12/20/89)

fischer@utower.gopas.sub.org (Axel Fischer) writes:
>jonm@syma.sussex.ac.uk (Jonathan Meyer) writes:
>>Is it possible to run shutdown from anything other than the console VT?
yes, it is!
>Easy:
>	- login from remote
>	- make yourself root (via "su" or whatever)
>	- cd / ; sync ; sync
>	- /etc/init 0
wrong!
use a `init 6` instead and it will work!
thomax
-- 
             .        |SE|  thomas kaulmann 1000berlin61 alexandrinenstr.42
 / //_ __ _ _ __      |OR|  Bang: ..!unido!tmpmbx!einoed!utopia!thomax
/_//_ /_//_///_/_ R.C.|FA|  Domain: thomax@utopia phone# +49 30 614 6641 
________/_____________|TW|  Fax# +49 30 392 92 52 phone# +49 30 390 80288

karl@ddsw1.MCS.COM (Karl Denninger) (12/21/89)

In article <1989Dec19.002805.3039@virtech.uucp> cpcahil@virtech.uucp (Conor P. Cahill) writes:
>In article <S4NKS-@utower.gopas.sub.org>, fischer@utower.gopas.sub.org (Axel Fischer) writes:
>> jonm@syma.sussex.ac.uk (Jonathan Meyer) writes:
>> >Is it possible to run shutdown from anything other than the console VT?
>> >Sometimes I would like to be able to reboot my system safely from a remote
>> >login, but can't.
>> 
>> Easy:
>> 	- login from remote
>> 	- make yourself root (via "su" or whatever)
>> 	- cd / ; sync ; sync
>> 	- /etc/init 0
>
>This does not work for 386/ix.  Init will tell you that you must be
>on the console to run "init 0".  The best solution is to run
>/etc/shutdown -g0 -y (or /etc/init 0) < /dev/console

At least for us, the following works from any terminal if you are root:

init 5			# Power down and STAY down
init 6			# Reboot

--
Karl Denninger (karl@ddsw1.MCS.COM, <well-connected>!ddsw1!karl)
Public Access Data Line: [+1 708 566-8911], Voice: [+1 708 566-8910]
Macro Computer Solutions, Inc.		"Quality Solutions at a Fair Price"

johnl@esegue.segue.boston.ma.us (John R. Levine) (12/21/89)

In article <1989Dec19.002805.3039@virtech.uucp> cpcahil@virtech.uucp (Conor P. Cahill) writes:
>> >Is it possible to run shutdown from anything other than the console VT?
>> 	- /etc/init 0 [ as superuser ]
>This does not work for 386/ix.

On 386/ix 2.0.x, at least, it works from any terminal.  I just tried it
now.  You can use init 0 to shut down or init 5 or init 6 to reboot.  Very
handy when you're dialed in to your home machine from work or vice versa.
If only they'd fix the serial drivers to work at a reasonable speed.
-- 
John R. Levine, Segue Software, POB 349, Cambridge MA 02238, +1 617 864 9650
johnl@esegue.segue.boston.ma.us, {ima|lotus|spdcc}!esegue!johnl
"Now, we are all jelly doughnuts."

cpcahil@virtech.uucp (Conor P. Cahill) (12/21/89)

In article <1989Dec20.201930.572@esegue.segue.boston.ma.us>, johnl@esegue.segue.boston.ma.us (John R. Levine) writes:
> In article <1989Dec19.002805.3039@virtech.uucp> cpcahil@virtech.uucp (Conor P. Cahill) writes:
> >> >Is it possible to run shutdown from anything other than the console VT?
> >> 	- /etc/init 0 [ as superuser ]
> >This does not work for 386/ix.
> 
> On 386/ix 2.0.x, at least, it works from any terminal.  I just tried it
> now.  You can use init 0 to shut down or init 5 or init 6 to reboot.  Very
> handy when you're dialed in to your home machine from work or vice versa.

In 386/ix 2.0.2, init 0, when run on a terminal other than the console, echos:

	Can only invoke init 0 from the console

However, "init 0 < /dev/console" does have the desired effect.

-- 
+-----------------------------------------------------------------------+
| Conor P. Cahill     uunet!virtech!cpcahil      	703-430-9247	!
| Virtual Technologies Inc.,    P. O. Box 876,   Sterling, VA 22170     |
+-----------------------------------------------------------------------+

johnl@esegue.segue.boston.ma.us (John R. Levine) (12/22/89)

In article <1989Dec21.004350.12070@virtech.uucp> cpcahil@virtech.uucp (Conor P. Cahill) writes:
>In 386/ix 2.0.2, init 0, when run on a terminal other than the console, echos
>	Can only invoke init 0 from the console

Hmmn, you're right.  But "init 5" works to reboot no matter what terminal
you're on.  Someone wasn't thinking too clearly.
-- 
John R. Levine, Segue Software, POB 349, Cambridge MA 02238, +1 617 864 9650
johnl@esegue.segue.boston.ma.us, {ima|lotus|spdcc}!esegue!johnl
"Now, we are all jelly doughnuts."