2.1. squashfs3.4

2.1.1. Introduction to Squashfs

The Squashfs package contains a highly compressed read-only filesystem for Linux.

2.1.2. Patching the kernel

There are eleven kernel patch directories in the Squashfs source directory depending on your kernel version. If your version is not listed you will have to choose the patch for the nearest kernel listed. First, cd into your kernel top level directory, and run the following command:

patch -Np1 -i <location-of-squashfs>/kernel-patches/linux-<version>/squashfs3.4-patch

Where "location-of-squashfs" is the path to the squashfs3.4 source directory.

The squashfs patches patch the relevant kernel files to add configure support,initrd support, include files, and the squashfs directory under linux/fs/.

Once patched, the kernel must be reconfigured, with squashfs support turned on (Y) to ensure that inflate support is built into the kernel. The squashfs kernel option can be found in the miscellaneous filesystems submenu near the bottom of the filesystems submenu.

2.1.3. Installing squashfs-tools

Assuming you are in the squashfs3.4 source directory, install Squashfs by running the following commands:

cd squashfs-tools &&
make

Then, as user root, run the following:

cp -v unsquashfs mksquashfs /usr/bin