Mounting USB Partition During Bootup

Ok, so I have installed a USB stick for logging, and modified the ‘functions_usbdrive.sh’ script to support 256MB (default 20MB) of logging and tweaked ‘/etc/cmh/cmh.conf’ to support up to 30 rotated files (default 10). I also modified ‘/etc/config/fstab’ to remove the SWAP definition. Now… I want to mount ‘/dev/sda2’ into directory /data on bootup to store any additional files… ie daily backups locally. I tried adding the following section into ‘/etc/config/fstab’:

config mount
        option enabled '1'
        option target '/data'
        option device '/dev/sda2'
        option fstype 'ext3'
        option options 'rw,noatime,nodiratime,errors=continue,data=ordered'
        option enabled_fdisk '1'
        option enabled_mkfs '1'
        option enabled_fsck '1'
        option label 'DATA'
        option fsck_days '30'
        option fsck_mounts '10'

However, this does not work. Of course, I did test mounting manually via ‘mount /dev/sda2 /data’ and this works fine. Any idea on how to get this to mount on a reboot?

So have resolved this. Looks like my configuration for mounting another partition (/dev/sda2) on Vera is correct. This does populate the UCI system variables correctly. However, the ‘block’ utility is missing! This is despite there being bootup scripts (mostly from the OpenWRT system) which reference the ‘block mount’ command. So, I was able to simply install the missing package:

opkg update
opkg install block-mount

I can confirm this survived a reboot, and works now!

root@MiOS_XXXXXXXX:/# block mount
block: /dev/mtdblock10 is already mounted
block: /dev/mtdblock6 is already mounted
block: /dev/mtdblock9 is already mounted
block: /dev/sda1 is already mounted
block: /dev/sda2 is already mounted
root@MiOS_XXXXXXXX:/# mount | grep /data
/dev/sda2 on /data type ext3 (rw,noatime,nodiratime,data=ordered)

Now I can use some of @rigpapa 's crontab scripts to automate backups to me spare /data partition :wink: