Is it possible to make ext4 images reproducible even after filesystem operations ?
Bernhard M. Wiedemann
bernhardout at lsmod.de
Fri Jan 17 20:11:36 UTC 2025
On 09/01/2025 06.22, Adithya.Balakumar at toshiba-tsip.com wrote:
> In the project that I am working on, there are some mount operations
> done on the filesystem to copy certain files into the file system. This
> updates the "Last mount" and "Last write" timestamps in the filesystem
> metadata (confirmed this with dumpe2fs) thereby making the images
> generated not reproducible.
> I would like to understand if its possible to make the ext4 images
> reproducible even after filesystem operations like mounting and
> unmounting the filesystem ?
In my
https://build.opensuse.org/projects/home:bmwiedemann:reproducible:distribution:ring1/packages/altimagebuild/files/mkimage.sh
I had the same issue with grub files that needed to be generated within
the mounted block device. I solved it by copying out the modified files
and running another
mkfs.ext2 -F -d $tar ...
to create an all new bit-reproducible VM image.
There are other ways such as libguestfs or
https://github.com/alperakcan/fuse-ext2 that could let you modify
filesystem content the way you want. Could need some patches.
Ciao
Bernhard M.
More information about the rb-general
mailing list