Menu

Can't get rEFInd to run - efibootmgr - EFI variables are not supported on this system

2016-01-27
2016-02-02
  • Martin Kennedy

    Martin Kennedy - 2016-01-27

    I'm having trouble to get my computer to boot. I have a Liva X, which is an Atom-based (Bay Trail) computer running UEFI and an eMMC drive.

    I need to install a 32-bit operating system. Only a few support UEFI installs, and the best luck I've had is with SparkLinux. It's the only distribution that has installed without crashes. Unfortunately, it won't reboot after it installs. I get it to run by typing this at the Grub> prompt:

    set root=(hd0,gpt2)
    linux (hd0,gpt2)/boot/vmlinuz-4.3.0-1-686 root=/dev/mmcblk0p2
    initrd /boot/initrd.img--4.3.0-1-686
    boot

    Then SparkLinux boots.

    I should note that I have been able to install a few 64-bit linux operating systems, like recent versions of Ubuntu and Mint. I ahve been able to get Ubuntu 15 mostly installed by combining bits and pieces of three different distributions, but I end up with the same problem as above.

    I've noticed that when I first boot the computer the UEFI boot menu (not the Grub menu) has only two entries - one takes me to Setup UEFI, and the other says "UBUNTU", which I think is left over from some earlier experiments. The UBUNTU option dumps me to a Grub> prompt. I have been unable to find a utility that allows me to edit this.

    The specific problem with rEFInd is during the installation. It tries to load or run efibootmgr, which returns

    efibootmgr: EFI variables are not supported on this system.

    I've looked at information on this, and the suggestion is usually to try

    modprobe efivarfs

    That yields

    modprobe: ERROR: could not insert 'efivarfs': No such device

    I've tried both versions of rEFInd - the regular and the gnuefi version.

    The computer only has Linux installed on an ext4 partition. I have a small fat32 partition that is used to mount /boot/efi.

    Any ideas?

     

    Last edit: Martin Kennedy 2016-01-28
  • Roderick W. Smith

    On a properly-functioning EFI system, EFI variables are accessible via the /sys/firmware/efi/efivars and/or /sys/firmware/efi/vars directory trees. The efibootmgr utility, which displays, edits, deletes, and adds boot menu items, relies on one of these directories being present. The refind-install script, in turn relies on efibootmgr. So do tools used to install GRUB and other EFI boot loaders. The efibootmgr error message you're seeing is an indication that these EFI variables are not present on your computer. This can have a number of causes, including:

    • Relevant kernel modules are not loaded -- This is the cause that can be corrected by a modprobe efivars; however, this cause is quite rare today, since the relevant kernel module is usually built into the main kernel file. This cause might apply to some niche distributions that haven't yet implemented EFI support, though, or if they haven't done a good job of it.
    • You booted in BIOS mode -- This is the most common source of the problem. If you intend to boot in EFI mode, it's best to disable the Compatibility Support Module (CSM), as described here. If you boot via rEFInd (even on a USB flash drive), it should boot in EFI mode unless you edit the scanfor line or if you're booting on a Mac.
    • You booted in a cross-bit-depth manner -- If you booted a 32-bit kernel using a 64-bit EFI (and a 64-bit GRUB) or vice-versa, access to the EFI boot variables may be disrupted. This is the sort of configuration that's a nightmare to set up and maintain, from an EFI perspective, which is one reason I don't recommend doing this.
    • You passed kernel options to disable EFI variable access -- Some kernel options can disable access to the EFI variables. It's very rare to see such options in use, but it's conceivable your boot loader is set up this way. I don't recall the exact names of the options offhand, but they're pretty obvious, like noefi or some such. You could check your GRUB configuration file for such options.
    • Your firmware is messed up -- I've seen this one myself just yesterday with a development ARM64 board; the firmware on this board is so bleeding-edge that it's pretty much useless for normal purposes. This could be the case for you, too, if yours is a particularly exotic device.

    Overall, my suggestion is to avoid using weird systems, including just about anything with a 32-bit EFI, if you can avoid it. These systems are just so far from the mainstream that getting them to work will be an adventure or a nightmare, depending on your perspective. If you're up for such a challenge, then great; but if not, you'll end up ripping your hair out, since even experts like me may be unable to offer much in the way of advice. If there's a community for your hardware, and in particular for running Linux on your hardware, you may get better advice there.

     
  • Martin Kennedy

    Martin Kennedy - 2016-02-02

    Thanks for the detailed reply.

    Unfortunately (for me), I need to run a 32-bit version of linix on the Liva X for my application.

    Several of the suggestions don't apply to my particluar case - I'm not doing a cross-bit boot, I'm using UEFI, it's not in compatibility mjode and Secure Boot is disabled.

    I'm guessing that what I have is a poor implementation of UEFI, combined with a strange setup on the eMMC drive. There are three partitions or pseudo-partitions that are always there, but are unavailable using any tools I have, but that most of the more recent Linux install programs see:

    mmcblk0boot0, mmcblk0boot1, and mmcblk0rpmb

    In any case, it's very helpful to know that there's likely nothing I'm doing wrong. What I'm trying to do just isn't going to work, and I can quit spending time on it - and keep what remaining hair I have!

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.