Ubuntu-boot volume using ext4, with u-boot and metadata_csum


I have a feeling I already know the answer to this, but I thought it worth posting here for a sense check, and maybe it will help someone else too.

We have a gadget snap for a IMX8 board, using u-boot. version is UC20, and a custom kernel snap.

Kernel upgrade of a running device was not working, it would end up in an infinite reboot loop. and I’ve realised it’s because u-boot can’t update the boot.sel file.

Unsupported feature metadata_csum found, not writing.
** Error ext4fs_write() **
** Unable to write file /uboot/ubuntu/boot.sel **

As you can see from that, we are using ext4 for the ubuntu-boot volume. Unless I’m missing something, googling around it seems that u-boot doesn’t not like writing to ext4 volumes with metadata checksum enabled. Please correct me if that’s not right.

If that is the case, then our choice is either to somehow not enable the metadata checksum, or use vfat instead.

My natural instinct was to use ext, because it should be more robust in theory, but perhaps that’s not true and I’m chasing something that doesn’t’ really make much difference.

There doesn’t seem to be a way to specify any fs options in the gadget volume config. So it looks like my only option is to use vfat. In the end, I’m sure that’s basically the way to go, but looking for some extra validation here in case I’m missing something obvious. Any other options ?

If all the above is true, then using vfat on the ubuntu-boot is a pre-requisite when using u-boot. If that’s the case, should that be documented somewhere ? Or, even raise an error in ubuntu-image ?


Cheers, Just

well, you could rip out:


but that surely comes at a risk …

(you might also want to file a snapd wishlist bug to add support to the gadget to turn metadata csums off at FS creation) but yeah, today this combo is not possible …

Thanks for confirming @ogra :+1:

Cheers, Just