On Thu, Aug 17, 2023 at 10:52:58AM +0200, Olaf Hering wrote: > Prior commit 3cf2e848bc03 ("disk/cryptodisk: Allows UUIDs to be compared > in a dash-insensitive manner") the grub.cfg below worked as expected: > create a menu, which if selected tries to open the specified partition > and does further processing. In case the passphrase was wrong, it would > just return and offer the menu again. > > With the commit above, the specified partition is opened, but cryptomount > returns an error. As a result no further processing is done, the menu is > shown again. It needs to be selected once more to do the actual processing.
I have ran into the error as well. As a side note the error message looked like: Enter passphrase for hd1,gpt3 (471eff62-ee8a-4b69-b449-031dd5449198): Attempting to decrypt master key... Slot 0 opened error: ../../grub-core/disk/cryptodisk.c:1512:no such cryptodisk found, perhaps a needed disk or cryptodisk module is not loaded. For me the disk unlocked and continued without problem despite the error. Thanks, Michael > > This change works for me: > > --- a/grub-core/disk/cryptodisk.c > +++ b/grub-core/disk/cryptodisk.c > @@ -1236,7 +1236,7 @@ grub_cryptodisk_scan_device (const char *name, > dev = grub_cryptodisk_scan_device_real (name, source, cargs); > if (dev) > { > - ret = (cargs->search_uuid != NULL && grub_strcasecmp > (cargs->search_uuid, dev->uuid) == 0); > + ret = cargs->search_uuid && !grub_uuidcasecmp(cargs->search_uuid, > dev->uuid, sizeof(dev->uuid)); > goto cleanup; > } > > > > submenu x { > insmod luks > if cryptomount -u ${uuid_without_dashes} ; then > do_work > fi > } > > > Olaf > _______________________________________________ > Grub-devel mailing list > Grub-devel@gnu.org > https://lists.gnu.org/mailman/listinfo/grub-devel _______________________________________________ Grub-devel mailing list Grub-devel@gnu.org https://lists.gnu.org/mailman/listinfo/grub-devel