1

After completing a command-line Ubuntu 17.04 to 17.10 upgrade from this link, I tried booting Ubuntu 17.04 from a live USB drive. Anticlimactically, I couldn't. I can still boot into the new Ubuntu 17.10 and Windows 8, both of which are installed on the hard drive. When I tried going into the UEFI configuration menu, I get that disconcerting message seen in the title: Error: could not set EFI variable 'OsIndications'

Using the application gnome-disks on Ubuntu 17.10, I can mount the partitions Recovery, Push Button Reset, and ESP, though ESP does not show up in nautilus.

I use live Ubuntu and live Kali Linux among other OS's frequently, and having no access to the UEFI menu cuts me off from using them anymore. Are there some commands or startup key sequences I can use to rescue the EFI partition, whatever it may be? I'm not eager to try to troubleshoot it myself as I'm aware how delicate the EFI is. Any help is greatly appreciated!

2 Answers 2

2

The EFI partition is fine, the problem is in firmware; however, there is a fix.

edit /etc/grub.d/30_uefi-firmware and remove the if/then/fi statement. I changed mine to read:

gettext_printf "Adding boot menu entry for EFI firmware configuration\n" >&2

cat << EOF
menuentry 'uefi-firmware' {
fwsetup
}
EOF

Then sudo update-grub, you should now have a UEFI firmware option in grub.

3
  • Can you be more specific as to where to insert the code? I tried replacing the if/then statement but sudo update-grub gave me an error (unexpected 'fi' or something). I changed it back because it seemed too risky with that error. Thanks!
    – user728899
    Oct 23, 2017 at 23:33
  • fi is the end if the if/then statement you didn't remove it. Make it look like mine. you are not inserting code, you are removing code.
    – ravery
    Oct 24, 2017 at 0:01
  • I changed the file and rebooted. Same error shows up. Still no way to boot into live Operating systems. However, I can get into the UEFI settings menu using boot-time key-presses (see below). Now it's just a problem with USB's. Thanks for the help anyways!
    – user728899
    Oct 25, 2017 at 0:56
0

You wrote:

When I tried going into the UEFI configuration menu

You did not specify how you tried entering the UEFI configuration menu, though. There are several ways to do this, including the following:

  • Boot-time keypress -- Most computers provide a keypress to enter the firmware setup utility. The most common options are Delete, F2, and Enter; however, there are others, and the key varies from one machine to another. Sometimes this is very finicky or won't work at all if the firmware's "fast start" option is enabled (or equivalently, if it's set to do minimal USB initialization).
  • Boot manager option -- Some boot managers, including GRUB and my own rEFInd, can optionally provide a menu entry to boot to the firmware setup utility. The way Ubuntu configures its GRUB menu, this option is absent by default. I haven't verified ravery's solution, but it looks correct as a way to enable it. IIRC, Boot Repair will also do so. If you were to install rEFInd, or launch it from a USB drive or CD-R, its option to do this (a second-row icon that looks like a stylized computer chip) should be present by default.
  • OS reboot-to-firmware option -- On recent versions of Ubuntu (those that use systemd), typing sudo systemctl reboot --firmware should reboot into the firmware setup utility. Windows 8 and later provide similar functionality; see here for details.

Note that the last two methods depend on the firmware supporting this feature, so they won't work on some computers. The error message you report sounds as if your firmware might not support the feature, but if you've entered the setup utility in the same way you're doing it in the past, that doesn't seem likely. In any event, I'd try one or both of the other methods that you're not using.

If you continue to have problems, then it could be that your NVRAM's contents have been damaged. This can sometimes be repaired by resetting the firmware to its defaults and/or by applying whatever firmware update may be available. Unfortunately, this creates a chicken-and-the-egg problem, since you must normally enter the firmware setup utility to reset its options or update the firmware. In an extreme case like this, you might use a fourth method:

  • Unplug all boot devices and power up -- If you turn off the computer and unplug all the disks and other bootable devices (which might include Ethernet cables on some networks), then when you power on the computer, it will find nothing bootable. It will normally go into the firmware setup utility at this point. The drawback is that some computers will then forget all their previously-working boot entries, so when you plug the disk back in, it might no longer boot, or it may boot straight to Windows, bypassing GRUB. Still, this method can be a useful last-resort option. (You can re-create the Ubuntu/GRUB boot entry in various ways, if necessary.)
1
  • I followed your boot key sequence suggestion and managed to get into the UEFI configuration menu! I enabled the F12 boot-menu and tried booting from the USB again. The flash drive still did not show up. The error seen in the title still shows up from system setup in the grub menu. But thanks for all the help getting into the UEFI settings menu!
    – user728899
    Oct 23, 2017 at 23:45

You must log in to answer this question.