mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* barebox on EFI bios and secure boot
@ 2024-08-08  9:45 giorgio.nicole
  2024-08-12 12:09 ` Ahmad Fatoum
  0 siblings, 1 reply; 2+ messages in thread
From: giorgio.nicole @ 2024-08-08  9:45 UTC (permalink / raw)
  To: barebox



Hi,

I use barebox to boot a linux kernel on an Intel atom based PC with an EFI bios and this just works.

Now I wanted to configure the bios to enable the secure boot mode: this means I tried to write some
EFI variables (db, dbx, KEK, PK); for this I used the efitools utils (efi-updatevar for example) but it didn't
worked: I always get an 'Invalid argument' error.

After some unsuccessful tries I booted the linux kernel directly from the bios, without barebox and in this
case the efi-updatevar tool worked as expected; so I suppose that starting barebox has some kind of effect
on the persistent store for the efi vars.

Does anyone have similar issues or a suggestion about what can be checked to fix this ???

thank you,

giorgio





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

* Re: barebox on EFI bios and secure boot
  2024-08-08  9:45 barebox on EFI bios and secure boot giorgio.nicole
@ 2024-08-12 12:09 ` Ahmad Fatoum
  0 siblings, 0 replies; 2+ messages in thread
From: Ahmad Fatoum @ 2024-08-12 12:09 UTC (permalink / raw)
  To: giorgio.nicole, barebox; +Cc: Christian Melki

Hello Giorgio,

On 08.08.24 11:45, giorgio.nicole@arcor.de wrote:
> I use barebox to boot a linux kernel on an Intel atom based PC with an EFI bios and this just works.
> 
> Now I wanted to configure the bios to enable the secure boot mode: this means I tried to write some
> EFI variables (db, dbx, KEK, PK); for this I used the efitools utils (efi-updatevar for example) but it didn't
> worked: I always get an 'Invalid argument' error.

In this case, neither barebox or the kernel are signed, right?

> After some unsuccessful tries I booted the linux kernel directly from the bios, without barebox and in this
> case the efi-updatevar tool worked as expected; so I suppose that starting barebox has some kind of effect
> on the persistent store for the efi vars.

I am not familiar with UEFI secure boot, so I don't know if there is some lock
down happening here or what could cause this.

Some things to try:

 - Are other variables writable?
 - Can you write this variable from barebox? wecho -o /efivars/your-variable
   or memcpy -d /efivars/some-variable

> Does anyone have similar issues or a suggestion about what can be checked to fix this ???

Christian (CC'd) mentioned a while ago that he had a secure booting UEFI system.
I asked him on IRC and he mentioned using lockdown.efi for lock down back then.

Hope this helps and let me know how it goes.

Cheers,
Ahmad

> 
> thank you,
> 
> giorgio
> 
> 
> 


-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |



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

end of thread, other threads:[~2024-08-12 12:12 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-08-08  9:45 barebox on EFI bios and secure boot giorgio.nicole
2024-08-12 12:09 ` Ahmad Fatoum

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