The idea was to do a minimal install onto a small ext3 partition, then copy it over onto a Reiser4 partition. To do this, I needed a Reiser4-enabled kernel, and a Reiser4-enabled install CD. Unfortunately, you can’t resize a Reiser4 partition, so when we’re done, we’ll be left with a relatively small, empty ext3 partition. That’s ok, because I’ll just use it as a storage partition.
I’m pretty sure you can use any Reiser4-enabled install CD, but the one I used was the Conrad LiveCD (for Gentoo), which you get can get here:
http://www.elfenbeinturm.cc/download/
First, I partitioned my hard drive. I have a 40 GB hard disk, so I partitioned it as follows:
hda1 (primary partition) 30MB ext3 (for /boot)
hda2 (primary partition) 512MB swap
hda3 (primary partition) about 30 GB (will be for the Reiser4 partition, so not yet formatted). Mark it as “don’t use this partition” in the Debian installer.
hda4 (primary partition) about 5 GB ext3 (for / )
Install Debian onto hda4, and boot into the supplied kernel (I think it’s the 2.6.8 kernel that comes with debian).
Install bzip2:
- Code: Select all
# apt-get install bzip2
Install lynx (a text-based web browser) and download:
Download linux-2.6.20.tar.bz2 from http://www.kernel.org/pub/linux/kernel/v2.6/
Download 2.6.20-mm2.bz2 from http://kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.18/2.6.18-mm3/
Move these two files to /usr/src, cd to /usr/src, and unpack both the files. Make a symbolic link to the resulting linux-2.6.18 directory:
- Code: Select all
# ln –sf linux-2.6.20/ linux/
Move the patch to the linux/ subdirectory:
- Code: Select all
# mv 2.6.20-mm2 ./linux/
Now, patch the kernel:
- Code: Select all
# cd ./linux/
# patch -p1 < 2.6.20-mm2
Install all the tools necessary to compile a kernel:
- Code: Select all
# apt-get install kernel-package libncurses5-dev fakeroot wget gcc udev
Configure your kernel to your liking (I won’t go into detail on how to do that, other than to remind you that you must select Reiser4 support from filesystems, and make sure it’s compiled into the kernel).
Copy the kernel into /boot:
- Code: Select all
# cp arch/i386/boot/bzImage /boot/kernel-2.6.20
Modify grub so that this new kernel option is added, by modifying /boot/grub/menu.lst
Now reboot into this new, Reiser4-enabled kernel, just to make sure it works. I’d keep the old kernel around just in case of problems with your new kernel.
Download the Reiser4 tools:
- Code: Select all
# apt-get install reiser4progs
Prepare the Reiser4 partition:
- Code: Select all
# mkfs.reiser4 /dev/hda3
Now, reboot into the Reiser4-enabled CD. When you get to the command prompt, copy the old filesystem into the new one:
- Code: Select all
# mkdir /mnt/hda4
# mount –t ext3 /dev/hda4 /mnt/hda4
# mkdir /mnt/hda3
# mount –t reiser4 /dev/hda3 /mnt/hda3
# cp –a /mnt/hda4/* /mnt/hda3
# mkdir /mnt/boot
# mount –t ext3 /dev/hda1 /mnt/boot
Modify fstab in the new partition (/mnt/hda3/etc/fstab) so that / is now mounted onto /dev/hda3, and the reiser4 filesystem is used (rather than the old ext3 system).
Modify menu.lst (/mnt/hda1/boot/grub/menu.lst) so that the root partition now points to /dev/hda3.
Hold your breath and reboot. If all goes well, you’re now running Debian on Reiser4!
You could then delete everything on /dev/hda4, and perhaps mount it on a new mount point (I used /mnt/storage).
Hope this is helpful!