How do I write to/make changes to an existing squashfs filesystem? I have tried using aufs/unionfs, but these require kernel modules that are extremely hard to compile.
Do not use aufs/unionfs. On a Fedora system for example, install squashfs-tools by doing
#yum install squashfs-tools
This will get you /sbin/mksquashfs and /usr/sbin/unsquashfs installed on your host machine. Use these to uncompress an existing squashfs, make changes, and then compress it back again. Like so....
#ls rfs.squashfs
#unsquashfs rfs.squashfs
#ls rfs.squashfs squashfs
Now make changes
#cd squashfs
#mkdir etc/vector
And compress it back
#mksquashfs squashfs my-new-squashfs