53

I have a MacBook Pro and only use Ubuntu on it. I just upgraded from 18.04 to 20.04.

Now when I start the computer it says:

Failed to Set MokListRT: Invalid Parameter
Could not create mokListRT: Invalid Parameter
Importing MOK states has failed: import_mok_state() failed: Invalid Parameter
Continuing boot since secure mode is disabled.

Does anyone know EXACTLY how I can fix this?? Step-by-step process I don't want to mess anything up trying to fix this.

4
  • For reference, here is a bug report.
    – Alexey
    Nov 6, 2020 at 10:23
  • A possible duplicate with an accepted answer: How do I fix broken boot after shim update?.
    – Alexey
    Nov 6, 2020 at 10:27
  • 2
    I answered this question at askubuntu.com/a/1299955/389062. Your question is pretty much a duplicate of the one that was asked there, except that in your case you see the MOK List error message while the other question only mentions a blinking _ instead of the MOK List error message. But the source of the problem is fundamentally the same: shimx64.efi (a signed / "MOKlisted" Secure Boot version of grubx64.efi) being used in a computer whose EFI's Secure Boot mode is disabled and, therefore, requires grubx64.efi instead. Dec 14, 2020 at 11:33
  • I had a similar issue with my 13" mid-2009 Apple Macbook Pro and solved it by doing what I explain here Jan 6, 2021 at 12:21

3 Answers 3

56

You have to replace shimx64.efi with grubx64.efi as follows:

sudo su -
cd /boot/efi/EFI/ubuntu
cp grubx64.efi shimx64.efi
reboot
9
  • 1
    Point of reference for others. This does not work for the same error message on a 2010 iMac (coreDuo). The error may be more subtle or the older machine may need an even older version of grub. Oct 10, 2020 at 0:55
  • 1
    this works also on MacBook Air 2015 model, You are awesome sir, thank you
    – GGEv
    Oct 18, 2020 at 16:11
  • 1
    In KDE neon, the directory named above exists but does not contain the files. They are in /boot/efi/EFI/neon. i removed packages shim and shim-signed afterwards.
    – mak
    Nov 22, 2020 at 21:06
  • 11
    This fix works, but only until the next system update re-installs shimx64.efi. The "permanent" fix for me was to remove "shim" and "shim-signed" (sudo apt remove --purge shim shim-signed) and then reinstall-grub (sudo update-grub2). Dec 5, 2020 at 11:46
  • 2
    How do I do this if I can't boot into an OS with a shell? I'm just stuck in a grub shell Feb 8, 2021 at 11:28
10

This is caused by Bug #1867092 and the proposed workaround (see comment #23) is:

apt-get purge shim
grub-install /dev/sda1 #replace sda1 with the correct grub partition for you

That solution worked for me.

Note that the best voted answer to this question, which is copying grubx64.efi over shimx64.efi, will be undone with each shim update according to that bug page.

2
  • This worked great for me
    – Mr.Young
    May 16, 2021 at 11:01
  • I tried sudo update-grub2 /dev/sda1 (as mentioned in a comment to another answer), but that did not work. sudo grub-install /dev/sda1 (as specified in this answer) did the trick though.
    – zrajm
    May 24, 2021 at 11:14
9

Solution that works on my 2010 iMac. Install rEFInd and make sure to boot from the option that specifies grubx64.efi.

2
  • 1
    This worked and it was as simple as sudo apt install refind .
    – hackerb9
    Feb 18, 2021 at 0:40
  • 1
    well the message MokListRT: Invalid Parameter disappear by installing reFind, I still not sure this is the best solution, as my system is not multi-OS, reFind is simply useless otherwise than hidding the message.
    – JOduMonT
    Mar 18, 2021 at 17:40

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .