System information
Sharing and maintaining SLES 10 SP2 Linux under z/VM 83
echo " bash# mount -n -o remount,rw /local"
echo
echo "Attention: Only CONTROL-D will reboot the system in this"
echo "maintanance mode. shutdown or reboot will not work."
echo
PS1="(repair filesystem) # "
export PS1
/sbin/sulogin /dev/console
# if the user has mounted something rw, this should be umounted
echo "Unmounting file systems (ignore error messages)"
umount -avn
# on umsdos fs this would lead to an error message.
# so direct errors to /dev/null
mount -no remount,ro / 2> /dev/null
sync
reboot -f
fi
sync
# ROR: del 1, add 4
# mount -n -o remount,rw /
mount -n /local
mount -n --bind /local/etc /etc
mount -n --bind /local/root /root
mount -n --bind /local/srv /srv
test $FSCK_RETURN -gt 0 && touch /fsck_corrected_errors
else
echo
# ROR: chg 1
# echo '*** ERROR! Cannot fsck because root is not read-only!'
echo '*** ERROR! Cannot fsck because /local is not read-only!'
echo
fi
else
if test "$ROOTFS_FSCK" != "0" ; then
# ROR: del 1, add 1
# echo "root file system (/) is NOT being checked."
echo "/local file system is NOT being checked."
# ROR: del 1, add 4
# mount -n -o remount,rw /local
mount -n /local
mount -n --bind /local/etc /etc
mount -n --bind /local/root /root
mount -n --bind /local/srv /srv
fi
# check if root filesystem ro/rw matches fstab entry
myopt_should=$(get_options /etc/fstab first)
myopt_is=$(get_options /proc/mounts last)
WRITABLE=unknown
NEED_REMOUNT=0
have_option $myopt_should $myopt_is
# if test "$NEED_REMOUNT" = "1" ; then
# mount -n -o remount,$WRITABLE /
# fi
mount -n /local
mount -n --bind /local/etc /etc
mount -n --bind /local/root /root
mount -n --bind /local/srv /srv