编译内核使支持reiserfs

思路:编译一个src源码,生成reiserfs的模块,然后家加载到本机的kernel中

rpm -ivh kernel-2.6.18-194.el5.src.rpm
cd /usr/src/redhat/SPECS/ (上一步生成的)
rpmbuild -bp --target=x86_64 kernel-2.6.spec构建rpm包
cd /usr/src/redhat/BUILD/ ; # cd kernel-2.6.18/linux-2.6.18.x86_64/
vi  Makefile
4 EXTRAVERSION = -194.el5      <修改第四行,用uname查看>
make menuconfig
 # 在File systems  ---> Reiserfs support  (把reiserfs编译进模块)
make prepare
make modules_prepare
make M=fs/reiserfs
mkdir -p /lib/modules/2.6.18-194.el5/kernel/fs/reiserfs
cp /usr/src/redhat/BUILD/kernel-2.6.18/linux-2.6.18.x86_64/fs/reiserfs/reiserfs.ko  /lib/modules/2.6.18-194.el5/kernel/fs/reiserfs
cd /lib/modules/2.6.18-194.el5/
rm -rf modules.*
depmod -a
modprobe reiserfs   #(开机自动挂载reiserfs模块)
lsmod | grep reiserfs
reiserfs              230656  0

格式化:

mkreiserfs /dev/sdc1
……. Continue (y/n):y     <输入y>
mount -t reiserfs /dev/sdb /data2