I'm trying to get a script going that would shutdown my linux system in case of emergency (like the CPU fan going bust). Is there a way to shut down cleanly, but without taking the trouble to stop all running services ect. I want it to just unmount all mounted systems (hard unmount, weather or not they're in use) and have ACPI or APM or whatever switch the machine off. Is this possible? Any pointers appreciated Thanks Hans == Download ringtones, logos and picture messages at Ananzi Mobile Fun. http://www.ananzi.co.za/cgi-bin/goto.pl?mobile
On Tue, 11 Mar 2003 18:06:56 +0200
"H du Plooy"
I'm trying to get a script going that would shutdown my linux system in case of emergency (like the CPU fan going bust).
Is there a way to shut down cleanly, but without taking the trouble to stop all running services ect. I want it to just unmount all mounted systems (hard unmount, weather or not they're in use) and have ACPI or APM or whatever switch the machine off.
Is this possible? Any pointers appreciated /sbin/halt.
--
--
Gerald Feldman
On Tuesday 11 March 2003 11:06 am, H du Plooy wrote:
I'm trying to get a script going that would shutdown my linux system in case of emergency (like the CPU fan going bust).
Is there a way to shut down cleanly, but without taking the trouble to stop all running services ect. I want it to just unmount all mounted systems (hard unmount, weather or not they're in use) and have ACPI or APM or whatever switch the machine off.
Is this possible? Any pointers appreciated
What I would do would be to learn the 'magic shutdown'... which if your kernel is built for it (I believe SuSE kernels are) would be: Alt-Sysreq-u (twice doesn't hurt) Alt-sysreq-s (twice too) Then you could turn your machine off. But if it's hung up, and you want to re-boot, then: Alt-sysreq-b Read up on the 'magic key' (I think it's called) The first two above does a 'sync' and then a mount as Read-only. The 3rd does a boot. Should provide a clean shutdown but YMMV. (and sometimes when the machine is locked, it doesn't respond to the above anyway)
Thanks Hans
== Download ringtones, logos and picture messages at Ananzi Mobile Fun. http://www.ananzi.co.za/cgi-bin/goto.pl?mobile
-- +----------------------------------------------------------------------------+ + Bruce S. Marshall bmarsh@bmarsh.com Bellaire, MI 03/11/03 11:16 + +----------------------------------------------------------------------------+ "Hire the handicapped - They're fun to watch."
* Bruce Marshall
What I would do would be to learn the 'magic shutdown'... which if your kernel is built for it (I believe SuSE kernels are) would be:
Alt-Sysreq-u (twice doesn't hurt) Alt-sysreq-s (twice too)
Then you could turn your machine off.
But if it's hung up, and you want to re-boot, then:
Alt-sysreq-b
Read up on the 'magic key' (I think it's called)
The first two above does a 'sync' and then a mount as Read-only.
The 3rd does a boot. Should provide a clean shutdown but YMMV.
(and sometimes when the machine is locked, it doesn't respond to the above anyway)
Where is this information available, ie: 'magic shutdown' ?? -- Patrick Shanahan Please avoid TOFU and trim >quotes< http://wahoo.no-ip.org Registered Linux User #207535 icq#173753138 @ http://counter.li.org
/usr/src/linux/Documentation part of the kernel sources. On Tue, 11 Mar 2003, Patrick Shanahan wrote:
* Bruce Marshall
[03-11-03 11:21]: .... snip .........
What I would do would be to learn the 'magic shutdown'... which if your kernel is built for it (I believe SuSE kernels are) would be:
Alt-Sysreq-u (twice doesn't hurt) Alt-sysreq-s (twice too)
Then you could turn your machine off.
But if it's hung up, and you want to re-boot, then:
Alt-sysreq-b
Read up on the 'magic key' (I think it's called)
The first two above does a 'sync' and then a mount as Read-only.
The 3rd does a boot. Should provide a clean shutdown but YMMV.
(and sometimes when the machine is locked, it doesn't respond to the above anyway)
Where is this information available, ie: 'magic shutdown' ?? -- Patrick Shanahan Please avoid TOFU and trim >quotes< http://wahoo.no-ip.org Registered Linux User #207535 icq#173753138 @ http://counter.li.org
-- Check the headers for your unsubscription address For additional commands send e-mail to suse-linux-e-help@suse.com Also check the archives at http://lists.suse.com Please read the FAQs: suse-linux-e-faq@suse.com
On Tuesday 11 March 2003 12:02 pm, Patrick Shanahan wrote:
* Bruce Marshall
[03-11-03 11:21]: .... snip .........
What I would do would be to learn the 'magic shutdown'... which if your kernel is built for it (I believe SuSE kernels are) would be:
Alt-Sysreq-u (twice doesn't hurt) Alt-sysreq-s (twice too)
Then you could turn your machine off.
But if it's hung up, and you want to re-boot, then:
Alt-sysreq-b
Read up on the 'magic key' (I think it's called)
The first two above does a 'sync' and then a mount as Read-only.
The 3rd does a boot. Should provide a clean shutdown but YMMV.
(and sometimes when the machine is locked, it doesn't respond to the above anyway)
Where is this information available, ie: 'magic shutdown' ??
/usr/src/linux/Documentation/sysrq.txt Might also be a How-To for it. http://www.linuxhq.com/kernel/file/Documentation/sysrq.txt -- +----------------------------------------------------------------------------+ + Bruce S. Marshall bmarsh@bmarsh.com Bellaire, MI 03/11/03 12:09 + +----------------------------------------------------------------------------+ "Somebody's terminal is dropping bits. I found a pile of them over in the corner."
The 03.03.11 at 18:06, H du Plooy wrote:
Is there a way to shut down cleanly, but without taking the trouble to stop all running services ect. I want it to just unmount all mounted systems (hard unmount, weather or not they're in use) and have ACPI or APM or whatever switch the machine off.
Have you tried "halt -f", o perhaps "poweroff -f"? With the option "-n" it doesn't even sync. I just tried it on another PC at my side; it says "sytem halted" in seconds, but pressing "Enter" gives my prompt back. However, that computer is old and can not power itself off. I might try on this one (a P-IV), if I remember later, but... perhaps you can try for yourself and report back ;-) -- Cheers, Carlos Robinson
participants (6)
-
Bruce Marshall
-
Carlos E. R.
-
H du Plooy
-
Jerry Feldman
-
Patrick Shanahan
-
Tom Wesley