Disk Encryption

I'm trying to setup disk encryption but I'm not having much luck. Creating the disk was quite easy but mounting it on boot is a different story.

I read the https://openwrt.org/docs/guide-user/storage/disk.encryption and the script purpose is for mounting external disks. Mine is internal so there will never be a plug event to start it.

Currently I've used /etc/rc.local to mount the disk but this has some drawbacks as its run last.

cryptsetup open --key-file=/etc/config/mykey /dev/mydevice storage
[ -d /mnt/storage ] || mkdir /mnt/storage
mountpoint /mnt/storage || mount /dev/mapper/storage /mnt/storage

I'd rather use /etc/crypttab and /etc/fstab but somehow I just can't get it to work.

So, I need some assitance :blush: