#!	/bin/sh
#set -x 
fstype=ext2
root_device=`block_device /`
echo "Root is mounted from $root_device"
# mount writable
mount -t $fstype -n -o remount $root_device /
# write new mtab
echo -n > /etc/mtab
mount -t $fstype -o remount $root_device /
# Make sure there are no old entries in /etc/fstab to confuse the installer.
echo "$root_device / $fstype rw 0 1" >/etc/fstab
# already mounted by init; write mtab entry
mount -o remount -t proc proc /proc
update
(cat /proc/kmsg >/dev/tty4 &) 2>/dev/null
# nfsroot cleanup (persitent files between runs)
rm -f /tmp/kbdconf
rm -f -r /tmp/notarget

echo "/etc/rc done."
exit 0
