I have recieved a mail (thanks Orzenil) asking about the creation of the E-LANE cd from scratch, starting from a standard knoppix distro. I currently don´t have documentation on the complete proccess, but it basically reduces to this:
- In the tuturial (e-lane.org/pub/tutorial), go to the point 7, starting from your knoppix distro, and ignoring the non-applicable steps.
- Install postgres and aolserver, make them work in the chrooted enviroment.
- The problem now is that, when that data from postgres and aolserver is on the cd, it will not be writable,
so it will not work. To solve this, on startup (every time we boot the cd in a new machine) we´ll copy some folders
from the cd to hard-disk to, say, the folder /OpenACS. In the old path well substitute these folders with symlinks
with their names, which are pointing to the folders in the new path.
The /OpenACS folder is mounted at root ( / ) using a loop device, so we avoid the /mnt/hdaX path, which may vary
from computer to computer.
Take the folders, which are /var/lib/postgres/data and <aolserver_home>/<server> somewhere else in the cd or
change their names, and substitute them for symbolic links pointing to /OpenACS/<folder_name>.
On the creation of the cd we must only create the symlinks and move-rename the folders, and create the script which
makes the copy from cd to harddisk on startup.
In the knoppix E-LANE distro, this script is /etc/init.d/openacs, which executes automatically at startup. It performs several tasks. Basically:
1. Searches all the partitions in the machine looking for a file called knoppix_elane (which would contain the data from
previous sessions, that is, the postgres and aolserver folders we mention above).
2. If this file is found, the script mounts it at /OpenACS using a loop device.
3. If this file is not found, the script searches all the partitions again looking for one with enough free space.
3.1 When it is found, creates one file of a given size, enough for the folders and some extra space to let the database
grow (hundreds of MB), and mounts it at /OpenACS, again with a loop device
3.1 Then it copies the folders from the cd into /OpenACS, giving them the proper permissions.
5. Using ifconfig, the script finds out the IP address of the machine (localhost if not connected), and edits the
<openacs_server>.tcl file to set this new address in the server.
4. Then the script starts PostgreSQL and AOLserver.
There are some details more, check the /etc/init.d/openacs file, it is just a bash script.
Anyone else interested in this, please post questions, bugs, comments. Thanks.