All of lore.kernel.org
 help / color / mirror / Atom feed
* efivarfs fails with `No such device` when EFI runtime is missing
@ 2021-05-11 20:55 Paul Menzel
  2021-05-11 20:58 ` Paul Menzel
  0 siblings, 1 reply; 3+ messages in thread
From: Paul Menzel @ 2021-05-11 20:55 UTC (permalink / raw)
  To: Ard Biesheuvel; +Cc: linux-efi, LKML

Dear Linux folks,


I migrated a 32-bit GNU/Linux installation from BIOS to EFI. Trying to 
edit the entries in UEFI’s Boot Manager with `efibootmgr`, I got the error:

     EFI variables are not supported on this system

`sudo modprobe efivarfs` fails with

     No such device

After several tries, I found

     [    0.000000] efi: No EFI runtime due to 32/64-bit mismatch with 
kernel

logged by Linux, and then I found the Stack Overflow thread *How could 
32bit kernel read efivars from 64bit UEFI?* [1].

I would have thought, setting EFI variables is just directly writing to 
some storage. But probably not.

Could the error message for the efivarfs load failure be improved, that 
*device* means the runtime service (if I am not mistaken)?


Kind regards,

Paul


[1]: 
https://stackoverflow.com/questions/46610442/how-could-32bit-kernel-read-efivars-from-64bit-uefi

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

* Re: efivarfs fails with `No such device` when EFI runtime is missing
  2021-05-11 20:55 efivarfs fails with `No such device` when EFI runtime is missing Paul Menzel
@ 2021-05-11 20:58 ` Paul Menzel
  2021-05-11 22:06   ` Ard Biesheuvel
  0 siblings, 1 reply; 3+ messages in thread
From: Paul Menzel @ 2021-05-11 20:58 UTC (permalink / raw)
  To: Ard Biesheuvel, Matthew Garrett, Jeremy Kerr; +Cc: linux-efi, LKML

[Use Ard’s current email, and add other maintainers]

Am 11.05.21 um 22:55 schrieb Paul Menzel:
> Dear Linux folks,
> 
> 
> I migrated a 32-bit GNU/Linux installation from BIOS to EFI. Trying to 
> edit the entries in UEFI’s Boot Manager with `efibootmgr`, I got the error:
> 
>     EFI variables are not supported on this system
> 
> `sudo modprobe efivarfs` fails with
> 
>     No such device
> 
> After several tries, I found
> 
>     [    0.000000] efi: No EFI runtime due to 32/64-bit mismatch with 
> kernel
> 
> logged by Linux, and then I found the Stack Overflow thread *How could 
> 32bit kernel read efivars from 64bit UEFI?* [1].
> 
> I would have thought, setting EFI variables is just directly writing to 
> some storage. But probably not.
> 
> Could the error message for the efivarfs load failure be improved, that 
> *device* means the runtime service (if I am not mistaken)?
> 
> 
> Kind regards,
> 
> Paul
> 
> 
> [1]: https://stackoverflow.com/questions/46610442/how-could-32bit-kernel-read-efivars-from-64bit-uefi 

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

* Re: efivarfs fails with `No such device` when EFI runtime is missing
  2021-05-11 20:58 ` Paul Menzel
@ 2021-05-11 22:06   ` Ard Biesheuvel
  0 siblings, 0 replies; 3+ messages in thread
From: Ard Biesheuvel @ 2021-05-11 22:06 UTC (permalink / raw)
  To: Paul Menzel; +Cc: Matthew Garrett, Jeremy Kerr, linux-efi, LKML

On Tue, 11 May 2021 at 22:58, Paul Menzel <pmenzel@molgen.mpg.de> wrote:
>
> [Use Ard’s current email, and add other maintainers]
>
> Am 11.05.21 um 22:55 schrieb Paul Menzel:
> > Dear Linux folks,
> >
> >
> > I migrated a 32-bit GNU/Linux installation from BIOS to EFI. Trying to
> > edit the entries in UEFI’s Boot Manager with `efibootmgr`, I got the error:
> >
> >     EFI variables are not supported on this system
> >
> > `sudo modprobe efivarfs` fails with
> >
> >     No such device
> >
> > After several tries, I found
> >
> >     [    0.000000] efi: No EFI runtime due to 32/64-bit mismatch with
> > kernel
> >
> > logged by Linux, and then I found the Stack Overflow thread *How could
> > 32bit kernel read efivars from 64bit UEFI?* [1].
> >
> > I would have thought, setting EFI variables is just directly writing to
> > some storage. But probably not.
> >
> > Could the error message for the efivarfs load failure be improved, that
> > *device* means the runtime service (if I am not mistaken)?
> >

Not sure what you are asking for here. The efivarfs module fails with
-ENODEV if EFI runtime services are not supported by the kernel (for
whatever reason), and it is actually modprobe in user space that
prints glibc's default error string for ENODEV.

What we could do is print something to the kernel log when this
situation occurs, in addition to the current behavior of modprobe,
which is difficult to change.

Patches welcome.

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

end of thread, other threads:[~2021-05-11 22:07 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-11 20:55 efivarfs fails with `No such device` when EFI runtime is missing Paul Menzel
2021-05-11 20:58 ` Paul Menzel
2021-05-11 22:06   ` Ard Biesheuvel

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.