[GTALUG] war story: power failure makes CentOS system unbootable

Lennart Sorensen lsorense at csclub.uwaterloo.ca
Thu Sep 29 19:45:26 EDT 2022


On Thu, Sep 29, 2022 at 06:11:29PM -0400, Lennart Sorensen via talk wrote:
> It seems to correct thing to do is get the kernel fixed.
> 
> https://github.com/torvalds/linux/commit/b88a105802e9aeb6e234e8106659f5d1271081bb
> clearly states that windows only sets the dirty bit on write, yet for
> some reason it was chosen to make linux set it whenever you mount the
> vfat read-write.  That is dumb.  Of course the UEFI firmware that only
> works when the dirty bit is cleared is also dumb, but what can you do
> with firmware developers.
> 
> Obviously these defective UEFI firmwares should ignore the bit but since
> they don't and windows doesn't break them (because it only sets it when
> writing to the filesystem the first time) it would make sense to fix it.
> Of course this means instead of being able to have all the logic do
> this at mount time, there has to be a state kept that is checked whenever
> writes happen to the filesystem and set the bit at that time instead.

Hmm, it's more complicated than that.  vfat supports atime updates,
meaning just reading files from it causes writes.  Lovely.  So much for
a simple fix.

Can you somehow flag it to be mounted read-only and then manually remount
it if you actually have a reason to update it?

-- 
Len Sorensen


More information about the talk mailing list