[pocket-linux] local_fs script in 6.3.4
David Horton
dhorton at megsinet.net
Tue Nov 4 09:18:39 EST 2003
> I'm working through the pl guide and I think there is a problem with the
> /etc/init.d/local_fs script. In the "stop" section, there is an
attempt to
> remount root as read-only however the mount command is as follows:
>
> mount -o remount,rw /
>
> I think the "rw" should be changed to "ro"
>
> In addition, if you were to flush the disk caches, would you not have
to do
> that before you umount the disks? If so, the sync command should be
placed
> before the first umount.
>
> Does anyone agree with these observations?
>
> Regards,
> Michael.
>
You are absolutely correct on both points. I will make a note to fix
this in the next version.
Here's a little background on the sync after umount thing. The reason I
put it in is that it did seem to make a difference on a hard disk based
system that I built. Before I put the sync in fsck was always
complaining on the next reboot. So I put in sync after the umount and
this cleared up. I attributed this to the fact that sync must be doing
something to flush the cache. I think what was actually happening is
that the sync provided a little extra delay before my system powered
itself off. This extra delay allowed the hardware cache on my IDE drive
to finish writing to the platters before the drive lost power. I
replaced sync with 'sleep 1' and everything was fine. I've noticed that
on a recent 2.4.20 kernel I built that there is now a message about
"flushing IDE cache" when the system goes down so I probably don't even
need 'sleep 1' anymore.
Dave
More information about the Pocket-Linux
mailing list