Go to the first, previous, next, last section, table of contents.
Minimum things to download to start with: e2fsprogs, the appropriate kernel patch, and this user manual. (At a bare minimum, you need to read the section Quickstart page.)
In brief:
CONFIG_EXPERIMENTAL
, `y' (or `m') to the ext2
filesystem, and `y' to ext2 compression.
The remainder of this appendix goes into more detail on the above steps. Note that what follows may be out of date in a few places.
This section is organised into 3 parts: how to build a new kernel; how to build and install the utilities; how to update e2fsck.
The e2compr version of e2fsprogs can be found in the SourceForge download area.
The instructions for building e2fsprogs from source follow, for those for whom no prebuilt binaries are available on the web site.
Assuming you don't already have the full source code to standard e2fsprogs-1.14, get `e2fsprogs-e2c-1.14.6.tar.gz' (or whatever the current 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:
E2compr is a patch against the ext2 fs code. You just have to
apply 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 correct permissions for everything (e.g. by running the commands as root), and that you are in the directory that was created after extracting the e2compr archive (i.e. the directory where you find this file).
i_reserved2[]
fields (which
hold 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-quote before `grep' and after `-f2' are included.) If there are any compressed files, then try to find why, and to turn it off (e.g. by doing
chattr -c
).
$ 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 may mean that there are existing problems in your kernel source tree.
# gzip -cd patch-file | patch -d /usr/src/linux -p1Note: if you have a previous version installed, you will first need either to uninstall that one with
gzip -cd
old-patch-file | patch -d /usr/src/linux -R
-p1
, or else to start with a clean kernel source
tree.
$ find /usr/src/linux/. -path '*.rej' -printIf this command displays any file names, the patch has not been correctly applied. (Probably you don't have a clean kernel source tree or you have the wrong kernel version.) Either try to get a matching clean source tree and e2compr patch and start again, or look at the .rej files and try to patch manually. If neither of these is practical then you can cancel the effect of applying the patch at step 3 with the command
gzip -cd patch-file | patch -R -d
/usr/src/linux -p1
.
patch
, and optional with older
patch
versions.)
$ find /usr/src/linux/. -path '*.orig' -exec rm {} \;
$ cd /usr/src/linux $ make config or $ make oldconfig or $ make menuconfig or $ make xconfigSee `/usr/src/linux/README' if you don't know which
*config
you 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 to
your kernel log.
$ cd /usr/src/linux $ make clean; make dep
$ cd /usr/src/linux # make zlilo or $ make zImage or # make zdisk or whatever you usually do when rebuilding your kernel.
# shutdown -r now (or however you usually do it)
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 following instructions.
To build everything from source, you will need to have the source for e2fsprogs, which should be available for ftp from ftp.ibp.fr and tsx-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 and chattr, in case you want to de-install the patch. (Myself I wouldn't bother, because the new ones should work fine on an unpatched system.)
Go to the first, previous, next, last section, table of contents.