If you see a message like this in your logs:
ext4 filesystem being mounted at /boot supports timestamps until 2038 (0x7fffffff)
it's an indication that your filesystem is not Y2k38-safe.
You can also check this manually using:
$ tune2fs -l /dev/sda1 | grep "Inode size:"
Inode size: 128
where an inode size of 128 is insufficient beyond 2038 and an inode size
of 256 is what you want.
The safest way to change this is to copy the contents of your partition to another ext4
partition:
cp -a /boot /mnt/backup/
and then reformat with the correct inode size:
umount /boot
mkfs.ext4 -I 256 /dev/sda1
before copying everything back:
mount /boot
cp -a /mnt/backup/boot/* /boot/
e2fsck -f /dev/sda1 tune2fs -I 256 /dev/sda1
That'll work just fine on
ext2andext3but fails onext4filesystem with theflex_bgfeature enabled:Also, that flag cannot be cleared:
So, unless I'm missing something, there's no two ways about it and, as per the post, copy->mkfs->copy is the only way to fix it.
BTW, the same issue will affect XFS and, potentially, other filesystems.