From owner-freebsd-hackers Mon Mar 15 13:14:28 1999 Delivered-To: freebsd-hackers@freebsd.org Received: from smtp1.vnet.net (smtp1.vnet.net [166.82.1.31]) by hub.freebsd.org (Postfix) with ESMTP id 3690D14CC2 for ; Mon, 15 Mar 1999 13:14:12 -0800 (PST) (envelope-from rivers@dignus.com) Received: from dignus.com (ponds.vnet.net [166.82.177.48]) by smtp1.vnet.net (8.9.1a/8.9.1) with ESMTP id QAA25818; Mon, 15 Mar 1999 16:13:21 -0500 (EST) Received: from lakes.dignus.com (lakes.dignus.com [10.0.0.3]) by dignus.com (8.9.2/8.8.5) with ESMTP id QAA08351; Mon, 15 Mar 1999 16:13:04 -0500 (EST) Received: (from rivers@localhost) by lakes.dignus.com (8.9.2/8.6.9) id QAA50381; Mon, 15 Mar 1999 16:13:03 -0500 (EST) Date: Mon, 15 Mar 1999 16:13:03 -0500 (EST) From: Thomas David Rivers Message-Id: <199903152113.QAA50381@lakes.dignus.com> To: dillon@apollo.backplane.com, ken@plutotech.com Subject: Re: power-off without halt Cc: hackers@FreeBSD.ORG, smp@csn.net In-Reply-To: <199903151941.MAA20523@panzer.plutotech.com> Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > > Matthew Dillon wrote... > > :Hi, > > : > > : We are looking at using FreeBSD as an "embedded OS" inside a line > > :of instruments we are building. I think I have a handle on all the > > :issues except how to cleanly handle shutdown where there is no > > :console, and thus no way to send a 'halt' command. The requirement > > :is that the user can merely turn off the power, nothing more required. > > : > > : I can modify the disk setup, kernel/util code as needed, I just need some > > :idea for a workable solution. Has anyone delt with this problem before? > > : > > :-- > > :Steve Passe | powered by > > :smp@csn.net | Symmetric MultiProcessor FreeBSD > > > > Well, physically speaking you can't power off a machine that may > > be writing to its disk. If it is in the middle of a write, you > > *will* lose sectors to hard errors. > > > > So, typically, the best way to deal with this sort of situation is > > to mount the disk read-only and never write to it. Or to not have a > > disk at all. Or to use a pcmcia type flash disk. > > SGI boxes have a neat feature (or at least they did when I did IRIX work a > few years ago). They have a "soft" power off switch. You hit the switch, > and it safely shuts down the machine. > I believe you can make pressing -- on the console do the same thing (or close to it) on FreeBSD. It's not a "switch" but it's close... - Dave Rivers - To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message