Hi,
Il giorno mer, 13/01/2021 alle 13.46 -0700, Chris Murphy ha scritto:
On Tue, Jan 12, 2021 at 8:48 PM Michel Alexandre Salim
<michel(a)michel-slm.name> wrote:
... snip
There are separate issues.
grubenv is "OK" on ext4 and XFS. The issue is that none of the file
systems developers like anything other than kernel code doing writes.
One idea for this is a new MBR and GPT partition type, functionally
identical to the GPT "BIOS Boot" type, that's exclusively for the
bootloader to use however it wants. On BIOS it'd include core.img and
grubenv. On UEFI it'd just be used for grubenv. This issue needs to
be
taken upstream to sort out the details, so it should be set aside as
it relates to this proposal.
IMHO boot loaders should not write to filesystems, if this is needed to
hide the GRUB menu when boot is successful, then let's display it
always as it was one time. I don't think it we should follow Windows or
MacOS style here, the boot menu is useful.
The issue with journaled file systems is that GRUB's file system
drivers have no ability to do journal replay. Therefore there is a
small risk the file system is rendered unbootable in a crash, because
the bootloader only sees the no-replay state of the file system used
for /boot. e.g. the bootloader can see grub.cfg, bls snippets, or
even
the kernel as either missing or as 0 length files, until the journal
has been replayed. Small risk, big penalty. My suggestion for
mitigation is to use FAT for /boot in simple cases, and Btrfs in less
simple cases. It's just an idea, it's not urgent, but if things are
being reconsidered for simplification anyway, this makes sense to me.
Ergo the idea for a "bootloader partition that is exclusively owned
by
the bootloader" is separate from "bootloaders don't do journal replay
and therefore can have the wrong view of things, and fail to boot in
rare cases following a crash."
Yet another partition needed to boot the OS. What when there are no
available paritions in BIOS mode, because other OSes used all the
available 4 partitions?
... snip
Ciao
Guido