I try to customize file "/usr/sbin/rebuildfstab" and add "mount -a" into "/opt/bootlocal.sh" to mount all mountable device automatically. So, I changed 'OPTIONS="noauto,users,exec"' to 'OPTIONS="users,exec"'. But, when test the customized tinycore on an ASUS P5QL PRO motherboard machine, it stop booting because no floppy device or no media in a MARVELL PATA COMBO R/W DVD.
I found a way to only mount those device can be determined its file system by "blkid"(/usr/sbin/fstype). I added some code into /usr/sbin/rebuildfstab as below:
DEVNAME=`echo "$i" | awk 'BEGIN{FS="/"}{print $(NF-1)}'`
DEVMAJOR="$(cat $i|cut -f1 -d:)"
# Check file system for auto mounting
FSTYPE="$(fstype "/dev/$DEVNAME")"
if [ -z "$FSTYPE" ]; then
OPTIONS="noauto,users,exec"
else
OPTIONS="users,exec"
fi
Is there a better way to do this job? Is there any problem in my code?
Thanks.