DrPozo
Occasional Visitor
I have had some success with USB disk encryption on Asuswrt-Merlin. The only problem is that the WebUI shows the disk as "unmounted" and the user scripts "post-mount" and "unmount" are never called. I think the reason is that cryptsetup puts the encrypted disk partitions in /dev/mapper, not /dev. Also, there is no /etc/crypttab in Asuswrt. I managed to got everything working just fine, however. My unmount logic runs from /jffs/scripts/services-stop at router reboot or shutdown.
I modified the Asuswrt-Merlin firmware so that cryptsetup runs from /entware/sbin and its dependant libraries in /entware/lib. If you intend to try this, you must patch the ELF headers yourself for the Entware-ng cryptsetup program and its dependent libraries before compiling them into the firmware. Otherwise, cryptsetup won't be able to find the Entware-ng libraries in the firmware. This technique might also be possible with Optware-ng to run a few packages side-by-side with Entware-ng from the firmware or /jffs. The firmware is squashfs compressed, and there's still plenty of room left for more programs. C'mon on in boys, the water is fine!
I modified the Asuswrt-Merlin firmware so that cryptsetup runs from /entware/sbin and its dependant libraries in /entware/lib. If you intend to try this, you must patch the ELF headers yourself for the Entware-ng cryptsetup program and its dependent libraries before compiling them into the firmware. Otherwise, cryptsetup won't be able to find the Entware-ng libraries in the firmware. This technique might also be possible with Optware-ng to run a few packages side-by-side with Entware-ng from the firmware or /jffs. The firmware is squashfs compressed, and there's still plenty of room left for more programs. C'mon on in boys, the water is fine!
Last edited: