public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-dev] Proper installation path for efi binaries (.efi)
@ 2013-02-04 19:13 Martin Pluskal
  2013-02-04 22:34 ` Greg KH
  0 siblings, 1 reply; 8+ messages in thread
From: Martin Pluskal @ 2013-02-04 19:13 UTC (permalink / raw
  To: gentoo-dev

[-- Attachment #1: Type: text/plain, Size: 348 bytes --]

Hi
	I am curious what is the proper path for installation of efi binaries
(such as shim.efi) in gentoo. I don't think that installing them
directly into /boot/efi... is proper way - it seems to me that
/usr/lib64/efi or /usr/libexec/efi is more appropriate location for
them. What's your opinion?

Thanks for the answer

Martin Pluskal


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 898 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [gentoo-dev] Proper installation path for efi binaries (.efi)
  2013-02-04 19:13 [gentoo-dev] Proper installation path for efi binaries (.efi) Martin Pluskal
@ 2013-02-04 22:34 ` Greg KH
  2013-02-04 22:45   ` Martin Pluskal
  0 siblings, 1 reply; 8+ messages in thread
From: Greg KH @ 2013-02-04 22:34 UTC (permalink / raw
  To: gentoo-dev

On Mon, Feb 04, 2013 at 08:13:58PM +0100, Martin Pluskal wrote:
> Hi
> 	I am curious what is the proper path for installation of efi binaries
> (such as shim.efi) in gentoo. I don't think that installing them
> directly into /boot/efi... is proper way - it seems to me that
> /usr/lib64/efi or /usr/libexec/efi is more appropriate location for
> them. What's your opinion?

It depends on if you want the bootloader to use the binary or not.  If
you do, it needs to be in /boot/efi/, otherwise it will never be able to
be run by the UEFI system.

Unless you really think that having /usr/ as a vfat filesystem is ok?
:)

thanks,

greg k-h


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [gentoo-dev] Proper installation path for efi binaries (.efi)
  2013-02-04 22:34 ` Greg KH
@ 2013-02-04 22:45   ` Martin Pluskal
  2013-02-04 22:59     ` Greg KH
  0 siblings, 1 reply; 8+ messages in thread
From: Martin Pluskal @ 2013-02-04 22:45 UTC (permalink / raw
  To: gentoo-dev

[-- Attachment #1: Type: text/plain, Size: 997 bytes --]

On 4.2.2013 23:34, Greg KH wrote:
> On Mon, Feb 04, 2013 at 08:13:58PM +0100, Martin Pluskal wrote:
>> Hi
>> 	I am curious what is the proper path for installation of efi binaries
>> (such as shim.efi) in gentoo. I don't think that installing them
>> directly into /boot/efi... is proper way - it seems to me that
>> /usr/lib64/efi or /usr/libexec/efi is more appropriate location for
>> them. What's your opinion?
> 
> It depends on if you want the bootloader to use the binary or not.  If
> you do, it needs to be in /boot/efi/, otherwise it will never be able to
> be run by the UEFI system.
Well, in order to boot you have to place .efi into /boot/efi, I am not
sure if it is the best idea to directly install everything with .efi
into /boot/efi. As far as I know, elilo is installed into /usr/lib/elilo
and grub2 is placed into /boot/efi by grub2-install.
> 
> Unless you really think that having /usr/ as a vfat filesystem is ok?
> :)
> 
> thanks,
> 
> greg k-h
> 


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 898 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [gentoo-dev] Proper installation path for efi binaries (.efi)
  2013-02-04 22:45   ` Martin Pluskal
@ 2013-02-04 22:59     ` Greg KH
  2013-02-04 23:14       ` Martin Pluskal
  0 siblings, 1 reply; 8+ messages in thread
From: Greg KH @ 2013-02-04 22:59 UTC (permalink / raw
  To: gentoo-dev

On Mon, Feb 04, 2013 at 11:45:22PM +0100, Martin Pluskal wrote:
> On 4.2.2013 23:34, Greg KH wrote:
> > On Mon, Feb 04, 2013 at 08:13:58PM +0100, Martin Pluskal wrote:
> >> Hi
> >> 	I am curious what is the proper path for installation of efi binaries
> >> (such as shim.efi) in gentoo. I don't think that installing them
> >> directly into /boot/efi... is proper way - it seems to me that
> >> /usr/lib64/efi or /usr/libexec/efi is more appropriate location for
> >> them. What's your opinion?
> > 
> > It depends on if you want the bootloader to use the binary or not.  If
> > you do, it needs to be in /boot/efi/, otherwise it will never be able to
> > be run by the UEFI system.
> Well, in order to boot you have to place .efi into /boot/efi, I am not
> sure if it is the best idea to directly install everything with .efi
> into /boot/efi. As far as I know, elilo is installed into /usr/lib/elilo
> and grub2 is placed into /boot/efi by grub2-install.

If elilo is in /usr/lib/elilo, the UEFI bios can not run the binary as
it can't even see the filesystem to read the binary from.

So how can anything that is .efi _not_ be in /boot/efi and still work?

Have you tried this out on your system with any success?

What exactly is the issue you are trying to solve here?

thanks,

greg k-h


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [gentoo-dev] Proper installation path for efi binaries (.efi)
  2013-02-04 22:59     ` Greg KH
@ 2013-02-04 23:14       ` Martin Pluskal
  2013-02-05  4:24         ` Alec Warner
  2013-02-09  3:21         ` Maxim Kammerer
  0 siblings, 2 replies; 8+ messages in thread
From: Martin Pluskal @ 2013-02-04 23:14 UTC (permalink / raw
  To: gentoo-dev

[-- Attachment #1: Type: text/plain, Size: 2502 bytes --]

On 4.2.2013 23:59, Greg KH wrote:
> On Mon, Feb 04, 2013 at 11:45:22PM +0100, Martin Pluskal wrote:
>> On 4.2.2013 23:34, Greg KH wrote:
>>> On Mon, Feb 04, 2013 at 08:13:58PM +0100, Martin Pluskal wrote:
>>>> Hi
>>>> 	I am curious what is the proper path for installation of efi binaries
>>>> (such as shim.efi) in gentoo. I don't think that installing them
>>>> directly into /boot/efi... is proper way - it seems to me that
>>>> /usr/lib64/efi or /usr/libexec/efi is more appropriate location for
>>>> them. What's your opinion?
>>>
>>> It depends on if you want the bootloader to use the binary or not.  If
>>> you do, it needs to be in /boot/efi/, otherwise it will never be able to
>>> be run by the UEFI system.
>> Well, in order to boot you have to place .efi into /boot/efi, I am not
>> sure if it is the best idea to directly install everything with .efi
>> into /boot/efi. As far as I know, elilo is installed into /usr/lib/elilo
>> and grub2 is placed into /boot/efi by grub2-install.
> 
> If elilo is in /usr/lib/elilo, the UEFI bios can not run the binary as
> it can't even see the filesystem to read the binary from.
Well it cannot, elilo.efi has to be placed to /boot/efi, install path is
however /usr/lib/elilo/elilo.efi.
> 
> So how can anything that is .efi _not_ be in /boot/efi and still work?
I am talking about location to which .efi is supposed to be placed after
installation, not necessary from which it can work.
> 
> Have you tried this out on your system with any success?
Why would I try it? I am not suggesting that it would work. After you
emerge elilo or grub2 you are still not able to boot unless you do other
steps (grub2-install or cp elilo.efi /boot/efi... && efibootmgr ... etc.)
> 
> What exactly is the issue you are trying to solve here?
I am thinking about creating ebuild for shim. I was wondering if there
is any policy or suggestion where to place .efi binaries or how to
handle them in gentoo - it seems that there is none so perhaps there
should be agreed on what best practice is (install directly into
/boot/efi or install else and let user manually copy .efi to /boot/efi
or something completely different (eselect efi ...)).

In suse default path is for example /usr/lib64/efi/:
ls /usr/lib64/efi/:
MokManager.efi  elilo.efi  shim-suse.efi  shim.efi
xen-4.2.1_02-0.7.2.efi  xen-4.2.efi  xen-4.efi  xen.efi

yet /boot/efi contains only elilo.efi
> 
> thanks,
> 
> greg k-h
> 
thanks

Martin



[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 898 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [gentoo-dev] Proper installation path for efi binaries (.efi)
  2013-02-04 23:14       ` Martin Pluskal
@ 2013-02-05  4:24         ` Alec Warner
  2013-02-05 10:05           ` Chí-Thanh Christopher Nguyễn
  2013-02-09  3:21         ` Maxim Kammerer
  1 sibling, 1 reply; 8+ messages in thread
From: Alec Warner @ 2013-02-05  4:24 UTC (permalink / raw
  To: gentoo-dev

On Mon, Feb 4, 2013 at 3:14 PM, Martin Pluskal <martin@pluskal.org> wrote:
> On 4.2.2013 23:59, Greg KH wrote:
>> On Mon, Feb 04, 2013 at 11:45:22PM +0100, Martin Pluskal wrote:
>>> On 4.2.2013 23:34, Greg KH wrote:
>>>> On Mon, Feb 04, 2013 at 08:13:58PM +0100, Martin Pluskal wrote:
>>>>> Hi
>>>>>    I am curious what is the proper path for installation of efi binaries
>>>>> (such as shim.efi) in gentoo. I don't think that installing them
>>>>> directly into /boot/efi... is proper way - it seems to me that
>>>>> /usr/lib64/efi or /usr/libexec/efi is more appropriate location for
>>>>> them. What's your opinion?
>>>>
>>>> It depends on if you want the bootloader to use the binary or not.  If
>>>> you do, it needs to be in /boot/efi/, otherwise it will never be able to
>>>> be run by the UEFI system.
>>> Well, in order to boot you have to place .efi into /boot/efi, I am not
>>> sure if it is the best idea to directly install everything with .efi
>>> into /boot/efi. As far as I know, elilo is installed into /usr/lib/elilo
>>> and grub2 is placed into /boot/efi by grub2-install.
>>
>> If elilo is in /usr/lib/elilo, the UEFI bios can not run the binary as
>> it can't even see the filesystem to read the binary from.
> Well it cannot, elilo.efi has to be placed to /boot/efi, install path is
> however /usr/lib/elilo/elilo.efi.
>>
>> So how can anything that is .efi _not_ be in /boot/efi and still work?
> I am talking about location to which .efi is supposed to be placed after
> installation, not necessary from which it can work.
>>
>> Have you tried this out on your system with any success?
> Why would I try it? I am not suggesting that it would work. After you
> emerge elilo or grub2 you are still not able to boot unless you do other
> steps (grub2-install or cp elilo.efi /boot/efi... && efibootmgr ... etc.)
>>
>> What exactly is the issue you are trying to solve here?
> I am thinking about creating ebuild for shim. I was wondering if there
> is any policy or suggestion where to place .efi binaries or how to
> handle them in gentoo - it seems that there is none so perhaps there
> should be agreed on what best practice is (install directly into
> /boot/efi or install else and let user manually copy .efi to /boot/efi
> or something completely different (eselect efi ...)).
>
> In suse default path is for example /usr/lib64/efi/:
> ls /usr/lib64/efi/:
> MokManager.efi  elilo.efi  shim-suse.efi  shim.efi
> xen-4.2.1_02-0.7.2.efi  xen-4.2.efi  xen-4.efi  xen.efi
>
> yet /boot/efi contains only elilo.efi

Can you even guarantee that /boot is mounted when your package is
installed? That would be my major concern on Gentoo...
-A

>>
>> thanks,
>>
>> greg k-h
>>
> thanks
>
> Martin
>
>


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [gentoo-dev] Proper installation path for efi binaries (.efi)
  2013-02-05  4:24         ` Alec Warner
@ 2013-02-05 10:05           ` Chí-Thanh Christopher Nguyễn
  0 siblings, 0 replies; 8+ messages in thread
From: Chí-Thanh Christopher Nguyễn @ 2013-02-05 10:05 UTC (permalink / raw
  To: gentoo-dev

Alec Warner schrieb:
> Can you even guarantee that /boot is mounted when your package is
> installed? That would be my major concern on Gentoo...

And that /boot is the EFI system partition...


Best regards,
Chí-Thanh Christopher Nguyễn



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [gentoo-dev] Proper installation path for efi binaries (.efi)
  2013-02-04 23:14       ` Martin Pluskal
  2013-02-05  4:24         ` Alec Warner
@ 2013-02-09  3:21         ` Maxim Kammerer
  1 sibling, 0 replies; 8+ messages in thread
From: Maxim Kammerer @ 2013-02-09  3:21 UTC (permalink / raw
  To: gentoo-dev

On Tue, Feb 5, 2013 at 1:14 AM, Martin Pluskal <martin@pluskal.org> wrote:
> I am thinking about creating ebuild for shim. I was wondering if there
> is any policy or suggestion where to place .efi binaries or how to
> handle them in gentoo - it seems that there is none so perhaps there
> should be agreed on what best practice is (install directly into
> /boot/efi or install else and let user manually copy .efi to /boot/efi
> or something completely different (eselect efi ...)).

I think that you will most certainly need to separate installation and
configuration (e.g., with a "shim-install" script or similar), because
configuration depends on the environment. For instance, with removable
media you will need to:
1. Drop shim.efi and MokManager.efi into [/boot/]EFI/BOOT.
2. Rename BOOTx64.EFI to grubx64.efi, and then rename shim.efi to BOOTx64.EFI.
(Copied from http://dee.su/liberte-install — this has been tested with
OVMF and real Secure Boot hardware.)

-- 
Maxim Kammerer
Liberté Linux: http://dee.su/liberte


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2013-02-09  3:21 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-02-04 19:13 [gentoo-dev] Proper installation path for efi binaries (.efi) Martin Pluskal
2013-02-04 22:34 ` Greg KH
2013-02-04 22:45   ` Martin Pluskal
2013-02-04 22:59     ` Greg KH
2013-02-04 23:14       ` Martin Pluskal
2013-02-05  4:24         ` Alec Warner
2013-02-05 10:05           ` Chí-Thanh Christopher Nguyễn
2013-02-09  3:21         ` Maxim Kammerer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox