Reiser4 is the "new" (circa 2004) successor filesystem for ReiserFS, developed from scratch by Namesys and Hans Reiser (the site has been dead since 2008). It is very efficient for handling small files (often used in Template:Filename for this purpose) and includes features such as cheap transparent compression and block suballocation. Because it is an atomic file system "your file system operations either entirely occur, or they entirely don't, and they don't corrupt due to half occurring." Benchmarks with other linux filesystems are also available.
- Reiser4 requires a patched kernel
- If you're still using a 2.4 kernel, note that Reiser4 is developed for the 2.6 kernel and is not backported
- Reiser4 consumes a little more CPU than other filesystems
- Reiser4 is still not considered a stable release.
- One empty partition for the new Reiser4 system
- One small (12 - 200 MB) non-Reiser4 partition, such as ext2 for /boot
- gparted is probably a necessity for resizing unless you want to use parted from the command line. Install to your Arch install, or just get the [ http://gparted.sourceforge.net/livecd.php LiveCD].
- A Reiser4 enabled LiveCD. Only a few are still in existance for some reason:
I highly reccomend the PLD RescueCD, as it seems to be one of the few in existance that still have working Reiser4 support. You will probably need Gparted's livecd as mentioned above too.
2. You'll need a reiser4 patched kernel. Unfortunately, it has yet not been ported into 3.0 kernel. You can check out here for the progress: http://www.kernel.org/pub/linux/kernel/people/edward/reiser4/
a) Reccomended: make a small (as mentioned above, 20-200mb) partition for /boot with a filesystem other than Reiser4 with gparted, and then copy your /boot folder to the partition. Update the menu.lst accordingly, making a new entry for your Reiser4 partition.
b) lilo is reccomended if you with to put everything including /boot on a Reiser4 partition. This is not advised, as you'll get an error when trying to update lilo.conf.
c) If you wish to use grub with /boot residing on a Reiser4 partition, the grub package should be rebuilt applying the reiser4 patch. This site has a great guide, however I (ilikenwf) have tried this but failed.
Install and reboot
You'll have to install the new packages, and update your kernel and your bootloader. Before updating it's recommended a good practice to backup Template:Filename and to first make sure it all works.
Remember to run lilo as root if you choose it as bootloader.
Moving to Reiser4
In the next steps we'll copy the data from your current root partition to the new Reiser4 partitions. Make sure you have enough disk space on the Reiser4 partition. You can check this disk information with df.
* /dev/sda1: (10 Gb, 5 Gb free); Reiserfs /mnt/reiser4 * /dev/sda2: (10 Gb, 10 Gb free); Reiser4 / * /dev/sda3: (200 Mb, 180 Mb free); ext2 /boot
Run the following commands:
mkfs.reiser4 /dev/sda1 mkdir /mnt/reiser4 mount -t reiser4 /dev/sda1 /mnt/reiser4
It is recommended that you use the amazing Cryptcompress plugin by formatting with the following command:
mkfs.reiser4 -o create=ccreg40,compress=lzo1 /dev/hda1
Once the partition is formated, copy you current system to the new partition and create the system directories. You may either do this from Arch Linux, or to make it easier (so that you don't have to use makedev later), just boot up with the PLD Rescue CD and mount both your new Reiser4 partition and your current root partition. Then, just copy everything over (as root) like so:
cd /mnt mkdir oldroot mkdir reiser4 mount /dev/sda1 oldroot mount /dev/sda2 reiser4 (the Reiser4 partition) cp -R -a /mnt/oldroot/* /mnt/reiser4/
Then, you need to mount your /boot partition, and if you haven't already, copy /boot from your original root partition over to it. Note that it is suggested you remove /boot from your new Reiser4 partition and then make an empty folder called boot in the root of the partition to use as a mountpoint for it, which is reflected later in your fstab.
mkdir bootpart mount /dev/sda3 bootpart cp -R -a /mnt/oldroot/boot/* /mnt/bootpart/
Don't forget to edit your bootloader's config appropriately (see examples at the bottom of the article). Should you upgrade grub, note that before rebooting you may need to manually install grub to your /boot partition, otherwise, things may break and prevent you from booting, in which case using a livecd to chroot and fix it would be your last hope.
Note: If Reiser4 works out well for you, I'd (at least in the sample system) format the old root partition once everything is confirmed working with a stable fs and use it for storage.
# # /etc/fstab: static file system information # # <file system> <dir> <type> <options> <dump> <pass> none /dev/pts devpts defaults 0 0 none /dev/shm tmpfs defaults 0 0 tmpfs /tmp tmpfs defaults 0 0 usbfs /proc/bus/usb usbfs defaults 0 0 /dev/cdroms/cdrom0 /mnt/cd iso9660 ro,user,noauto,unhide 0 0 /dev/cdroms/cdrom0 /mnt/dvd udf ro,user,noauto,unhide 0 0 /dev/sda1 reiser4 defaults,noatime,nodiratime,notail 0 1 /dev/sda2 /mnt/storage ext3 defaults 0 0 /dev/sda3 /storage ext2 defaults 0 1
(on ext2 /boot partition, mind you)
color light-blue/black light-cyan/blue timeout 0 default 0 # (0) Arch Linux title Arch Linux root (hd0,1) '''# You will have to change this to appopriately point to your /boot partion''' kernel /boot/vmlinuz26zen '''root=/dev/sdaX''' ro noatime nodiratime notail acl init=/sbin/bootchartd initrd /boot/kernel26zen.img # (1) Arch Linux title Arch Linux Fallback root (hd0,1) '''# You will have to change this to appopriately point to your /boot partion''' kernel /boot/vmlinuz26 '''root=/dev/sdaX''' ro initrd /boot/kernel26.img # (1) Windoze #title Windows #rootnoverify (hd0,1) '''# You will have to change this to appopriately point to your /boot partion''' #makeactive #chainloader +1
# # /etc/lilo.conf # boot=/dev/hda # This line often fixes L40 errors on bootup # disk=/dev/hda bios=0x80 default=Arch4 timeout=20 lba32 prompt compact image=/boot/vmlinuz26beyond label=Arch4 root=/dev/hda5 append="video=vesafb:1024x768-24@56,ywrap,mtrr splash=verbose,theme:darch console=tty1 resume2=swap:/dev/hdb1" initrd=/boot/initramfs-beyond.img read-only image=/boot/vmlinuz26beyond label=Arch root=/dev/hda3 append="video=vesafb:1024x768-24@56,ywrap,mtrr splash=verbose,theme:darch console=tty1 resume2=swap:/dev/hdb1" initrd=/boot/initramfs-beyond.img read-only
Run lilo to install new kernels.
You are hopefully done now, you can reboot your system and try to run the 'new' reiser4 installation. If you plan to format /dev/sda3, make sure you run lilo or grub from the new system and configure them like above.
- Permissions: chown -R username.group <userdir>
- If you have problem with "su" command after the change of fs, you should reinstall coreutils package.
- The first time you start the new system, no modules are loaded:
- Run hwdetect --load-modules
- Restart some daemons from /etc/rc.d
- Everything works fine now and the next time you reboot.
- Reiser4 from Wikipedia.org
Special thanks to Itlain for this article.