On Thu, Feb 2, 2012 at 3:16 AM, Richard Laager <rlaa...@wiktel.com> wrote: > GRUB can't write to ZFS. Creating a grubenv file leads to a misleading > "sparse file not allowed" error on boot. The attached patch for > grub-install skips the creation of a grubenv file on ZFS.
I think that not writing /boot/grub/grubenv is a poor work around for the problem of grubenv not being writable. 1: Even if it doesn't now, I would expect an error message when save_env is run and no grubenv is present, so there should be an error message either way. 2: There are uses for grubenv that do not involve writing to it at boot. Fedora's grub2 documentation recommends grub-set-default as the best way to change the default menu entry: http://fedoraproject.org/wiki/Grub2#Setting_default_entry and if I understand correctly this should continue to work on any filesystem which grub can read. 3: It can't be determined with certainty that grubenv will be writeable at boot. I have run into problems where I installed grub to an SD card and then flipped the write protect switch on the card, which could not have been anticipated at grub-install time. For this reason I think the focus should be on graceful degradation and understandable error messages when save_env is called with a read only grubenv (and possibly there should be ways to disable calls to grubenv in grub-mkconfig, especially in the case of Ubuntu's recordfail modifications). I do however think that some utilities should warn (but not otherwise change their behavior) when grubenv does not appear to be writable. The prime example of this would be grub-reboot. When grub-reboot is called with a filesytem / abstraction which will prevent grub from writing to the grubenv at boot, grub-reboot cannot possibly function. It already degrades to basically having no effect, so there is no harm in making the changes to grubenv on the off chance the user knows better, but it should produce a clear warning that grub-reboot cannot function without a grubenv writeable by grub at boot. -- Jordan Uggla (Jordan_U on irc.freenode.net) _______________________________________________ Grub-devel mailing list Grub-devel@gnu.org https://lists.gnu.org/mailman/listinfo/grub-devel