Use of NVRAM for storing variables is discouraged because it wears flash storage. On the other hand, writes to the filesystem frequently cause issues on my machines (I understand that this is the fault of the buggy UEFI implementations): sometimes the PreviousBoot gets corrupted/unreadable which causes rEFInd to stall on the next boot, sometimes the timestamps gets messed up (i.e. Windows "chkdsk" always finds something to complain about).
So I was wondering, is there a way to make a static read-only configuration possible, which doesn't write anything neither to the NVRAM neither to the filesystem. E.g. I don't really care what was the last thing that booted on my bootable USB drive with rEFInd as bootloader.
Maybe a new flag/option like "use_fs false"/"read_only true"/"static_conf true"/etc.
Hello,
first of all, thank you for this great tool.
Use of NVRAM for storing variables is discouraged because it wears flash storage. On the other hand, writes to the filesystem frequently cause issues on my machines (I understand that this is the fault of the buggy UEFI implementations): sometimes the PreviousBoot gets corrupted/unreadable which causes rEFInd to stall on the next boot, sometimes the timestamps gets messed up (i.e. Windows "chkdsk" always finds something to complain about).
So I was wondering, is there a way to make a static read-only configuration possible, which doesn't write anything neither to the NVRAM neither to the filesystem. E.g. I don't really care what was the last thing that booted on my bootable USB drive with rEFInd as bootloader.
Maybe a new flag/option like "use_fs false"/"read_only true"/"static_conf true"/etc.
UPDATE:
https://github.com/RefindPlusRepo/RefindPlus/blob/GOPFix/config.conf-sample#L587
It looks like RefindPlus has a "transient_boot" setting which disables the storage of the PreviousBoot variable. Maybe someone can implement a similar feature as this.
Thank you
Last edit: Free Zomb 2025-03-16
Found a somewhat "hacky" solution to prevent further writes to a PreviousBoot file by setting a read-only attribute on the said file.
Thank you
RefindPlus has a
transient_boot
setting, which will make it not save data about the previous boot anywhere.