Quoting Colin Watson, who wrote the following on Wed, 8 Sep 2010:
The install branch right now suffers from an interesting problem on EFI systems. The EFI System Partition doesn't necessarily contain GRUB modules; the way it's set up right now is that the ESP is mounted on /efi and GRUB modules are in their usual place in /boot/grub. This means that if prefix is empty then our initialisation code will default to setting it to the ESP, which is not going to work properly. It seems to me that the obvious way to deal with this is to try to unify it with how PC BIOS systems behave: use a UUID to find /boot/grub, unless the drive where core.img is installed is the same drive as that containing /boot/grub in which case we can optimise away the costly UUID search by simply hardcoding the partition number.
This is a great solution -- especially for OSes that store configuration files and modules on another partition. Not being forced to store those files on the ESP is excellent and greatly increases GRUB2's flexibility (and makes it more convenient versus embedding a configuration file into the image whose only function is to search for the location of the actual config file and modules).
In the BIOS case, grub-setup is responsible for filling in the partition number. There's no grub-setup on EFI, though, and it seems overkill to create one, so it seems best for grub-install to just set an appropriate prefix. This means that we need a prefix notation for "partition number N on the same drive as core.img". As it happens, I created such a notation a while back to address problems with nested partitions:
This is excellent -- once this is in, we can enhance the find command with the --hint argument -- something I've wanted for some time (and should also speed it up when there are many partitions/disks in the system!).
--S _______________________________________________ Grub-devel mailing list [email protected] http://lists.gnu.org/mailman/listinfo/grub-devel
