burzumishi / linux-baytrail-flexx10

Install GNU/Linux on NextBook Flexx 10.1
GNU General Public License v2.0
82 stars 18 forks source link

Warning for grub users and UEFI #21

Closed ghost closed 7 years ago

ghost commented 7 years ago

I'll leave out the gory details about my recent education in UEFI and skip to the point.

(This is relevent to our tablets, as our UEFI isn't completely compatible with efibootmgr. See below for a tool that is.)

The Debian (at least) grub packages invoke efibootmgr to install an entry for grub into the UEFI NVRAM. When this occurs, efibootmgr writes a log entry into a mailbox in the NVRAM. This mailbox will eventually fill up after grub has been updated several times (as is the case with a testing disto.). efibootmgr isn't properly checking to see if the grub entry exists (on our hardware - its an EFI implementation bug), so it deletes it, writes to the mailbox, then finally writes the grub entry into NVRAM. You can see where the problem is - the log entry is larger than the boot entry, so grub disappears from the boot menu with no chance of efibootmgr restoring it. Once the NVRAM is in this state, the tools in the distro won't work, and you need a bigger hammer --

To prevent (or fix this), you should go into /sys/fs/pstore and delete everything there (it is safe to do).

If you find yourself in this state, read this entire page to find out how to get out of it: https://wiki.archlinux.org/index.php/Unified_Extensible_Firmware_Interface

nicman23 commented 7 years ago

this is a debian bug. We cannot do anything to change that behaviour. Please file a bug on debian tracker.

ghost commented 7 years ago

Just consider it a friendly FYI --

Any distro that uses efibootmgr (that's all, AFAIK), with either NextBook will get hit with this eventually if you don't monitor the pstore directory. The NextBook fw doesn't respond correctly to EFI commands which deal with file management of the mailboxes.

Tuxman2 commented 7 years ago

Have you got encounter this message ?

blockdev: ioctl error on BLKROSET: Operation not permitted

I've got this message each time I make a sudo update-grub.