Setting up a reiserfs4 partition and setting up your whole Linux system on reiser 4.
If your distribution doesn’t support installing to reiserfs4 but you want to be running the fastest file system, this is how.
This tutorial was made while setting up reiserfs4 on a slackware 10.1 box with Linux kernel 2.6.11 and mm patch 2.6.11-mm4.
Step 1. Go to kernel.org and download the kernel of your desire. For this tutorial I used 2.6.11. Also download the mm patch for your kernel.
Next untar the kernel to your /usr/src/ directory.
Example:
cd /usr/src/
tar xzvf linux-2.6.11.tar
Step 2. patch your kernel with the mm patch.
Example:
cd linux-2.6.11
patch -p < /<locattion of patch>/2.6.11-mm4
If you want to setup the kernel options from scratch go to Step 3B, if that scares you go to step 3A
Step 3A
Copy .config from your current kernel and run "make menuconfig".
Example:
cp /usr/src/linx/.config /usr/src/linux-2.6.11/
make menuconfig
Make sure to put a star in
Code maturity level options---> Prompt for development and/or incomplete code/drivers
File Systems--->reiserfs4 support
And turn off
Kernel hacking ---> Use 4Kb for kernel stacks instead of 8Kb
Step 3B type:
make menuconfig
Put a star in:
Code maturity level options---> Prompt for development and/or incomplete code/drivers
File Systems--->reiserfs4 support
And turn off
Kernel hacking ---> Use 4Kb for kernel stacks instead of 8Kb
And setup your kernel options.
Step 4
Some people will compile their kernel over the old one. I never do incase something goes wrong. I use lilo so I have my old kernel and the new on in my boot menu.
Example of compile:
make
<Wait a while>
make modules
<Wait>
make modules_install
<Wait>
make bzImage
<Wait>
cp arch/i386/boot/bzImage /boot/2.6.11 (or whatever you want to call it)
Step 5
Edit lilo (i don’t use grub so you’ll have to look that up on your own if that’s what you use)
vi /etc/lilo.conf
Add this to the lilo.conf file:
image=/boot/2.6.11 #(or whatever you called it in step 4)
label=linux_2.6.11 #(or whatever you want to call the label)
root=/dev/hda1 #(or whatever you partition is)
read-only
Then run lilo from the command prompt.
Step 6. Reboot
Reboot your computer.
Example:
init 6
Step 7. Select your new kernel in the lilo menu and see if it boots properly.
Hopefully all went well. You can expect some driver not to work at this point like alsa or nvidia drivers.
This time would be a good time to correct that. if you are having problems with alsa, try running alsaconf and see if it sees your sound card and adds it to your modules.conf, if it doesn’t see your card try reinstalling the driver from the alsa site. For nvidia just download the newest driver from their site. You can use links
Example:
links nvidia.com
Step 8. Assuming all went well and you've got your machine back to the way you like it. Get reiser4progs and libaal from ftp://ftp.namesys.com/pub/reiser4progs/
Example:
wget ftp://ftp.namesys.com/pub/reiser4progs/libaal-1.0.4.tar.gz
wget ftp://ftp.namesys.com/pub/reiser4progs/re...gs-1.0.4.tar.gz
Step 9. Compile liball and reiser4progs
Example:
tar -xzvf libaal-1.0.4.tar.gz
tar -xzvf reiser4progs-1.0.4.tar.gz
cd ibaal-1.0.4
./configure
make
make install
cd ../reiser4progs-1.0.4
./configure
make
make install
Step 10. Assuming all went well you should now have a kernel that supports reiserfs 4 and the progs
To make a seperate partition with reiserfs4 got to Step 11, to setup the whole file system on reiser 4 go to step 12.
Step 11. Make a reiserfs 4 partition
First if there is anything in the partition you want to be reiser 4 then move it. The partition will be formatted and all data gone.
Example:
mkfs.reiser4 /dev/<partition>
After that is done you have a reiserfs 4 partition.
Step 12, getting the whole system on reiserfs 4 (boot CD and spare partition with enough room for you root partition needed.)
First get a boot CD that can support reiser 4 (Yopper OS CD works great.)
Boot to the cd
When you have a command prompt. Make two directories to mount your partitions to
Example:
mkdir old
mkdir new
Mount the file system partion and the backup partition
Example:
mount /dev/hda1 old (may need to pass a -t and filesystem type and change /dev/hda1 to whatever your partition may be)
mount /dev/hda2 new (may need to pass a -t and filesystem type and change /dev/hda2 to whatever your partition may be)
Copy your file system to the backup partition.
Example:
cp -R old new/
<Wait a really long time>
If it all went good the we can make the new reiserfs 4 partition
umount the filesystem partition
Example:
umount old
Make the new filesystem
Example:
mkfs.reiser4 /dev/hda1
After that remount the partition
Example:
mount /dev/hda1 old ( may need to use mount -t reiser4 old)
Copy the data from the backup to your new reiser 4 partition
Example:
cp -R new/old/* old/
<wait a long time>
Now you have your new file system and all your files on it we need to make a few changes
chroot into the new partition
Example:
chroot old
Edit your fstab and mtab
Example:
vi /etc/fstab
Put reiser4 in as the type for any partitions you changed to reiser 4
vi /etc/mtab
Do the same thing
Now while still chrooted run lilo on the command line.
Lastly reboot and make sure everything went well. Your done.