简体   繁体   English

如何在没有数据块的情况下制作ext2 / 3 FS

[英]how to make an ext2/3 FS without datablock

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. 需要:制作一个没有数据块的ext2 / 3文件系统,仅保留另一部分,保存文件或目录的属性,并丢弃其中的数据。 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. 我从http://e2fsprogs.sourceforge.net/下载了e2fsprogs-1.42.11.tar.gz,现在遇到了一些问题。

Ubuntu 14.04 with kernel 3.13.0-32-generic 内核为3.13.0-32-generic的Ubuntu 14.04

  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 by mke2fs.o'. Stop." 在e2fsprogs-1.42.11中执行“ ./configure”后,我在杂项文件夹中执行了“ make”,但被“ make:***”打断了。***没有规则可以使目标../lib/ext2fs/ext2_err.h', needed by mke2fs.o ../lib/ext2fs/ext2_err.h', needed by 。停止。” 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. 文件“ mk2fs.c”使我迷惑不解,有人可以告诉我我做对的事以及如何做。

Any help will be appreciated and than you guys in advance! 任何帮助将不胜感激,比你们提前!

first you need some background about VFS and filesystems in general to read the source code. 首先,您通常需要一些有关VFS和文件系统的背景知识才能阅读源代码。 after that, you need to modify filesystem structure not mk2fs. 之后,您需要修改文件系统结构而不是mk2fs。 mk2fs creates filesystems according to their defined structures. mk2fs根据定义的结构创建文件系统。 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. 如果要更改超级块,inode等,则需要修改lib / ext2fs / ext2fs.h标头...但是我认为您需要修改ext2 / 3内核驱动程序。 or better, (make your own filesystem driver module) not the structure of filesystem itself. 或更好的方法(使您自己创建文件系统驱动程序模块)而不是文件系统本身的结构。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM