* [PATCH] fix grub-install efibootmgr presence test with --removable
@ 2013-05-09 10:44 Leif Lindholm
2013-05-09 20:01 ` Andrey Borzenkov
2013-05-10 14:57 ` Vladimir 'φ-coder/phcoder' Serbinenko
0 siblings, 2 replies; 7+ messages in thread
From: Leif Lindholm @ 2013-05-09 10:44 UTC (permalink / raw)
To: grub-devel
[-- Attachment #1: Type: text/plain, Size: 472 bytes --]
When executed for an EFI target, grub-install checks for the path of
efibootmgr - however, this utility is not required (or used) when
installing to a removable media (with --removable).
However, since grub-install does "set -e", the absence of efibootmgr
on the system causes the install script to exit with an error code,
without any message, after a successful installation.
(Found because I'm doing EFI builds on my chromebook.)
Trivial patch attached.
/
Leif
[-- Attachment #2: efibootmgr-check.patch --]
[-- Type: text/x-diff, Size: 490 bytes --]
=== modified file 'util/grub-install.in'
--- util/grub-install.in 2013-04-29 10:26:43 +0000
+++ util/grub-install.in 2013-05-09 10:23:06 +0000
@@ -754,7 +754,7 @@
fi
# Try to make this image bootable using the EFI Boot Manager, if available.
- efibootmgr="`which efibootmgr`"
+ efibootmgr="`which efibootmgr`" || true
if test "$removable" = no && test -n "$efi_distributor" && \
test -n "$efibootmgr"; then
# On Linux, we need the efivars kernel modules.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] fix grub-install efibootmgr presence test with --removable
2013-05-09 10:44 [PATCH] fix grub-install efibootmgr presence test with --removable Leif Lindholm
@ 2013-05-09 20:01 ` Andrey Borzenkov
2013-05-10 14:57 ` Vladimir 'φ-coder/phcoder' Serbinenko
1 sibling, 0 replies; 7+ messages in thread
From: Andrey Borzenkov @ 2013-05-09 20:01 UTC (permalink / raw)
To: grub-devel
В Thu, 9 May 2013 10:44:35 +0000
Leif Lindholm <leif.lindholm@linaro.org> пишет:
> When executed for an EFI target, grub-install checks for the path of
> efibootmgr - however, this utility is not required (or used) when
> installing to a removable media (with --removable).
>
> However, since grub-install does "set -e", the absence of efibootmgr
> on the system causes the install script to exit with an error code,
> without any message, after a successful installation.
>
Yes, was hit by this as well. Makes sense really.
> (Found because I'm doing EFI builds on my chromebook.)
>
> Trivial patch attached.
>
> /
> Leif
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] fix grub-install efibootmgr presence test with --removable
2013-05-09 10:44 [PATCH] fix grub-install efibootmgr presence test with --removable Leif Lindholm
2013-05-09 20:01 ` Andrey Borzenkov
@ 2013-05-10 14:57 ` Vladimir 'φ-coder/phcoder' Serbinenko
2013-05-10 15:16 ` Leif Lindholm
2013-05-11 4:43 ` Andrey Borzenkov
1 sibling, 2 replies; 7+ messages in thread
From: Vladimir 'φ-coder/phcoder' Serbinenko @ 2013-05-10 14:57 UTC (permalink / raw)
To: grub-devel
[-- Attachment #1: Type: text/plain, Size: 821 bytes --]
On 09.05.2013 12:44, Leif Lindholm wrote:
> When executed for an EFI target, grub-install checks for the path of
> efibootmgr - however, this utility is not required (or used) when
> installing to a removable media (with --removable).
>
This patch would simply ignore the problem. I comitted another fix which
is cleaner.
> However, since grub-install does "set -e", the absence of efibootmgr
> on the system causes the install script to exit with an error code,
> without any message, after a successful installation.
>
> (Found because I'm doing EFI builds on my chromebook.)
>
> Trivial patch attached.
>
> /
> Leif
>
>
>
> _______________________________________________
> Grub-devel mailing list
> Grub-devel@gnu.org
> https://lists.gnu.org/mailman/listinfo/grub-devel
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 294 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] fix grub-install efibootmgr presence test with --removable
2013-05-10 14:57 ` Vladimir 'φ-coder/phcoder' Serbinenko
@ 2013-05-10 15:16 ` Leif Lindholm
2013-05-11 4:43 ` Andrey Borzenkov
1 sibling, 0 replies; 7+ messages in thread
From: Leif Lindholm @ 2013-05-10 15:16 UTC (permalink / raw)
To: The development of GNU GRUB
Fri, May 10, 2013 at 04:57:38PM +0200, Vladimir 'φ-coder/phcoder' Serbinenko wrote:
> > When executed for an EFI target, grub-install checks for the path of
> > efibootmgr - however, this utility is not required (or used) when
> > installing to a removable media (with --removable).
> >
>
> This patch would simply ignore the problem. I comitted another fix which
> is cleaner.
It wouldn't ignore the problem, since the test following explicitly
checked whether $efibootmgr is nonzero length.
But I agree your fix is cleaner.
/
Leif
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] fix grub-install efibootmgr presence test with --removable
2013-05-10 14:57 ` Vladimir 'φ-coder/phcoder' Serbinenko
2013-05-10 15:16 ` Leif Lindholm
@ 2013-05-11 4:43 ` Andrey Borzenkov
2013-05-11 6:49 ` Vladimir 'φ-coder/phcoder' Serbinenko
1 sibling, 1 reply; 7+ messages in thread
From: Andrey Borzenkov @ 2013-05-11 4:43 UTC (permalink / raw)
To: grub-devel
[-- Attachment #1: Type: text/plain, Size: 612 bytes --]
В Fri, 10 May 2013 16:57:38 +0200
Vladimir 'φ-coder/phcoder' Serbinenko <phcoder@gmail.com> пишет:
> On 09.05.2013 12:44, Leif Lindholm wrote:
>
> > When executed for an EFI target, grub-install checks for the path of
> > efibootmgr - however, this utility is not required (or used) when
> > installing to a removable media (with --removable).
> >
>
> This patch would simply ignore the problem. I comitted another fix which
> is cleaner.
>
Note that "which command" already prints error message when command was
not found, so additional error output is strictly speaking redundant.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] fix grub-install efibootmgr presence test with --removable
2013-05-11 4:43 ` Andrey Borzenkov
@ 2013-05-11 6:49 ` Vladimir 'φ-coder/phcoder' Serbinenko
2013-05-11 7:54 ` Andrey Borzenkov
0 siblings, 1 reply; 7+ messages in thread
From: Vladimir 'φ-coder/phcoder' Serbinenko @ 2013-05-11 6:49 UTC (permalink / raw)
To: grub-devel
[-- Attachment #1: Type: text/plain, Size: 950 bytes --]
On 11.05.2013 06:43, Andrey Borzenkov wrote:
> В Fri, 10 May 2013 16:57:38 +0200
> Vladimir 'φ-coder/phcoder' Serbinenko <phcoder@gmail.com> пишет:
>
>> On 09.05.2013 12:44, Leif Lindholm wrote:
>>
>>> When executed for an EFI target, grub-install checks for the path of
>>> efibootmgr - however, this utility is not required (or used) when
>>> installing to a removable media (with --removable).
>>>
>>
>> This patch would simply ignore the problem. I comitted another fix which
>> is cleaner.
>>
>
> Note that "which command" already prints error message when command was
> not found, so additional error output is strictly speaking redundant.
>
It doesn't.
phcoder@debian.x201.phnet:08:48:40:~$ which ttt
phcoder@debian.x201.phnet:08:48:41:~$
>
>
> _______________________________________________
> Grub-devel mailing list
> Grub-devel@gnu.org
> https://lists.gnu.org/mailman/listinfo/grub-devel
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 294 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] fix grub-install efibootmgr presence test with --removable
2013-05-11 6:49 ` Vladimir 'φ-coder/phcoder' Serbinenko
@ 2013-05-11 7:54 ` Andrey Borzenkov
0 siblings, 0 replies; 7+ messages in thread
From: Andrey Borzenkov @ 2013-05-11 7:54 UTC (permalink / raw)
To: grub-devel
[-- Attachment #1: Type: text/plain, Size: 1178 bytes --]
В Sat, 11 May 2013 08:49:00 +0200
Vladimir 'φ-coder/phcoder' Serbinenko <phcoder@gmail.com> пишет:
> On 11.05.2013 06:43, Andrey Borzenkov wrote:
>
> > В Fri, 10 May 2013 16:57:38 +0200
> > Vladimir 'φ-coder/phcoder' Serbinenko <phcoder@gmail.com> пишет:
> >
> >> On 09.05.2013 12:44, Leif Lindholm wrote:
> >>
> >>> When executed for an EFI target, grub-install checks for the path of
> >>> efibootmgr - however, this utility is not required (or used) when
> >>> installing to a removable media (with --removable).
> >>>
> >>
> >> This patch would simply ignore the problem. I comitted another fix which
> >> is cleaner.
> >>
> >
> > Note that "which command" already prints error message when command was
> > not found, so additional error output is strictly speaking redundant.
> >
>
> It doesn't.
> phcoder@debian.x201.phnet:08:48:40:~$ which ttt
> phcoder@debian.x201.phnet:08:48:41:~$
>
This is probably system dependent
bor@opensuse:~> which xxx
which: no xxx in (/home/bor/bin:/usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/X11R6/bin:/usr/games)
I guess in this case it is better to redirect stderr to /dev/null
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2013-05-11 7:54 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-05-09 10:44 [PATCH] fix grub-install efibootmgr presence test with --removable Leif Lindholm
2013-05-09 20:01 ` Andrey Borzenkov
2013-05-10 14:57 ` Vladimir 'φ-coder/phcoder' Serbinenko
2013-05-10 15:16 ` Leif Lindholm
2013-05-11 4:43 ` Andrey Borzenkov
2013-05-11 6:49 ` Vladimir 'φ-coder/phcoder' Serbinenko
2013-05-11 7:54 ` Andrey Borzenkov
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.