how to make an ext2/3 FS without datablock

91 views Asked by At

Needs: make an ext2/3 File System without datablock, just keep the other part, save the attribute of file or directory and discard the data of them. When write it, just return and when read it, just return all zero. I download e2fsprogs-1.42.11.tar.gz from http://e2fsprogs.sourceforge.net/ , now I have some problem.

Ubuntu 14.04 with kernel 3.13.0-32-generic

  1. After I execute "./configure" in the e2fsprogs-1.42.11, I execute "make" in folder misc but it was interrupted with "make: *** No rule to make target ../lib/ext2fs/ext2_err.h', needed bymke2fs.o'. Stop." Help!!!

  2. First I want find the code that format the partition where I can change it to discard datablock. The file "mk2fs.c" confuesd me, could someone tell me whether what I do is right or not and how to do it.

Any help will be appreciated and than you guys in advance!

1

There are 1 answers

0
Amir H On

first you need some background about VFS and filesystems in general to read the source code. after that, you need to modify filesystem structure not mk2fs. mk2fs creates filesystems according to their defined structures. for example. you need to modify lib/ext2fs/ext2fs.h header if you want to change superblock, inode etc... but I think you need to modify ext2/3 kernel driver. or better, (make your own filesystem driver module) not the structure of filesystem itself.