From: Andrei Borzenkov <arvidjaar@gmail.com>
To: Mathieu Trudel-Lapierre <mathieu.tl@gmail.com>
Cc: grub-devel@gnu.org
Subject: Re: Set a bootdrive environment variable.
Date: Wed, 27 May 2015 07:04:07 +0300 [thread overview]
Message-ID: <20150527070407.05884736@opensuse.site> (raw)
In-Reply-To: <1432658768-4225-1-git-send-email-mathieu.trudel-lapierre@canonical.com>
В Tue, 26 May 2015 12:46:07 -0400
Mathieu Trudel-Lapierre <mathieu.tl@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.
next prev parent reply other threads:[~2015-05-27 4:04 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-26 16:46 Mathieu Trudel-Lapierre
2015-05-26 16:46 ` [PATCH] Set a bootdrive environment variable Mathieu Trudel-Lapierre
2015-05-27 4:04 ` Andrei Borzenkov [this message]
2015-05-27 12:55 ` Mathieu Trudel-Lapierre
2015-05-31 6:42 ` Andrei Borzenkov
2015-06-04 15:40 ` Vladimir 'φ-coder/phcoder' Serbinenko
2015-06-05 3:58 ` Andrei Borzenkov
2015-07-06 19:44 ` Mathieu Trudel-Lapierre
2015-07-07 3:48 ` Andrei Borzenkov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20150527070407.05884736@opensuse.site \
--to=arvidjaar@gmail.com \
--cc=grub-devel@gnu.org \
--cc=mathieu.tl@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.