Posted: Fri Feb 20, 2009 18:24 Post subject: install optware on CIFS mounted share
The issue is CIFS does not support symbolic links... fortunately there is a solution.
I have successfully used a SMB share for /opt, well, actually used a CIFS share, but the technique is the same, regardless. The trick is to create an ext2 partition inside of a file on the CIFS/SMB share, and mount that using the loop device. I have this working on v24. The technique is as follows:
First, you must have a successfully mounted SMB or CIFS share Next, you need to install a few necessary packages
Code:
ipkg install kmod-loop
ipkg install kmod-ext2
I'm told ipkg should automatically insmod the loop and ext2 modules, but in my experience, it does not, so we can easily take care of that with:
And there you have it, optware is installed onto your CIFS or SMB directory.
Now that this part is complete, so long as you don't wipe your /jffs directory, you won't need to re-complete this every time you boot, since optware is stored safely on your CIFS file system, I simply added the following to a startup script in my CIFS share that will execute once the CIFS share is mounted.
Code:
insmod /jffs/lib/modules/2.4.30/loop.o
insmod /jffs/lib/modules/2.4.30/ext2.o
mount -o loop /tmp/smbshare/opt.ext2 /opt
Special thanks to whoever the author of the information at http://forum.x-wrt.org/index.php?topic=428.0;wap2 is, as it was incredibly helpful in figuring out how to accomplish this. There is also information here on using the above technique to create a nice big swap space for all those opt-ware apps as well.
Thanks for updating the wiki, however the details on creating the file on the CIFS partition above may be useful for people (like me) who are casual linux users.
Would be nice if the wiki included the dd steps as I had to google to get here.
I'm also finding that if I use the Administrator page to reboot my router, my CIFS doesn't get remounted -- is this normal?