On Fri, Feb 17, 2023 at 08:51:33AM -0800, Russ Allbery wrote: > Adrian Bunk <b...@debian.org> writes: > > > The image creators could just set the features they enable to what they > > copied from /etc/mke2fs.conf from the target distribution, a label with > > a timestamp wouldn'tbring much benefit here. > > That's a very good point and I'm embarrassed it wasn't immediately obvious > to me. Sorry about the noise.
One other thing I woud add here is (a) this whole discussion of mke2fs.conf only helps for ext4, and the general problem is something that extends to all file system. The immediate question may be ext4 specific, but as I mentioned earlier, XFS is enabling the "bigtime" feature for the first time in Bookworm. So enabling what may be convenient, but ultimately an anti-pattern is something that hopefully in the long-term Debian should be striving towards. Yes, it's annoying and and extra work. So is using build chroots if we are building packages for a older Distro versions. But it's the right thing to do. Secondly, (b) there may be a misapprehension that it is possible to get an identical file system just by controlling the contents of mke2fs and/or specifying the file system features on the command line. While this is mostly true, it is not the whole story. For example, the size and location of the journal is determined hueristically, and in the past, this has changed as we have discovered that (for example) making the default journal size larger would result in better performance. The location of the journal has also changed from the beginning of storage device (low-numbered LBA's) to the middle of the device. So just as a binary compiled using the default gcc on Buster might be different from a binary build using Sid, even if you you force the use of older glibc shared libraries at link time or use -static to statically link with the glibc installed in your random desktop environment, the results from using mke2fs on Debian N may be different from using mke2fs on Debian M, even if you control for thea file system features. (And other things which _are_ controllable on mke2fs.conf, but which go beyond mke file system features. For example, in Bookworm starting with e2fsprogs 1.46.4, the default inode size is forced to always be 256 bytes, even for small file systems. This was not true in Buster and older Debian distributions.) So if you want a bootable image that is identical to what would be created by using the Buster or Bullseye debian-interaller, you *really* want to use the mkfs that was supplied by Buster or Bullseye, and that means running the mkfs from a chroot. Best regards, - Ted