I'm using the image builder for 21.02.0-rc1, specifically the one targeting bcm2709.
When I flash an install image, the resulting system image references an overlay filesystem (an ext4), the superblock of which is beyond the end of the install image itself. Therefore, flashing an install image may leave files from a previous overlay filesystem in place. This is counterintuitive, because I expected that flashing the install image would leave the OS in a well-defined state.
As a workaround, I've been appending 64KB of zeroes to the end of the install image, which seems to fix the problem.
Build an image, flash it, boot it
Create files in the overlay filesystem
Remove card and reflash; files in the overlay filesystem remain
Thanks for your time!
The text was updated successfully, but these errors were encountered:
What I said about the superblock is at best informed speculation :-) What I'm seeing is that the squashfs image (decompressed) is only 80881906 bytes long, but the total length of the partition table is 360447 sectors, i.e., 184548864 bytes. So there's data referenced in the partitions that is not overwritten by a factory flash. My belief is that the ext4 superblock of /overlay/upper is in this area.