[lug] Reiserfs + stock kernel?

Tkil tkil at scrye.com
Thu Jan 18 18:51:25 MST 2001


>>>>> "John" == John Karns <jkarns at csd.net> writes:

John> Two or three months ago I took a look at the reiserfs web site
John> in an effort to find the kernel patches necessary to implement
John> the file system.  I found some patch files, but it wasn't clear
John> to me weather they were kernel patches.  They looked a little
John> more like patches to the reiserfs source.  I briefly looked for
John> some implementation info, but didn't see any.  Can anyone shed
John> some light on this?

the files available for download from the ReiserFS site are patches
that you apply to the kernel source, just as you would apply any other
kernel patch, e.g. one of Alan Cox's -ac series.

i've been running reiserfs on my box with a stock 2.2.17 and 2.2.18
kernels.  (well, ok, the 2.2.18 kernel also got a slight modification
to its USB subsystem...)  the patch for 2.2.17 required one trivial
tweak to apply to 2.2.18, but i would imagine that there is a 2.2.18
patch by now.

so, to get a kernel that can do reiserfs:

1. download the stock kernel tar.bz2 file:

      http://www.us.kernel.org/pub/linux/kernel/v2.2/linux-2.2.18.tar.bz2

   if you have KRUD for 2001-01, Kevin usually includes the latest
   kernel sources on it somewhere, so you might save yourself the 15MB
   download.

2. download the latest reiserfs package.  one mirror that worked well
   for me just now was:

      http://www.getrewted.net/ftp.tux.org/reiserfs-for-2.2/linux-2.2.18-reiserfs-3.5.29-patch.gz

   this is currently about 300kB

3. unpack the kernel and add in the reiserfs patch:

      mkdir tmp
      cd tmp
      bzip2 -dc linux-2.2.18.tar.bz2 | tar xf -
      gzip -dc linux-2.2.18-reiserfs-3.5.29-patch.gz | patch
      mv linux linux-2.2.18-rfs

and there you go.  the naming conventions are just the ones i use;
they're not required at all.  you can now do the usual

      cd linux-2.2.18-rfs
      perl -i~ -ple 's/^EXTRAVERSION\s*=\s*$/$& -rfs-1/' Makefile
      make xconfig   # i built ReiserFS as a module...
      make dep
      make bzImage modules modules_install
      cp System.map /boot/System.map-2.2.18-rfs-1
      cp arch/i386/boot/bzImage /boot/bzImage-2.2.18-rfs-1
      vi /etc/lilo   # add as you like, i used "2.2.18-rfs-1" for label
      lilo

you will need to build the reiserfs utiliies.  the patch install them
in $KERNEL_SRC_TOP/fs/reiserfs/utils; so, continuing on from above:

      cd fs/reiserfs/utils
      make install

this builds the utilities, then copies them to /sbin (which is where
you want them, so you can do as much as possible with only your root
partition mounted.)

you might be able to build a reiserfs partition on a non-reiserfs
kernel, but you won't be able to mount it, so you might as well reboot
now.  :)

hope this helps,
t.




More information about the LUG mailing list