Filesystems like ext4 are block-aligned, meaning files are aligned to blocks of a predefined size, typically 4 KB in the case of ext4. If an .img file is created from such a filesystem, can I assume that the individual files are 4k aligned in the created .img file, just like they are in the real filesystem?
In other words, say we have two 1 KB files called foo and bar, which appear on the physical drive as below, with each [] representing 1 KB.
[foo][][][][bar][][][]
In this case, foo and bar are 4k aligned. Now, if we create an .img file for this filesystem, are the contents of foo and bar still 4k aligned from the start bit of the img file?