The Bridge 2000-November Archive by Subject

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 TIMESTAMPSloading

Starting:Mon Nov 6 03:11:49 2000
Ending:Tue Nov 28 23:42:22 2000
Messages: 21

Last message date:Tue Nov 28 23:42:22 2000
Archived on:Tue Nov 28 15:42:28 2000

This archive was generated by Pipermail 0.05 (Mailman edition).

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.

e2compr: Software

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 TIMESTAMPSloading

There is a file format difference between e2compr-0.3.x and e2compr-0.4.x.

If you are using kernel 2.0, then you are stuck with e2compr-0.3.x (unless you move to kernel 2.2).

If you are an existing e2compr user, you might as well wait a bit before switching to 0.4. In the meantime, I have more chance to smoothen the transition for you (see next section).

0.3.x Software

0.4.x Software

Moving from e2compr-0.3 to e2compr-0.4 involves decompressing and/orremoving everything under 0.3, and restoring/recompressing it under0.4. You must do `chattr -c’ to everything before movingto 0.4 — even to directories.

I’m preparing some programs to help people do this. The main thing left to do is to modify e2compress to have a mode where it just looks for problems in files rather than compressing or decompressing. It is important to find any problems before archiving and restoring everything, because otherwise the problems could just get hidden, in which case you’d have corrupted files without even knowing about it.

For those that wish to perform the transition without waiting, some broad instructions follow. You might like to print off a copy.

  1. Look for attribute problems among your existing files. find mountpoints -xdev -attr +XED -print0 |xargs -0 lsattr -dFiles with the `X’ attribute (shown in earlierversions of lsattr as `*’) are beingaccessed in raw form. This means that de/compression isn’t being done for them. Run e2decompress on the file, just in case someone accidentally wrote to the file in this raw mode. (The `chattr +X’ means of accessing raw data will be removed from a later version of e2compr. It really is a broken interface.)Files with the `E’ attribute may have a compression error. Try running e2decompress on these files, take note of any warning message you see, and if possible check that the file contents are OK.You shouldn’t really see any files with the `D’ attribute unless either those files are being used, or your filesystem is chock full. Do `df’ to check that the filesystem isn’t full, then repeat the find command. If you still have D files, then worry a little….
  2. Save the attributes from all your existing files.This can be done by using the special version of find below, like so: find mountpoints -xdev \\( -type f -o -type d \) \\! -attr ” \-printf ‘=%E\0-m\0%M\0-b\0%B\0%p\0’ |gzip -9 > filename.gz
  3. Do one of the following (in decreasing order of preference, though I suspect increasing order of likelihood):If you have plenty of space on your hard drive (enough that you can decompress everything), do: find mountpoints -xdev \-type f -links 1 -attr +cBEXD -print0 |xargs -0 e2decompress;find mountpoints -xdev \\( -type f -o -type d \) -print0 |xargs -0 chattr -cIf you have a good backup system, then just do a full backup and either reformat your drive (giving you an opportunity to repartition) or just remove sufficient files to enable you to do: find mountpoints -xdev \\( -type f -o -type d \) -print0 |xargs -0 chattr -cand still have room over.People with neither an appropriate backup medium nor sufficient space to do `chattr -c -R /’ can use tar and its –remove-files option.
  4. Once under 0.4, put compressed attributes on all directories (to give you enough space to restore your archived files), like so: find mountpoints -type d -print0 | \xargs -0 chattr +c -m method -b clustersizethen extract all your archived files, then remove all the compressed attributes from the directories, like so: find mountpoints -type d -print0 | \xargs -0 chattr -cthen restore the attributes by doing: xargs -0 -n 6 chattr -V < filename.gz

Here’s the find code:

findutils-e2c_4.1.4-34.4_i386.deb: Debian i386 package (glibc2.1binaries).

e2cfindutils_4.1.4.orig.tar.gz: source (with changes for e2comprbut not Debian).

e2cfindutils_4.1.4-34.4.diff.gz: Debian diffs (frome2cfindutils_4.1.4.orig).

e2cfindutils-4-patch-4.1.gz: e2compr diffs (from standard findutils-4.1). Useful only if you already have the non-e2compr findutils source.

See Installing for instructionsparticular to your distribution (including how to useapt-get if you use Debian).

Return to Main Entrance
e2compr maintainersLast modified: Fri Nov 12 13:07:23 EST 1999