grub-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH RFC] Proposition of a --auto-nvram option for grub-install


From: Lukasz Zemczak
Subject: [PATCH RFC] Proposition of a --auto-nvram option for grub-install
Date: Thu, 12 Apr 2018 19:09:58 +0200

Hello everyone,

I'm writing to this list since I would like to get some feedback on an
additional option to the grub-install tool we would find very
convenient to have. The diff is attached to the e-mail (also available
as a pastebin [1]).

The idea of the --auto-nvram (the name is just a proposition) flag is
a bit similar to what --no-nvram does. After providing the option
during grub-install, the tool will attempt to guess if there is access
to NVRAM variables for EFI and/or IEEE1275 and, if yes, perform the
usual variable updates. If no access to the NVRAM is available the
whole thing is handled somewhat similar to --no-nvram + a warning
message displayed. Rationale:

We would like to use this in Ubuntu for cases of dual BIOS/EFI
bootloaders installed (at the same time), helpful for the situation of
calling grub-install --target=x86_64-efi from the shim-efi package on
a BIOS legacy-mode booted machine. For this legacy-mode case when
running on a EFI-enabled device, currently this causes grub-install to
fail as obviously there is no access to the NVRAM and no --no-nvram is
given. We don't want to unconditionally append --no-nvram as this is
not what we want to happen for the case of a system that is actually
booted in EFI-mode. With this flag, we would be simply performing a
grub-install --target=x86_64-efi --auto-nvram unconditionally which
would do the right thing in both cases, allowing for a much simpler
handling of this dual-bootloader case in Ubuntu. Having it being done
inside grub-installer makes everything much cleaner.

This is of course just a proposition about which I wanted to get some
feedback from people that know the codebase the most. It's my first
time working on the grub project so apologies for any flukes or
silliness in the code or the idea itself.

Thank you!

Best regards,

[1] http://paste.ubuntu.com/p/cWR3k3NZgF/

-- 
Ɓukasz 'sil2100' Zemczak
 Foundations Team
 address@hidden
 www.canonical.com

Attachment: auto-nvram.patch
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]