What | Removed | Added |
---|---|---|
Flags | needinfo?(fvogt@suse.com), needinfo?(iforster@suse.com) |
(In reply to Michael Chang from comment #18) > Here the test package for grub2-install to set up $env_block in grubenv > file, Would you please take some time to test if it works as expected ? > > https://build.opensuse.org/package/show/home:michael-chang:bsc:1156441/grub2 I just rebuilt the images with your modified grub version - everything expected by this patch is working perfectly fine now: * The grubenv file is present in the image with the env_block variable set. * Due to this variables can be set in GRUB also during first boot. * Modifying the variable with grub2-editenv in the running system still works. Thanks a lot! The other ticket is more or less independent of this patch: On read-only systems it may still be a good idea to be able to write the grub environment block. To make this possible the idea is to put the grubenv file onto a separate writable partition. I've currently implemented this using a subvolume called "/boot/writable", which will be created on read-only systems only, linking /boot/grub2/grubenv to /boot/writable/grubenv. This would be working in theory, but unfortunately KIWI deletes any files called /boot/*/grubenv, so this is not working for our images. On the other hand the solution is quite hacky (requiring to generate a GRUB script to run before the 00_header) and creates differences between a read-only and a read-write system, so I'm not really keen to keep it. A saner solutions seems to be to make grub2 use a different directory for grubenv from the beginning and uniformly for all systems (e.g. /boot/var). If you are not opposed to this I'd just develop a prototype to demonstrate what I mean.