Re: Unexpected shutdowns

Adam D. Bradley (artdodge@cs.bu.edu)
Tue, 17 Feb 1998 19:00:31 -0500 (EST)


> The system files are installed on a flash device, and the majority of
> the data files are
> read-only. So far, the only file system errors resulting from improper
> shutdown have
> been on the partition where system logs are stored.
>
> Is there any way to completely disable the system logs?

The log files are kept by the syslogd/klogd processes. Pull the
appropriate symlinks out of the /etc/rc?.d directories (or edit the
etc/rc.d/rc.? scripts, depending on your distribution) and they won't
be started.

> Is there any way to log to ramdisk, so that corruption does not exist on
> restart?

Yes, just make sure the ramdisk partition is mkfs'd and mounted before
syslogd/klogd are started.

> Better yet, is there some recovery scheme that does not require console
> intervention?
> (apparently the file system check will not run unattended)

You can hack e2fsck... throw in some failure case handlers (like
automatically trying backup superblocks if the primary is invalid,
etc) and throw out any checks to make sure "the user is really
there"... but remember, that stuff is probably there for a reason.

I realize this is an embedded system, but if its networked or has
serial outut it may be a better option to just have syslogd direct all
logging data over the network/serial port/etc. This way you can have
persistent storage of the logs on the far end and won't have to worry
about doing a "proper" shutdown... (man syslogd.conf)

Adam

--
Things look so bad everywhere      Adam D. Bradley      artdodge@cs.bu.edu
In this whole world what is fair        Boston University Computer Science
We walk blind and we try to see             Ph.D. student and Linux hacker
Falling behind in what could be  ---->  Bring me a Higher Love  ---->  <><

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu