[CentOS] halt versus shutdown

2020-06-14 Thread Leon Fauster via CentOS

Working with different OSs can be quite challenging (mentally :-)).

I wonder why the command "halt" has not same result between EL6 and EL8.

To shutdown the vm or workstation in EL8 i must use "shutdown now".

Who mandates this behavior in terms of configuration file?

--
Leon








___
CentOS mailing list
CentOS@centos.org
https://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] halt versus shutdown

2020-06-14 Thread John Pierce
On Sun, Jun 14, 2020 at 4:32 PM Leon Fauster via CentOS 
wrote:

> Working with different OSs can be quite challenging (mentally :-)).
>
> I wonder why the command "halt" has not same result between EL6 and EL8.
>
> To shutdown the vm or workstation in EL8 i must use "shutdown now".
>


fwiw, i've always used 'init 0' to shut down all sorts of unix/linux
systems.   On old school unix, and I think even early Linux, halt was an
/immediate/ halt, as in catch fire.   might as well hit the power switch.
___
CentOS mailing list
CentOS@centos.org
https://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] halt versus shutdown

2020-06-14 Thread Pete Biggs
On Mon, 2020-06-15 at 01:32 +0200, Leon Fauster via CentOS wrote:
> Working with different OSs can be quite challenging (mentally :-)).
> 
> I wonder why the command "halt" has not same result between EL6 and EL8.
> 
> To shutdown the vm or workstation in EL8 i must use "shutdown now".
> 
> Who mandates this behavior in terms of configuration file?
> 

It's to do with systemd. EL6 used SysV based init and runlevels, EL7 &
EL8 use systemd targets.

If you look at the halt and shutdown commands they are symlinks to
/usr/bin/systemctl now and they are implemented as shims that replicate
the effect of the old SysV processes.

So the following have the same effect:

  "systemctl isolate halt.target"
  "halt"
  "shutdown -H now"
  "systemctl halt"

there are equivalents for "poweroff" and "reboot" as well.

P.


___
CentOS mailing list
CentOS@centos.org
https://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] halt versus shutdown

2020-06-14 Thread Pete Biggs


> fwiw, i've always used 'init 0' to shut down all sorts of unix/linux
> systems. 

In EL7/EL8, init is now a symlink as well because everything is
controlled by systemd.

>   On old school unix, and I think even early Linux, halt was an
> /immediate/ halt, as in catch fire.   might as well hit the power switch.
> 
Not quite. Shutdown is a timed thing so you can tell it to shutdown or
reboot at a certain time or after a certain delay and it can broadcast
messages to the users - it's useful on multi-user systems to be able to
warn users that the system is about to go down. Halt is an immediate
thing without any broadcast messages or delay but it does do the halt
cleanly.  There is an option to halt to not sync the disks - this is
not a wise thing to do and is an emergency option - certainly the
original man pages for halt said something like "only do this if your
disks are on fire".

P.



___
CentOS mailing list
CentOS@centos.org
https://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] halt versus shutdown

2020-06-14 Thread John Pierce
On Sun, Jun 14, 2020 at 5:20 PM Pete Biggs  wrote:

>
> > fwiw, i've always used 'init 0' to shut down all sorts of unix/linux
> > systems.
>
> In EL7/EL8, init is now a symlink as well because everything is
> controlled by systemd.
>
> >   On old school unix, and I think even early Linux, halt was an
> > /immediate/ halt, as in catch fire.   might as well hit the power switch.
> >
> Not quite. Shutdown is a timed thing so you can tell it to shutdown or
> reboot at a certain time or after a certain delay and it can broadcast
> messages to the users - it's useful on multi-user systems to be able to
> warn users that the system is about to go down. Halt is an immediate
> thing without any broadcast messages or delay but it does do the halt
> cleanly.  There is an option to halt to not sync the disks - this is
> not a wise thing to do and is an emergency option - certainly the
> original man pages for halt said something like "only do this if your
> disks are on fire".



I'm quite sure that in original Berkeley Unix, as on the VAX 11/780, halt
was an immediate halt of the CPU without any process cleanup or file system
umounting or anything.   Early SunOS (pre-Solaris) was like this, too.




-- 
-john r pierce
  recycling used bits in santa cruz
___
CentOS mailing list
CentOS@centos.org
https://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] halt versus shutdown

2020-06-14 Thread Pete Biggs


> I'm quite sure that in original Berkeley Unix, as on the VAX 11/780, halt
> was an immediate halt of the CPU without any process cleanup or file system
> umounting or anything.   Early SunOS (pre-Solaris) was like this, too.
> 
The SunOS 4.1.2 man page for halt says 

   NAME
  halt - stop the processor
   SYNOPSIS
/usr/etc/halt [ -oqy ]
   DESCRIPTION
halt writes out any information pending to the disks and then
stops the processor.
 halt normally logs the system shutdown to the system log 
  daemon, syslogd(8), and places a shutdown record in the 
  login accounting file Ivar/admlwtmp. 
  These actions are inhibited if the -0 or -q options are present. 

The BSD 4.3 (that ran on VAXen) man pages say largely similar things:

https://www.freebsd.org/cgi/man.cgi?query=halt&apropos=0&sektion=0&manpath=4.3BSD+Reno&arch=default&format=html

Everything is somewhere on the net :-)

P.


___
CentOS mailing list
CentOS@centos.org
https://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] halt versus shutdown

2020-06-14 Thread John Pierce
On Sun, Jun 14, 2020 at 6:19 PM Pete Biggs  wrote:

>
> > I'm quite sure that in original Berkeley Unix, as on the VAX 11/780, halt
> > was an immediate halt of the CPU without any process cleanup or file
> system
> > umounting or anything.   Early SunOS (pre-Solaris) was like this, too.
> >
> The SunOS 4.1.2 man page for halt says
>
>NAME
>   halt - stop the processor
>SYNOPSIS
> /usr/etc/halt [ -oqy ]
>DESCRIPTION
> halt writes out any information pending to the disks and then
> stops the processor.
>  halt normally logs the system shutdown to the system log
>   daemon, syslogd(8), and places a shutdown record in the
>   login accounting file Ivar/admlwtmp.
>   These actions are inhibited if the -0 or -q options are present.
>
> The BSD 4.3 (that ran on VAXen) man pages say largely similar things:
>
>
> https://www.freebsd.org/cgi/man.cgi?query=halt&apropos=0&sektion=0&manpath=4.3BSD+Reno&arch=default&format=html
>
>
ok, so it does a sync then hard halts, but it doesn't gracefully exit
services, or unmount file systems.


-- 
-john r pierce
  recycling used bits in santa cruz
___
CentOS mailing list
CentOS@centos.org
https://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] halt versus shutdown

2020-06-14 Thread Strahil Nikolov via CentOS
Working with different Linux Distributions makes the life harder.
So far I have found out that 'poweroff' & 'reboot' has the same behaviour on  
Linux/Unix/BSDs.

Best Regards,
Strahil Nikolov

На 15 юни 2020 г. 5:22:28 GMT+03:00, John Pierce  написа:
>On Sun, Jun 14, 2020 at 6:19 PM Pete Biggs  wrote:
>
>>
>> > I'm quite sure that in original Berkeley Unix, as on the VAX
>11/780, halt
>> > was an immediate halt of the CPU without any process cleanup or
>file
>> system
>> > umounting or anything.   Early SunOS (pre-Solaris) was like this,
>too.
>> >
>> The SunOS 4.1.2 man page for halt says
>>
>>NAME
>>   halt - stop the processor
>>SYNOPSIS
>> /usr/etc/halt [ -oqy ]
>>DESCRIPTION
>> halt writes out any information pending to the disks and then
>> stops the processor.
>>  halt normally logs the system shutdown to the system log
>>   daemon, syslogd(8), and places a shutdown record in the
>>   login accounting file Ivar/admlwtmp.
>>   These actions are inhibited if the -0 or -q options are
>present.
>>
>> The BSD 4.3 (that ran on VAXen) man pages say largely similar things:
>>
>>
>>
>https://www.freebsd.org/cgi/man.cgi?query=halt&apropos=0&sektion=0&manpath=4.3BSD+Reno&arch=default&format=html
>>
>>
>ok, so it does a sync then hard halts, but it doesn't gracefully exit
>services, or unmount file systems.
___
CentOS mailing list
CentOS@centos.org
https://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] halt versus shutdown

2020-06-15 Thread Leon Fauster via CentOS

Am 15.06.20 um 05:38 schrieb Strahil Nikolov via CentOS:

Working with different Linux Distributions makes the life harder.
So far I have found out that 'poweroff' & 'reboot' has the same behaviour on  
Linux/Unix/BSDs.



Yeah, poweroff seems the appropriate command instead of halt.

Thanks for all the "historical" input. Things make now sense :-)

--
Leon
___
CentOS mailing list
CentOS@centos.org
https://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] halt versus shutdown

2020-06-15 Thread Valeri Galtsev



On 6/15/20 6:19 AM, Leon Fauster via CentOS wrote:

Am 15.06.20 um 05:38 schrieb Strahil Nikolov via CentOS:

Working with different Linux Distributions makes the life harder.
So far I have found out that 'poweroff' & 'reboot' has the same 
behaviour on  Linux/Unix/BSDs.




Yeah, poweroff seems the appropriate command instead of halt.

Thanks for all the "historical" input. Things make now sense :-)



Thanks for excurse in the past, whent the world made sense ;-)

Valeri


--
Leon
___
CentOS mailing list
CentOS@centos.org
https://lists.centos.org/mailman/listinfo/centos


--

Valeri Galtsev
Sr System Administrator
Department of Astronomy and Astrophysics
Kavli Institute for Cosmological Physics
University of Chicago
Phone: 773-702-4247

___
CentOS mailing list
CentOS@centos.org
https://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] halt versus shutdown

2020-06-15 Thread J Martin Rushton via CentOS

On 15/06/2020 15:53, Valeri Galtsev wrote:



On 6/15/20 6:19 AM, Leon Fauster via CentOS wrote:

Am 15.06.20 um 05:38 schrieb Strahil Nikolov via CentOS:

Working with different Linux Distributions makes the life harder.
So far I have found out that 'poweroff' & 'reboot' has the same 
behaviour on  Linux/Unix/BSDs.




Yeah, poweroff seems the appropriate command instead of halt.

Thanks for all the "historical" input. Things make now sense :-)



Thanks for excurse in the past, whent the world made sense ;-)

Valeri


--
Leon


Hmm.  If the disks really were "on fire", my preferred means of shutdown 
was the big red button by the door as I exited, PDQ.


Actually I did once have to do this.  I was "minding the shop" at lunch 
time on a sunny day.  As I looked into the machine room from the 
operations office I saw a cloud of smoke arising from the floor through 
one of the AC vents.  Dead stop - building alarm and get out.  It turned 
out that one of the AC units had started its steam generator and the 
blast was picking up dist mites, which showed up in a shaft of sunshine 
looking light smoke.  Most machines were at the 
far end of the room and it was only occasionally that that particular 
unit came on.  The fire brigade confirmed that it was the right action, 
but some of the users were less happy!


--
J Martin Rushton MBCS
___
CentOS mailing list
CentOS@centos.org
https://lists.centos.org/mailman/listinfo/centos