Matthew Franz - 2003-08-08

Logged In: YES
user_id=16599

Perhaps this is the answer:
Date: Wed, 6 Aug 2003 03:02:05 -0600
From: Erik Andersen <andersen@codepoet.org>
To: David Boyes <d.boyes@computer.org>
Subject: Re: [BusyBox] init script and umount
Cc: busybox@mail.codepoet.org

On Wed Jul 30, 2003 at 09:35:15PM +0200, David Boyes wrote:
> Hi all,

>

> I have been having a problem with shutdown, or rather
restart after shutdown,
> on a busybox system using a conventional hard disk as the
root device. After
> looking at the sources, the CVS and newsgroups, I am not
sure if this is a
> bug, a feature or just a result of the combination I am
using. The problem
> is that for recent versions disk is always "unclean" and
needs to be fsck'ed.
>

> The problem seems to be in init.c. Apparently the
decision was made between
> 60.3 and 60.5 to put the run_actions() before the kill()
calls which pull
> down all but the shutdown processes, in order that users
can invoke scripts
> from inittab in a normal environment. The problem on my
system is that this
> does not permit "umount -a -r" given by a user to unmount
and remount the
> root disk, so the next start sees the disk as badly
unmounted.

Have you tried adding something like this to your
/etc/inittab file?

# Stuff to do before rebooting

null::shutdown:/usr/bin/killall klogd
null::shutdown:/usr/bin/killall syslogd
null::shutdown:/bin/umount -a -r
null::shutdown:/sbin/swapoff -a