beakmyn
11-15-2004, 09:43 PM
Ok So I've installed Knoppix (DSL flavor actually) to my harddrive and then used
# tune2fs -j
to convert my ext2 to an ext3 filesystem. The system is a digital picture frame so typically there isn't a keyboard hooked up. I would like to implement a method similar to what Smoothwall uses for automatically rebooting after checking the filesystem for errors (in the event it gets turned off without a proper shutdown).
From the smoothwall forums:
/etc/rc.d/rc.sysinit
# A return of 2 or higher means there were serious problems.
if [ $RC -gt 1 ]; then
export PS1="(Repair filesystem) \# # "
if [ $RC -lt 4 ]; then
echo "$STRING: Repaired."
echo "*** Reboot required. The system will reboot in 30 seconds."
sulogin -t 30
else
echo "$STRING: Failed"
echo "*** An error occurred during the file system check."
echo "*** Dropping you to a shell; the system will reboot"
echo "*** when you leave the shell."
sulogin
fi
echo "Unmounting filesystems"
umount -a
mount -n -o remount,ro /
echo "Automatic reboot in progress."
reboot -f
fi
But I'm not sure if this is the right place in the Knoppix start up procedure. I've tried setting my /dev/hda1 to readonly in /etc/fstab but it seems like Knoppix ignores this. Can anyone assist me in this endevour?
http://www.frontiernet.net/~beakmyn/pictureframe
# tune2fs -j
to convert my ext2 to an ext3 filesystem. The system is a digital picture frame so typically there isn't a keyboard hooked up. I would like to implement a method similar to what Smoothwall uses for automatically rebooting after checking the filesystem for errors (in the event it gets turned off without a proper shutdown).
From the smoothwall forums:
/etc/rc.d/rc.sysinit
# A return of 2 or higher means there were serious problems.
if [ $RC -gt 1 ]; then
export PS1="(Repair filesystem) \# # "
if [ $RC -lt 4 ]; then
echo "$STRING: Repaired."
echo "*** Reboot required. The system will reboot in 30 seconds."
sulogin -t 30
else
echo "$STRING: Failed"
echo "*** An error occurred during the file system check."
echo "*** Dropping you to a shell; the system will reboot"
echo "*** when you leave the shell."
sulogin
fi
echo "Unmounting filesystems"
umount -a
mount -n -o remount,ro /
echo "Automatic reboot in progress."
reboot -f
fi
But I'm not sure if this is the right place in the Knoppix start up procedure. I've tried setting my /dev/hda1 to readonly in /etc/fstab but it seems like Knoppix ignores this. Can anyone assist me in this endevour?
http://www.frontiernet.net/~beakmyn/pictureframe