pengutronix / genimage

tool to generate multiple filesystem and flash images from a tree
GNU General Public License v2.0
298 stars 107 forks source link

ext4 filesystem being remounted at / supports timestamps until 2038 (0x7fffffff) #238

Open Harvie opened 5 months ago

Harvie commented 5 months ago

Hello, ext4 filesystem created by genimage does not seem to be Y2K38 ready :-) when i mount it on debian, it says following:

ext4 filesystem being remounted at / supports timestamps until 2038 (0x7fffffff)

not sure about other filesystems supported by genimage.

Harvie commented 5 months ago

It's weird, because mke2fs is called with -I 256 argument in image-ext2.c, which should enable support for higher dates... i don't get it.

using following config:

image part-rootfs.ext4.img {
  ext4 {
    label = "ROOT_FS"
  }
  size = 2630M
  srcpath = "./rootfs"
}
michaelolbrich commented 5 months ago

You need to add use-mke2fs = true to the ext4 section. Otherwise genext2fs is used and not mke2fs.

I've been reluctant to change the default here, but maybe it's time to do that.

Harvie commented 5 months ago

Are there any downsides to using mke2fs ?

michaelolbrich commented 5 months ago

The images created by genext2fs can be slightly smaller, because it tries to compact things as much as possible.

It's mostly historical. When ext images in genimage where first implemented, mke2fs did not support adding content to the created filesystem, so it could not be used.

I recommend using mke2fs for everything unless you have a really good reason not to.

Harvie commented 5 months ago

images created by genext2fs can be slightly smaller

i guess that explains the 128b inodes :-)

I recommend using mke2fs for everything unless you have a really good reason not to.

sounds like a good candidate to be used by default :-)