Reputation: 51
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?
Upvotes: 0
Views: 3838
Reputation: 13065
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.
Upvotes: 1