Hi, the LVM team would like to cooperate with you in hardening and cleaning up the LVM support code (the "lvm" grub module). We would like to provide full suport for having /boot on LVM...
Currently, the lvm module seems to recognize striped/linear, raid and mirror segment types. As I was looking at the code, I noticed a few things that would require looking at. Most notably, it's about LVM metadata handling where the parser used in the grub module can handle only a subset of what the LVM metadata parser can recognize and digest. If any changes are made in the LVM, this could end up with errors on the grub module side as a consequence and thus causing inability to boot such a system. The possible problems that might appear is about handling whitespaces, metadata field order processing (the grub module seems to be expecting the fields to be in one concrete order which might not be the case all the time), also there's missing checksumming (to check whether metadata are not corrupted in some way) or processing any new flags we might add and which might be usefull when processing such devices and which might help grub to process the metadata in a more reliable and effective way. So the question is whether you are OK with reviewing this code with us thouroughly and then doing all the necessary changes that would make this solution more robust and error-prone? Now, for starters, thinking about the metadata parser and all the checks needed, we would like to provide a simple library that grub could use/link with. Such a solution would remove the duplication of the work done on these parts and we will always have the proper code to reflect any changes done in the LVM code or any enhancements we might come up with and that grub can directly make use of through the interface we would provide (and its use won't be bound to grub only, it could be reused in other projects as well). An alternative solution might be for the grub to export an interface for creating modules "externally" so LVM upstream can make use of that and provide the module based on this interface. As it seems there's no support for this in grub yet (the modules are all created directly by grub team), is there any plan for supporting externally built modules in the future, if possible at all? The aim is simply to move the responsibility for the LVM metadata parsing and checking to LVM directly so LVM would maintain that and take full responsibility for it. At the moment, it seems the first suggestion would work the best (LVM team providing the interface for processing LVM volumes and then the lvm grub module linking with this interface). This is just for starters, to get the ball rolling... Please, let me know any of your opinions, suggestions and then I'd like to start working on this fully based on your feedback. Thanks Peter _______________________________________________ Grub-devel mailing list Grub-devel@gnu.org https://lists.gnu.org/mailman/listinfo/grub-devel