Indeed you can use BootCurrent (or, as grub already provides that, use
$cmdpath or some variation of it) to specify the right device as a basis
for where to search for the files.

Rather than simply using search --file --set=root /.disk/info; I think
we can make use of hints to specify where to search first. I've
experimented with this over the past few days and it looks like it works
properly. I've also prepared a patch to grub to provide an extra
environment variable "$bootdrive" that would include just the disk
specification for the device used for the EFI booting -- in other words,
while $cmdpath contains the full path to the directory containing the
EFI binaries used to boot ((hd2,gpt2)/EFI/ubuntu); it would contain just
the drive without partition specification (hd2 in the same example).

Then, 'search --file --hint=$bootdrive --set=root /.disk/info' appears
to return the right paths according to my tests.

I've sent the patch upstream (waiting to see that it was indeed received
on the mailing list), and I'll do one final run of testing to make sure
this behaves properly before considering an upload first to the current
development release (since it does appear to be reproducible there
still).

** Changed in: grub2 (Ubuntu)
     Assignee: Colin Watson (cjwatson) => Mathieu Trudel-Lapierre (mathieu-tl)

** Changed in: grub2 (Ubuntu)
       Status: Confirmed => In Progress

** Changed in: grub2 (Ubuntu Trusty)
       Status: Confirmed => Triaged

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1097570

Title:
  grub2-signed can not find the right device when there are two
  filesystems containing the file '.disk/info'.

To manage notifications about this bug go to:
https://bugs.launchpad.net/oem-priority/+bug/1097570/+subscriptions

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to