Using Sage with SquashFS


SquashFS is the mountable read-only filesystem, almost all linux live and install systems are using. It is builtin the linux kernel and all tools are available for all linux platforms. It is a little bit like a compressed iso cd image file. But it can hold a full unix filesystem and has some other speed up features.



Where it is useful?

Where can I download sagemath SquashFS-files

Prebuilt squashfs files for some ubuntu versions can be found here:

How to make a SquashFS file

  1. First download sagemath to your fastest Computer available.
  2. Install the packages needed (for debian/ubuntu: sudo apt-get install gfortran m4 build-essential squashfs-tools)

  3. Compile sagemath and run the tests.
  4. If needed copy/move it to the place where will be mounted later and start it there (some paths are hardcoded)
  5. Go to a terminal: mksquashfs /path/to/sage-x.y.z /path/to/sage-x.y.z.sqfs

(If you have to compile a special version for old machines configurate the variables for make so that it compiles for the processors on which you want to use sagemath. E.g. if you build sagemath on a system with SSE3 optimization then it will work properly only on systems where the processor has this functionality.)

How to mount the SquashFS file

About mounting files per /etc/fstab or directly per mount command there a lot of man pages in almost all languages available. Please just use the search engine of you choice.

  1. First create the folder where sagemath should be mounted in (it has to be same to the system where you built the sqfs file!!). The Path /usr/local/sage-x.y.z is the standard, where x.y.z stands for the version
  2. under debian/ubuntu type: sudo mount -o loop -t squashfs /path/to/sage-x.y.z.sqfs /path/to/sage-x.y.z

  3. now you can start sage with /path/to/sage-x.y.z/sage

You can create a link so that you just can type sage to start sagemath:

sudo ln -s /path/to/sage-x.y.z/sage /usr/local/bin/sage

Further Information about SquashFS

UsingSquashFS (last edited 2011-01-19 22:15:25 by MikeHansen)