fix grub-install efibootmgr presence test with --removable
PATCH 1/1 fix grub-install efibootmgr presence test with --removable
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
=== modified file 'util/grub-install.in'
grub-install.in +1 -1
@@ -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.
В Thu, 9 May 2013 10:44:35 +0000
Leif Lindholm <[email protected]> пишет:
Quoted 8 lines
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.
Quoted 6 lines
(Found because I'm doing EFI builds on my chromebook.)
Trivial patch attached.
/
Leif
Quoted 4 lines · Leif Lindholm
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.
Quoted 17 lines
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
[email protected]
https://lists.gnu.org/mailman/listinfo/grub-devel
Quoted 7 lines · Vladimir 'φ-coder/phcoder' Serbinenko
Quoted 4 lines
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
В Fri, 10 May 2013 16:57:38 +0200
Vladimir 'φ-coder/phcoder' Serbinenko <[email protected]> пишет:
Quoted 10 lines · Leif Lindholm
Quoted 5 lines
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.
Quoted 10 lines · Andrey Borzenkov
В Fri, 10 May 2013 16:57:38 +0200
Vladimir 'φ-coder/phcoder' Serbinenko <[email protected]> пишет:Quoted 7 lines · Leif Lindholm
Quoted 5 lines
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).
Quoted 7 lines
Quoted 3 lines
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.
[email protected]:08:48:40:~$ which ttt [email protected]:08:48:41:~$
Quoted 6 lines
_______________________________________________
Grub-devel mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/grub-devel
В Sat, 11 May 2013 08:49:00 +0200
Vladimir 'φ-coder/phcoder' Serbinenko <[email protected]> пишет:
Quoted 16 lines · Andrey Borzenkov
Quoted 15 lines
В Fri, 10 May 2013 16:57:38 +0200
Vladimir 'φ-coder/phcoder' Serbinenko <[email protected]> пишет:Quoted 10 lines · Leif Lindholm
Quoted 5 lines
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.
Quoted 8 lines
Quoted 3 lines
Note that "which command" already prints error message when command was not found, so additional error output is strictly speaking redundant.
It doesn't.
[email protected]:08:48:40:~$ which ttt [email protected]: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