简体   繁体   中英

read data from ext4 filesystem directly from the raw partition without mounting the file system

Is it possible to add data of fixed size to an ext4 image such that its available at the last block of the partition (or say last 100KB)? I want to be able to to add data to the ext4 image such that I can read the data from the corresponding raw partition without any knowledge of the filesystem.

Is this possible?

You could build what you want using e2fslibs in e2fsprogs . That library gives you low-level access to reading the filesystem metadata.

First pass, you could dump all the metadata about "blocks in use" to see if those last 100K of blocks are in use or not. If not, just write over them.

您可以使用e2image实用程序来转储或还原元数据

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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