Bug#925309: Wrong prefix directory hardcoded in signed GRUB image

Pascal Hambourg pascal at plouf.fr.eu.org
Sun Mar 24 07:06:02 GMT 2019


Le 24/03/2019 à 01:10, Colin Watson a écrit :
>>
>> However when the signed image is installed in a different location, it still
>> looks for grub.cfg in (EFI_PARTITION)/EFI/debian instead of $cmdpath and
>> spawns the grub> shell unless grub.cfg is present in this location. In the
>> shell, $prefix is set to (EFI_PARTITION)/EFI/debian.
>>
>> Shouldn't the prefix be initialized with $cmdpath instead of the hardcoded
>> path /EFI/debian ?
> 
> Possibly.  The prefix parameter given to grub-mkimage's -p option has to
> be an actual path, not a variable reference.  In order to make it use
> $cmdpath, we'd need another one of the arrangements we use for some of
> the other pre-built images to use a config file embedded in a memdisk.
> Fiddly, but should be possible.

What about using the -c option to embed an early config file ?	

> Which different location are you installing the signed image in?  Just
> /EFI/BOOT, or something more exotic?

I use various locations in order to install separate instances of GRUB 
for multiple instances of Debian installations or software RAID setups. 
I also use the removable path /EFI/BOOT which has proven more reliable 
(and portable) than EFI boot variables on a number of systems.

By the way, it seems that grub-install --removable installs a different 
signed image which is less complete than the normal one. I have not 
deeply investigated this yet but at least the lvm module is missing. 
Also, the config file embedded in its memdisk gives me the impression 
that it is intended for install/live media rather than regular systems.



More information about the Pkg-grub-devel mailing list