genimage icon indicating copy to clipboard operation
genimage copied to clipboard

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

Open Harvie opened this issue 1 year ago • 5 comments

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 avatar Feb 22 '24 13:02 Harvie

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"
}

Harvie avatar Feb 22 '24 14:02 Harvie

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.

michaelolbrich avatar Feb 23 '24 11:02 michaelolbrich

Are there any downsides to using mke2fs ?

Harvie avatar Feb 23 '24 11:02 Harvie

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.

michaelolbrich avatar Feb 23 '24 17:02 michaelolbrich

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 :-)

Harvie avatar Feb 23 '24 17:02 Harvie