From: Andrew Udvare <audvare@gmail.com>
To: gentoo-user@lists.gentoo.org
Subject: Re: [gentoo-user] EFI booting problem - understanding it
Date: Thu, 2 Jul 2020 22:05:34 -0400 [thread overview]
Message-ID: <f4aaa4b6-2113-6fd2-7897-b22d83e43dd8@gmail.com> (raw)
In-Reply-To: <2538456.mvXUDI8C0e@peak>
[-- Attachment #1.1: Type: text/plain, Size: 1063 bytes --]
On 02/07/2020 06:56, Peter Humphrey wrote:
> But then,
> # bootctl set-default 30-gentoo-5.7.7.conf
> Failed to update EFI variable: Invalid argument
Probably the kernel is blocking write access to EFI. This is on purpose
for safety as you can damage your firmware quite easily. systemd-boot
and others do not have this restriction. You also should be careful
writing to the EFI too much as the NVRAM flash may not be of high quality.
https://lwn.net/Articles/674940/
You can try using `chattr -i` against the files like:
chattr -i /sys/firmware/efi/efivars/Boot*
Then you can try with bootctl and others, but this is not guaranteed to
work.
On my ASUS motherboard I haven't been able to write to EFI variables
from within Linux for a long time. I have to add my keys in the BIOS and
set the default in systemd-boot.
The logic to write to a file in efivars is here:
https://github.com/torvalds/linux/blob/master/fs/efivarfs/file.c#L15
If you use strace with bootctl you'll probably see one of these errno
values.
Andrew
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next prev parent reply other threads:[~2020-07-03 2:05 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-02 10:56 [gentoo-user] EFI booting problem - understanding it Peter Humphrey
2020-07-03 2:05 ` Andrew Udvare [this message]
2020-07-03 8:36 ` Michael
2020-07-03 14:52 ` Peter Humphrey
2020-07-03 20:57 ` Sid Spry
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=f4aaa4b6-2113-6fd2-7897-b22d83e43dd8@gmail.com \
--to=audvare@gmail.com \
--cc=gentoo-user@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox