On Mi, 21.12.22 12:12, Demi Marie Obenour (demiobenour(a)gmail.com)
wrote:
>> At least for the systemd stuff, we carefully made sure that our access
>> patterns to the ESP both from sd-boot/sd-stub and from userspace are
>> by default as minimal and robust as we can make them, to minimize
>> chance of corruption, given that vfat is not particularly good with
>> that. (i.e. we sync a lot, and the whole ESP mount is by default an
>> autofs instance with an extremely short idle timeout so that it
>> basically remains unmounted — and thus — clean during almost all
>> times).
>>
>> Anyway, if you want to know more about choice of the fs for /boot/,
>> see my ideas here:
>>
>>
https://0pointer.net/blog/linux-boot-partitions.html
>>
>> Lennart
>
> Does vfat support atomic rename? Is it possible to atomically upgrade
> a bootloader/UKI/etc?
Depends on the fs driver. But yeah, the filename is stored at exactly
one place, and hence typically a single-sector update is
possible. (well, within bounds: for example if you rename a file from
a short filename to a long one, fs driver might need to allocate a
bunch of separate long file name dir entries, which might then span
multiple sectors)
Lennart
Under what circumstances do the Linux kernel driver and the firmware
driver actually make such guarantees? For instance, is renaming a file
with a longer name to a shorter name (and replacing the old one) atomic?
--
Sincerely,
Demi Marie Obenour (she/her/hers)