From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1ZCJs8-0001Tc-Vx for mharc-grub-devel@gnu.org; Mon, 06 Jul 2015 23:48:41 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37808) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZCJs5-0001RD-88 for grub-devel@gnu.org; Mon, 06 Jul 2015 23:48:38 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZCJs2-000482-Em for grub-devel@gnu.org; Mon, 06 Jul 2015 23:48:37 -0400 Received: from mail-la0-x232.google.com ([2a00:1450:4010:c03::232]:36179) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZCJs2-00047q-6R for grub-devel@gnu.org; Mon, 06 Jul 2015 23:48:34 -0400 Received: by lagc2 with SMTP id c2so178092824lag.3 for ; Mon, 06 Jul 2015 20:48:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-type:content-transfer-encoding; bh=RWbW/pKW6KH7uyWngTyhU8LtRQzeHhc4NEK709A42KA=; b=P3bjFShSAlTSdNl/+dvaITIaYwc4Ah++ILmxucB8X3NbLFBVBcwjfCpO48lWh8Q5ya qy8c2eEs/vLGxc53VgnjswM2BJmnOTa8dWbnYMonOmYCbAudUf4FIB3/tNbLLea/XIoe TYvguwlkSB25TcjY3xVcJ8fSf2ub4lzicjzDqNzdwg1uK9lFZWFvrAdv+gfjmmLWEdao HA29j3OntQzkQLRUVHY15+HnmDfB1brDLexcag2WhT9zIFDBEFCetwbXnqVJPfAprObH 86Qya7g0iamsPHxYh3QCX+vuwQD6kqQaiHFjWulvbi3eI2Fgm6UY/r7G69388X3M0bRL ysDA== X-Received: by 10.152.5.65 with SMTP id q1mr1986835laq.110.1436240911679; Mon, 06 Jul 2015 20:48:31 -0700 (PDT) Received: from opensuse.site (ppp91-76-14-38.pppoe.mtu-net.ru. [91.76.14.38]) by mx.google.com with ESMTPSA id tp10sm5268223lbb.4.2015.07.06.20.48.31 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 06 Jul 2015 20:48:31 -0700 (PDT) Date: Tue, 7 Jul 2015 06:48:29 +0300 From: Andrei Borzenkov To: Mathieu Trudel-Lapierre Subject: Re: Set a bootdrive environment variable. Message-ID: <20150707064829.40f4413d@opensuse.site> In-Reply-To: References: <1432658768-4225-1-git-send-email-mathieu.trudel-lapierre@canonical.com> <20150527070407.05884736@opensuse.site> <20150531094200.52cf9bd0@opensuse.site> X-Mailer: Claws Mail 3.11.0 (GTK+ 2.24.28; x86_64-suse-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a00:1450:4010:c03::232 Cc: grub-devel@gnu.org X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: The development of GNU GRUB List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Jul 2015 03:48:38 -0000 =D0=92 Mon, 6 Jul 2015 15:44:44 -0400 Mathieu Trudel-Lapierre =D0=BF=D0=B8=D1=88=D0=B5=D1= =82: > On Sun, May 31, 2015 at 2:42 AM, Andrei Borzenkov > wrote: >=20 > > > > 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. > > >=20 > 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 patche= s. >=20 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=20 grub_errno in case the grub.cfg is not found in the bootlocation.=20 --><-- 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? >=20 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, sin= ce > 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. >=20 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-variab= le-revised.patch >=20 > Kind regards, >=20 > / Matt