[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: proc mount, but acts like it isn't.
On Mon, 2002-03-04 at 16:11, Steven Pritchard wrote:
> On Mon, Mar 04, 2002 at 03:57:25PM -0500, Jeff Licquia wrote:
> > - /etc/mtab is out of sync or isn't being updated.
>
> Wouldn't this fix that problem?
>
> > /etc/mtab
> mount -n -t proc none /proc
> cat /proc/mounts > /etc/mtab
Partially. On my system, /proc/mounts lists "/dev/root" as the root FS,
while mtab lists the proper disk partition device. I'm not sure that
this matters, though.
> > I believe mount is responsible for /etc/mtab. Can you confirm that it's
> > getting written to at boot time?
>
> Is it getting *cleared* at boot time? If not, it could screw up
> mount... Red Hat's rc.sysinit contains the following:
>
> # Clear mtab
> >/etc/mtab
>
> # Remove stale backups
> rm -f /etc/mtab~ /etc/mtab~~
>
> Make sure your system is running something similar on boot.
On Debian, that code is found in /etc/init.d/checkroot.sh, at the end:
#
# If the root filesystem was not marked as read-only in /etc/fstab,
# remount the rootfs rw but do not try to change mtab because it
# is on a ro fs until the remount succeeded. Then clean up old mtabs
# and finally write the new mtab.
#
mount -n -o remount,$rootopts /
if [ "$rootmode" = rw ]
then
rm -f /etc/mtab~ /etc/nologin
: > /etc/mtab
mount -f -o remount,$rootopts /
mount -f /proc
[ "$devfs" ] && grep -q '^devfs /dev' /proc/mounts && mount -f "$devfs"
fi
There should be a symlink to /etc/rcS.d to it, and it should appear
early (on my system, it's "S10checkroot.sh").
-
To unsubscribe, send email to majordomo@luci.org with
"unsubscribe luci-discuss" in the body.