I have installed Linux 3.5 kernel and have compiled e2fsprogs as well. I have my own version of ext3 file system - lets say it is myfs. I have compiled myfs as well. Now I have few questions:

  1. How to insert myfs module and where? When I do modprobe myfs (.ko file) it says module not found. When I simply do insmod myfs.ko it works but I am not sure where is it putting the .ko file. Also the displays I have added (on mkdir call) are not showing up (kernel debug level is also set to 8) when I try to create a directory in mounted folder.

Makefile in myfs directory looks like this:

KERNEL_TREE     ?= /lib/modules/$(shell uname -r)/build
PWD     := $(shell pwd)

obj-m := iext3.o

iext3-objs := balloc.o bitmap.o dir.o file.o fsync.o ialloc.o inode.o \
           ioctl.o namei.o super.o symlink.o hash.o resize.o ext3_jbd.o \
           xattr.o xattr_user.o xattr_trusted.o acl.o xattr_security.o icefs.o \
           transaction.o commit.o recovery.o checkpoint.o revoke.o journal.o

        make -C $(KERNEL_TREE) M=$(PWD) modules

        rm -rf *.o *~ core .depend .*.cmd *.ko *.mod.c .tmp_versions *.markers *.order *.symvers

and I am compiling myfs from my own directory: /home/myname/soft/myfs.

Also, I don't see any ext2/ext3/ext4 directories in /lib/modules/linuxversion/kernel/fs/ -- not sure if this is right or wrong.

  1. Mount is working fine. I can see myfs is mounted on /dev/sda3 by doing df -a. When I unmount It says - umount: /home/..../mnt: not mounted and then if I do df -a the file system is unmounted. This is strange as its unmounting but still throwing error.

Some Background: Directory where I have everything: /home/soft myfs/ mye2fs/ Linux-3.5/ mnt/

Step1: cd Linux-3.5 --> 1) make 2) make modules 3) make modules_install 4) make install 5) reboot

Step2: compile myfs (my version of ext3) and insert the myfs kernel module --> cd myfs/ --> make --> insmod myfs.ko

Step3: compiled mye2fs for mkfs

Step4: use mye2fs to create myfilesystem on a device --> mount --> test printk statements put under myfs modules

  • If you build over kernel tree correctly, have you tried make -C /path/to/kernel modules_install in directory with your module?
    – myaut
    Jun 3, 2015 at 18:48
  • @myaut - I have updated the main question with some background information on what I have done.
    – yguw
    Jun 3, 2015 at 19:08
  • regarding your question about EXT3/4 not ocuring in /var/lib/.., please check using grep EXT3 .config. most probably you have not configured your config file to keep modules as loadable modules. if grep EXT3 .config says CONFIG_EXT3_FS is not set, then you need to configure this filesystem by doing a make menuconfig and selecting ext3 or any other filesystem Aug 15, 2016 at 17:44
  • make menuconfig-> file systems --> ext3 or make menuconfig -> filesystems -> ext4 Aug 15, 2016 at 18:17


You must log in to answer this question.

Browse other questions tagged .