В Tue, 26 May 2015 12:46:07 -0400 Mathieu Trudel-Lapierre <mathieu...@gmail.com> пишет:
> I've been playing with fixing Ubuntu bug 1097570; trying to debug a script we > use for the EFI images which detects where to boot from based on the location > of a .disk/info file. > > Turns out this mostly works, except for the fact that grub appears to always > list devices in a specific order, which interferes with the detection if more > than one device contains that file. > > I think I can make this work appropriately provided we: > - Use hints for search --file; > - Have some value to pass to --hint= designating the boot drive. > If you always want to use the same device GRUB was booted from why do you need to search for anything at all? > Included is a patch that adds a "bootdrive" variable alongside cmdpath; which > contains just the drive designation for the boot device, to be used as such: > > search --set=root --hint=$bootdrive --file .disk/info > > I'd much appreciate review on that patch :) > You can extract it from $cmdpath using regexp already. In retrospect having separate variables for device and path would be more flexible; but $drive is not appropriate name as it can refer to network as well. Something like $grub_bootdev and $grub_bootpath. _______________________________________________ Grub-devel mailing list Grub-devel@gnu.org https://lists.gnu.org/mailman/listinfo/grub-devel