Comment # 6 on bug 1126900 from
(In reply to Fabian Vogt from comment #5)
> (In reply to Ignaz Forster from comment #4)
> > (In reply to Michael Chang from comment #3)

> > Regarding Jiri's question about the split into two sections: What I also
> > don't understand is why /boot/grub2/grubenv is used on Btrfs at all.
> > Couldn't all data be stored into the Btrfs header directly? The contents of
> > /boot/grub2/grubenv are inconsistent on Btrfs systems anyway, as GRUB won't
> > update that file.
> 
> IMO the best option currently as it's not too complex to implement and it
> would also not need any migration path. Only env_block would be part of the
> grubenv in the file system and all other variables would be read
> from/written to the header.

The problem with header is that settings in it are "global" to all subvolumes,
while with grubenv file each bootable subvolumes/snapshots could maintain their
own copy. We have to snapshot grubenv together with grub.cfg to keep consistent
environment variables to grub.cfg.

The purpose of having header section is to workaround inability of grub writing
to btrfs blocks. Usually such variable do not require persistence and is used
as  communication channel in specific way - for eg, grub clears a flag marked
by system for knowing something has been done by the system.


You are receiving this mail because: