Create a new file /etc/init.d/checkfs containing the following:
# Begin /etc/init.d/checkfs
echo -n "Activating swap..."
if [ -f /fastboot ]
echo "Fast boot, no file system check"
/bin/mount -n -o remount,ro /
if [ $? = 0 ]
if [ -f /forcefsck ]
echo -n "/forcefsck exists, forcing "
echo "file system check"
echo "Checking file systems..."
/sbin/fsck $force -a -A -C -T
if [ $? -gt 1 ]
echo -n "fsck failed. Please repair your file "
echo "systems manually by running /sbin/fsck"
echo "without the -a option"
echo -n "Please note that the root file system "
echo "is currently mounted in read-only mode."
echo -n "I will start sulogin now. When you "
echo "logout I will reboot your system."
echo -n "Cannot check root file system because it "
echo "could not be mounted in read-only mode."
# End /etc/init.d/checkfs