On Mac OS X there is a tool called nvram to get and set EFI properties. As I am now deploying GNU/Linux on Apple hardware, I'd like to have a similar tool that is able to talk to Apple's EFI implementation.
Are there tools to achieve this?
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It only takes a minute to sign up.
Sign up to join this communityThe tools available are going to vary between Linux distributions, but with a Ubuntu 16.04 LTS live ISO booted from a USB stick on a 2011 MacBook Pro, nvram variables are readable in the filesystem:
ubuntu@ubuntu:~$ cd /sys/firmware/efi/efivars/
ubuntu@ubuntu:/sys/firmware/efi/efivars$ ls
AAPL,PathProperties0000-4d1ede05-38c7-4a6a-9cc6-4bcca8b38c14
AcpiGlobalVariable-af9ffd67-ec10-488a-9dfc-6cbf5ee22c2e
[...]
ThorUpdateResult-7c436110-ab2a-4bbb-a880-fe41995c9f82
Timeout-8be4df61-93ca-11d2-aa0d-00e098032b8c
ubuntu@ubuntu:/sys/firmware/efi/efivars$ hexdump -C Lang-*
00000000 07 00 00 00 65 6e 67 |....eng|
00000007
To modify variables, install the efivar
tool with apt
.
efivars
program available via package manager. However, if you took the (horrible!) advice offered by many - such as at this Ubuntu/Mac how-to - and converted your disk to a Hybrid MBR so you might boot Linux in legacy (read - BIOS) mode, then those variables are not available to you and will not be until you boot the Linux kernel in EFI-mode. Here is a far better tutorial on the subject.efivars
works, at least for reading. About all those Apple-Firmwares-Will-Be-Destroyed-Warnings... I never got authoritative information about that.efivars
?printf
andod
in a pinch. You might also look into theclover
bootloader forums - which is the other active refit fork and is what all of the hackintosh guys use. I am curious though and i may dig into it. Can i ask - what do you wanna do with them?