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
On Sun, Jun 14, 2020 at 4:32 PM Leon Fauster via CentOS centos@centos.org 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.
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.
On Sun, Jun 14, 2020 at 5:20 PM Pete Biggs pete@biggs.org.uk 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.
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&a...
Everything is somewhere on the net :-)
P.
On Sun, Jun 14, 2020 at 6:19 PM Pete Biggs pete@biggs.org.uk 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&a...
ok, so it does a sync then hard halts, but it doesn't gracefully exit services, or unmount file systems.
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 jhn.pierce@gmail.com написа:
On Sun, Jun 14, 2020 at 6:19 PM Pete Biggs pete@biggs.org.uk 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&a...
ok, so it does a sync then hard halts, but it doesn't gracefully exit services, or unmount file systems.
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
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
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.<insert red face icon> 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!
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.