Squid & running a large ramdisk from a HD install doesn't seem to be as well documented as other things, I would like to share some experiences I had. I also have a couple questions.
I stopped using Freesco for a long time because the HD in the system I was using several years ago crashed, and I simply hadn't had time to rebuild it. About 6 months ago, my wife's P4 1G RAM computer's HD burned up, instead of fixing it, I replaced her computer. I rebuilt this for my home a few days ago with a 1G CF card formatted FAT 32 for the HD. As far as CF cards go, this one is terribly slow, but works well for what I'm using it for. I have a need for filtering content from the Kid's computers in their bedrooms. Right now, they just don't have access to almost anything from their bedrooms. I also have a 1.5M internet connection, and when everybody is running downloads, doing taxes online, trying to watch youtube & netflix, and playing online flash games at the same time, we have a serious problem. I'm tried Squid 2.5, but especially with the FAT filesystem, CF is slow enough that web pages are very slow loading, if the content isn't in the cache, and much of the content on web pages time out, or doesn't load at all. I eventually created a 128mb RAM disk, and rebuilt the cash on the ramdisk on every reboot. This is working extremely well, I'm sure there is a small amount of lag the first time a page loads, but I can't tell the difference. I'm also using the hosts package to filter some of the garbage. Google's ads seem to be blocked with hosts; may cause some minor problems. Overall, I give the system a thumbs up.
Every time I make a major change, I shutdown the router, pull the CF card, back it up, put it back in & reload. Probably not good for a large production environment, but it is the best thing that I have ever been able to do for my house network. I've already loaded backups several times after failed configuration attempts.
These are the steps I took to get Squid running on the ramdisk:
-Put the ramd128 file provided in the ramdisks folder downloaded with the FREESCO file.
-Changed the router.bat file's ramdisk file sizes to 131072. (This is mentioned in the freesco documentation as the syslinux.cfg file, but I couldn't find it mentioned any place for a HD install. I didn't do this at first, because I couldn't find it. When booting with this configured incorrectly, the RAMDISK mounted & loaded without errors, but when attempting to read & write to it, it would kick out corruption errors. Took me a while to figure out my ramdisk was crashing all the time because this wasn't changed)
-Added the following lines to Fn1 in the rc_squid file:Attached are the full config files with .txt added to the end of the filename.rc_squid.txtsquid.conf.txt (As of yesterday, I am brand new to SQUID, and my ACL in the squid file shows that I'm testing acl commands. Nonetheless, it's really cool stuff.)
mkdir /tmp/squid
mkdir /tmp/squid/cache
chmod 700 /tmp/squid/cache
chown nobody /tmp/squid/cache
chgrp nobody /tmp/squid/cache
/mnt/bootdev/router/pkg/usr/local/squid/sbin/squid -z
-Then I added the following lines to the squid.conf file: (This is a 100mb cache for the 128mb RAM drive)
cache_dir ufs /tmp/squid/cache 100 16 256
This loads and runs correctly on every reboot. However, the rc_squid file's directory builder script is not very clean & kicks out a lot of non-harmful errors because it trys to rebuild the directory when the directory already exists alot.
I have two questions:
-I've used linux for a long time, but I'm not really good at writing scripts. I was wondering if anybody had some suggestions about cleaning the above directory builder this up? What would be a better way of doing this?
-I would like to create a bigger RAM disk. Are there any 512Mb ram disk files for Freesco? If not, how do I go about making one?