Mon 28 Mar 2011 12:08:37 AM UTC, comment #2:
Thanks, good point, I missed that completely.
Lession learned, having write support in LVM is probably evil. OTOH not having LVM write support is a complete desaster (see below). So I hope a suitable fix for the time being (until somebody fixes it 101%) can be to allow users to enable write support if they really want it.
In the new patch (lvm-write.2.patch) this is controlled by environment variable "lvm_write_enabled". It increases lvm.mod by 560 bytes.
Example:
Boot grub
c
insmod lvm
set prefix=(VGNAME-boot)/grub
load_env
set saved_entry=2
save_env saved_entry
# This fails now
set lvm_write_enabled=true
save_env saved_enty lvm_write_enabled
# now worked
reboot
Some rationale on this patch:
At my side Linux is installed into LVM and the GRUB config must be on LVM too. My setup is Multiboot and Windows breaks if GRUB does not automatically boot into it after hibernation.
So a not working save_env is a complete showstopper at my side. And I don't think I am alone with this!
As I cannot provide a separate /boot partition in my environment either, enabling LVM writes are the only way to get my setup working here.
I hope, to disable writes by default and enable them on user's request is the best of both worlds for now.
The downside is that it does not work perfectly on mirrored LVM. However I would say that LVM mirror support is extremely dangerous anyway, so the trouble GRUB adds does not count much. My recommendation on mirroring is: Use MD instead, it just works.
Note:
The patch does not need to make it into dist soon, as you can see, patching yourself is not much effort.
(file #23033)
|