E2compr 0.4 User Manual – Install

Wayback MachineAbout this captureCOLLECTED BY Organization: Alexa Crawls Starting in 1996, Alexa Internet has been donating their crawl data to the Internet Archive. Flowing in every day, these data are added to the Wayback Machine after an embargo period. Collection: Alexa Crawls DE Crawl data donated by Alexa Internet. This data is currently not publicly accessible TIMESTAMPSloadingGo to the first, previous, next, last section, table of contents.

Minimum things to download to start with: e2fsprogs, the appropriate kernelpatch, and this user manual. (At a bare minimum, you need to read thesection Quickstart page.)

In brief:

  1. Install the e2compr version of e2fsprogs (e2fsck & friends).The e2compr version of e2fsck works fine for non-e2compr filesystems, butthe non-e2compr version of e2fsck will refuse to check e2compr filesystems.
  2. Apply the appropriate e2compr patch to your kernel source.
  3. Reconfigure the kernel, answering `y’ toCONFIG_EXPERIMENTAL, `y’ (or `m’) to the ext2filesystem, and `y’ to ext2 compression.
  4. Compile the kernel. While this is happening, read the section Quickstartsection of the user manual.(If you’ve followed the above steps, you can start using e2compr as soon asyou reboot to this new kernel.)
  5. At your leisure, install the other e2compr software: the modified versionsof `e2defrag’ (if you use that) and `find’, and the `e2c-ancil’ package.(These can all be found fromhttp://opensource.captech.com/e2compr/software-04x.html.)

The remainder of this appendix goes into more detail on the abovesteps. Note that what follows may be out of date in a few places.

This section is organised into 3 parts: how tobuild a new kernel; how to build and install theutilities; how to update e2fsck.

The e2compr version of e2fsprogs can be found at
http://opensource.captech.com/e2compr/software-04x.html#e2fsprogs.

The instructions for building e2fsprogs from source follow, for thosefor whom no prebuilt binaries are available on the web site.

Assuming you don’t already have the full source code to standarde2fsprogs-1.14, get `e2fsprogs-e2c-1.14.6.tar.gz’ (or whatever thecurrent version on the web site is). If you use Debian, then also get`e2fsprogs-e2c_1.14.6-1.diff.gz’.

Extract the tar file:

$ tar xzf e2fsprogs-e2c-1.14.6.tar.gz

cd into the newly-created `e2fsprogs-e2c-1.14.6′ directory.

If you use Debian, then do:

$ gzip -cd e2fsprogs-e2c_1.14.6-1.diff.gz | patch -p1$ chmod 755 debian/rules$ ./debian/rules build$ fakeroot -c ./debian/rules binary$ cd ..$ ls -ltr *.deb # Check that you want to install all of them.$ su# dpkg -i *.deb

(If you do not have fakeroot, then do `su’ and run`./debian/rules binary’ from inside the root shell.)

If you do not use Debian, then do the following:

  1. Rebuild e2fsck, as described in the file `INSTALL’ from thee2fsprogs distribution. Make sure that the test suite is passedwithout any problem.
  2. Install the new e2fsck so that this will be the one used the nexttime your machine needs it.Note: using the `make install’ of e2fsprogs will not back up yourexisting e2fsck, so you may wish to do that manually beforehand.

E2compr is a patch against the ext2 fs code. You just have toapply the patch (gzip -cd patch-file | patch -d/usr/src/linux -p1) and recompile your kernel.

Here are more detailed instructions. I assume you have the correctpermissions for everything (e.g. by running the commands as root), andthat you are in the directory that was created after extracting thee2compr archive (i.e. the directory where you find this file).

  1. First, check if you have the correct kernel sources and patch. E2comprkernel patches are available fromhttp://opensource.captech.com/e2compr/software-04x.html#kernel.(If you have a kernel older than 2.0, then take a look at Antoine’s page(or upgrade your kernel).)In the following text, patch-file will refer to the correct patchfile for your kernel version.
  2. The following shouldn’t be necessary, but if you want to bereally safe then you can check that your ext2 filesystems do notalready contain any files with the compressed attribute.There probably won’t be any such files (unless you’ve beenplaying with chattr before), and even if there are, thereshouldn’t be a problem, because the i_reserved2[] fields (whichhold the bitmap) should be zero. But to be really safe:find mountpoints -xdev \( -type f -o -type d \) -print0 | xargs -0r lsattr -d | grep -v ‘^..-‘where mountpoints might be `/ /usr’ or ` `grep ext2 /etc/mtab |cut -d\ -f2` ‘. (That’s two spaces after `-d\’, and the back-quotebefore `grep’ and after `-f2′ are included.)If there are any compressed files, then try to find why, and toturn it off (e.g. by doing chattr -c).
  3. Check for existing patch cruft, so that you can identify what cruft was created by the e2compr patch. Assuming that your linuxsource tree is in /usr/src/linux, do:$ find /usr/src/linux/. -path ‘*.orig’ -ls$ find /usr/src/linux/. -path ‘*.rej’ -lsFor most people, these either produce no output, or lots of`*.orig’ files but no `*.rej’ files.The first of these commands displays backups from earlier patching;the second displays the results of previous bad patching. If any`*.rej’ files are found, then look carefully at them: they maymean that there are existing problems in your kernel source tree.
  4. Apply the patch. If your kernel source tree is in the directory/usr/src/linux, you can do:# gzip -cd patch-file | patch -d /usr/src/linux -p1Note: if you have a previous version installed, you will first needeither to uninstall that one with gzip -cdold-patch-file | patch -d /usr/src/linux -R-p1, or else to start with a clean kernel sourcetree.
  5. Verify if the patch has been correctly applied:$ find /usr/src/linux/. -path ‘*.rej’ -printIf this command displays any file names, the patch has not beencorrectly applied. (Probably you don’t have a clean kernel source treeor you have the wrong kernel version.) Either try to get a matchingclean source tree and e2compr patch and start again, or look at the .rejfiles and try to patch manually. If neither of these is practical thenyou can cancel the effect of applying the patch at step 3 with thecommand gzip -cd patch-file | patch -R -d/usr/src/linux -p1.
  6. Remove the original files. (This is completely redundant withrecent (>= 2.4) versions of patch, and optional with olderpatch versions.)$ find /usr/src/linux/. -path ‘*.orig’ -exec rm {} \;
  7. Tune the configuration. Most of the configuration options can nowbe set by running make *config: $ cd /usr/src/linux $ make configor $ make oldconfigor $ make menuconfigor $ make xconfigSee `/usr/src/linux/README’ if you don’t know which *configyou want.The only option that isn’t set during `make *config’ is that you can define various things in `fs/ext2/debug.h’ to control what goes toyour kernel log.
  8. Update dependencies:$ cd /usr/src/linux$ make clean; make dep
  9. Build your kernel: $ cd /usr/src/linux # make zliloor $ make zImageor # make zdiskor whatever you usually do when rebuilding your kernel.
  10. Reboot your machine:# shutdown -r now(or however you usually do it)
  11. That’s all. There is no need to change the fstab, nor torepartition your disk.

ELF binaries of the utilities are included in the distribution. (cd to the directory named `prebuilt’, examine the makefile, type`make install’.)

However, if you wish to rebuild from source, follow the followinginstructions.

To build everything from source, you will need to have the source fore2fsprogs, which should be available for ftp from ftp.ibp.fr andtsx-11.mit.edu in /pub/linux/packages/ext2fs .

Apply the e2fsprogs patch.

$ tar xzf e2fsprogs-1.14.tar.gz$ cd e2fsprogs-1.14$ patch -s -F0 -p1 < somewhere/e2fsprogs-1.14-patch

Then just follow the instructions included with e2fsprogs.

Note: You may wish to keep a copy of the old lsattr andchattr, in case you want to de-install the patch. (Myself I wouldn’tbother, because the new ones should work fine on an unpatched system.)

Go to the first, previous, next, last section, table of contents.

Leave a Reply

Your email address will not be published. Required fields are marked *