All of lore.kernel.org
 help / color / mirror / Atom feed
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: Tue, 7 Jul 2015 06:48:29 +0300	[thread overview]
Message-ID: <20150707064829.40f4413d@opensuse.site> (raw)
In-Reply-To: <CACfMzvopJPiBTiS_-GOCMvOSid+Bzns7kW3moiQSd4WFdqGMfQ@mail.gmail.com>

В Mon, 6 Jul 2015 15:44:44 -0400
Mathieu Trudel-Lapierre <mathieu.tl@gmail.com> пишет:

> On Sun, May 31, 2015 at 2:42 AM, Andrei Borzenkov <arvidjaar@gmail.com>
> wrote:
> 
> >
> > The problem is that $cmdpath had been around for long enough. If
> > $cmdpath is used only after loading normal (that are cases I'm aware
> > of) we can make it compatibility variable set by normal without causing
> > more core bloat.
> >
> 
> I'm not finding any uses of cmdpath in git, and when I went to dig in
> RH/Fedora packaging, it looks like there is already a patch that appears to
> rename it and change its meaning [1], along with two other related patches.
> 

Well, it is up to RH. Moreover, the real problem as indicated in rhbz is

--><--
The issue comes from the fact that the original patch does not clear the 
grub_errno in case the grub.cfg is not found in the bootlocation. 
--><--

and it is unrelated to how variable is named. I have patch for it
somewhere, I hit this issue as well. Another issue is missing initial
'/' which is fixed in grub in the meantime as well.

> You mention you know of cases where it's used after loading normal, could
> you please point me to them?
> 

I can think of some use cases and we never know how creative people
become in between.

> I'd like to try to come up with a patch that will work for everyone. FWIW,
> my requirement right now is only to have some way (aside from regexp, since
> we're concerned running regexp in the EFI context could increase attack
> exposure) to get just the GRUB boot device (ie. cd0, hd0, etc. without
> partition information), so that ISO images could boot and load a generic
> grub.cfg that doesn't need to encode a filesystem UUID or some other
> identifier.
> 

If you set initial prefix in grub.efi to '()', grub will strip
partition part when setting $root; look at what grub-mkrescue does. Is
it good enough for your purpose?


> [1]
> http://pkgs.fedoraproject.org/cgit/grub2.git/tree/0090-Add-fw_path-variable-revised.patch
> 
> Kind regards,
> 
> / Matt



      reply	other threads:[~2015-07-07  3:48 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
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 [this message]

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=20150707064829.40f4413d@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.