Reiser4 編進kernel
我準備將 partimage/partclone 支援Reiser4的備份
所以需要一個支援Reiser4的環境
過程如下
準備相關工具
> apt-get install build-essential bin86 kernel-packageapt-get install libncurses-dev
取得Kernel Source
> apt-get install linux-sourcecd /usr/src/tar xvf linux-source-[\$VERSION].tar.bz2ln -s linux-source-[\$VERSION] linux
適當的修正 Patch Reiser4 (Reiser4 in vanilla kernel)
> cd /usr/src/linuxwget ftp.namesys.com/pub/reiser4-for-2.6/[\$VERSION]/reiser4-for[\$VERSION*].patch.gzftp://ftp.namesys.com/pub/reiser4-for-2.6/2.6.15/reiser4-for-2.6.15-1.patch.gzgunzip -c reiser4-for[\$VERSION*].patch.gz | patch -p1
調整Kernel / Config
> cd /usr/src/linuxcp /boot/config-[\$VERSION*] .configmake menuconfig for Reiser4
> Please make sure that you have checked in以下這個要選//
////
> [*] Code maturity level options---> Prompt for development and/or incomplete code/drivers
////
> And NOT checked in //以下這個不能選
> [ ] Kernel hacking ---> Use 4Kb for kernel stacks instead of 8Kb
編譯Kernel / Compile > make-kpkg cleanmake-kpkg --initrd --stem linux --revision=Reiser4 kernel_image//這是有做initrd的,如果不需要就把--initrd 拿掉cd ..dpkg -i linux-image-[\$VERSION*].deb
準備開機檔 / Boot
完成安裝後,ubuntu會預設將舊的kernel備份,可以找到vmlinuz.old, initrd.old
妥善保存並確認可以被選擇開機,避免新kernel不work時還有備用的kernel
vi /boot/grub/menu.lst
> ...title=Linuxroot (hdX,X)kernel /vmlinuz root=/dev/hdXXinitrd /initrd.imgboot...
重新開機 / Reboot!
測試Reiser4可以mount
> apt-get install reiser4progsdd if=/dev/zero of=Reiser4.img bs=1M count=512//建立一個512M的Partition imagemodprobe looplosetup /dev/loop0 Reiser4.imgmkfs.reiser4 /dev/loop0mount /dev/loop0 /[\$mount point]//成功後,表示你的kernel 支援reiser4umount [\$mount point]losetup -d /dev/loop0
可以開始寫程式了!
參考資料
ref: NAMESYS
ref: KernelCompileHowto (Ubuntu)
convert from Thomas blog post id 41 old convert log: ./091000/tag%3E2007%2001%20linux)
@2007 @01 @linux
Comments