Hello Michael, On 11/5/19 10:20 AM, Michael Chang wrote: > The environment block is a preallocated 1024-byte file serves as persistent > storage for environment variables. It has its own format which is sensitive to > corruption if using editor doesn't know how to process it. Besides the editor > may inadvertantly change size allocation that could have it sparse the > filesystem which could lead to unexpected outcome. >
Yes, we also get reports about this issue: https://bugzilla.redhat.com/show_bug.cgi?id=1625124 > This patch adds message in grubenv file to warn the user from editing it by > tools other than grub-editenv. > Agreed that users should be warned that the file should only be edited with the GRUB tools. I also wonder if grub-editenv can't be made more robust and correct a grubenv file (i.e: filling the missing # characters / removing any extra # character) if is found to be corrupted and not having the expected size. > Signed-off-by: Michael Chang <mch...@suse.com> > --- > util/editenv.c | 12 +++++++++--- > 1 file changed, 9 insertions(+), 3 deletions(-) > The patch looks good to me. Reviewed-by: Javier Martinez Canillas <javi...@redhat.com> Best regards, -- Javier Martinez Canillas Software Engineer - Desktop Hardware Enablement Red Hat _______________________________________________ Grub-devel mailing list Grub-devel@gnu.org https://lists.gnu.org/mailman/listinfo/grub-devel