Pick a Free OS

User login


Racing to ReiserFS on Red Hat

Do a "make menuconfig". First thing to do is select the option "Prompt for development and/or incomplete code/drivers" under "Code maturity level options" else, ReiserFS will not be visible. Then go down to "File Systems" and compile in support for ReiserFS. If you're not interested in putting your root on ReiserFS, you can get away with compiling it in as a module. We'll be doing a root-on-reiserfs later in this article and you need to compile in support for that.

Compile the kernel and modules.

Note: If you're on Red Hat 7, first edit the Makefile and replace all instances of "gcc" with "kgcc". You will also need to install the kgcc package off your installation cdrom. This step is a must do or you will keep getting kernel panics. Gcc 2.96, which is included in Red Hat, is very buggy. All stock kernel compiles should be done using kgcc. Only Red Hat kernels will compile with gcc.

Now it's time to compile the ReiserFS utilities. The utilities are place in the directory /usr/src/linux/fs/reiserfs/utils. Do a "make" followed by a "make install" to install the programs. The utilities are not included in the 2.4 kernels and are a separate download. Get the package from this location.

Un-tar the file.

# tar zxvf reiserfsprogs-3.x.0j.tar.gz

# cd reiserfsprogs-3.x.0j

# ./configure

# make

# make install

Unfortunately, there is no "ext2toreiserfs" utility to make our lives easier. So the basic procedure for converting root (/) from ext2 to reiserfs becomes the following three-step procedure.

1. Create a new partition and format it with ReiserFS.

2. Copy data from old partition.

3. Mount new partition as root (/).

Create a new partition. ReiserFS does not require a special partition type. Use 83 (Linux).

# fdisk -l /dev/hda

/dev/hda9 2872 3126 2048256 83 Linux

/dev/hda10 3127 3381 2048256 83 Linux

Now create a ReiserFS filesystem on the new partition.

# mkreiserfs /dev/hda10

Mount the new partition

# mount -t reiserfs /dev/hda10 /mnt/hda10

Copy the data onto the new partition.

# cd /mnt/hda10

# tar cvlf - / | tar xf -

Edit fstab to point to the new root

/dev/hda10 / reiserfs defaults 1 1

Create a symlink to reiserfsck because the Red Hat boot looks for fsck.reiserfs.

# ln -s /sbin/reiserfsck /sbin/fsck.reiserfs