94

I tried to install Ubuntu 18.10 on my XPS 15 9570 earlier. Everything was working fine until I got to the partition selection part of the installation. That's when the installer crashed and I had to shut down my machine. I think it's because I had my SATA configuration set to RAID ON instead of AHCI, which is now fixed.

Now when I try to run the installer from my bootable USB I get the following error

Failed to open \EFI\BOOT\mmx64.efi - Not Found
Failed to load image \EFI\BOOT\mmx64.efi: Not Found
Failed to start MokManager: Not Fond
Something has gone seriously wrong: import_mok_state() failed

Hoping someone might have some idea as to what is going on

6

11 Answers 11

95

I booted an Ubuntu Live USB stick, went into my hard disk drive's /boot/efi folder and renamed the file grubx64.efi to mmx64.efi

Reboot the machine and it should work.

16
  • 5
    2 hours googling before I found this! thanks. Oct 25, 2018 at 1:23
  • 2
    This does not help much since the boot drive is read only by default. There are significant hoops to jump through to be able to modify these files.
    – gnomed
    Feb 26, 2019 at 21:05
  • 4
    @gnomed There is a second FAT partition with the same layout (efi/boot). I managed to boot the USB stick by renaming the file accordingly. Mar 12, 2019 at 20:40
  • 2
    I have created a bootable of ubuntu 18 using Ubuntu Disk Creator application. I am trying to rename the file but the problem is the drive is read-only. How to rename it in that situation? Sep 22, 2019 at 9:00
  • 2
    had the same problem with a DELL G5 15 5590. the FIX was to rename the grubx64.efi to mmx64.efi on the (second) small EFI partition in /efi/boot (just 2.4 M) on the USB drive, which is full to 100%. this 2nd partition had to be mounted by hand sudo mount /dev/sdX2 /mnt/tmp. renaming or copying on the large partition (2.1G) didn't work as it is a mounted isoimage on Ubuntu bionic and strictly read-only.
    – qbit
    Apr 9, 2020 at 17:47
47

The problem was that in the bootable USB the file mmx64.efi didn't exist, so the workaround was to copy the file grubx64.efi under the name mmx64.efi (so the USB Drive folder /EFI/BOOT now contains three files: BOOTx64.EFI, grubx64.efi and mmx64.efi). Then, reboot and the installation should work.

I created the USB bootable drive from Windows 10 with Rufus.

The copying can be done using any file editor on the same or another computer, if the default settings have been used in Rufus for the USB drive.

3
  • 5
    well, that's basically what the accepted answer suggested. But copying the file rather than just mv'ing it is almost certainly a better idea... If you want to thank another answer, you can just upvote it (this is recorded even if you don't have enough reputation to impact the score). If you want to improve it, you can suggest an edit. I'm not voting to delete your post, as it might possibly be useful as is. But please try to avoid duplicating information on SE sites by posting similar answers.
    – Zanna
    Dec 3, 2018 at 16:11
  • 2
    @Zanna, this is different than the accepted answer. This answer suggested using usb drive's /efi/boot folder, while the accepted answer used /boot/efi folder after logging into the live usb stick's ubuntu system. In my case, I do not have grubx64.efi under /boot/efi on the live usb stick's ubuntu. But I do have grubx64.efi under /efi/boot on the usb drive's iso. So this answer is the correct solution, but not the accepted answer.
    – Xiangyu
    Dec 13, 2019 at 16:55
  • This answer just saved me after hours of debugging. The important sentence was I created the USB bootable drive from Windows 10 with Rufus. I first tried it by modifying the ISO under another Linux and writing that ISO to the USB, but that still didn't work when I tried to boot. Only modifying the FAT formatted USB stick created by Rufus worked.
    – Bianfable
    May 13, 2020 at 5:02
26

The answers here all suggest modifying the file system on the live USB, which isn't really possible without rebuilding the entire ISO image as far as I have understood.

I think the reason my problem, and the OP's problem, occurred was that we checked the box for installing third-party software in the installer, and subsequently checked the box for managing secure boot through MOK as required, but were then unable to finish the installation and left the computer in a state where it was expecting to boot the MOK manager on the next boot with a path that exists in the Ubuntu system, but not on the Live USB.

To solve this I did a strange work around. I followed the instructions for installing Ubuntu through Wubi as provided here, and then, after restarting my computer, Wubi managed to launch the MOK manager and although I didn't perform any MOK management it seems like this stopped the computer from expecting to find a MOK manager on startup, and when I tried to boot from USB afterwards it suddenly worked. Afterwards I just deleted the Wubi install and all the Wubi files and installed Ubuntu the normal way using the Live USB.

I could be wrong about my assumptions in this answer, but after trying several USBs and many different Ubuntu ISO images, this was what finally did the trick.

Note: What I described in this answer requires that you have Windows installed, which you may not. If you don't, you might be able to solve it in a similar way by booting a system that has GRUB and the MOK manager on it.

2
  • 1
    The thing about third-party software is exactly what happend in my case. But note that you do not have to rebuild the ISO image. Once the bootable USB drive is created, you can just edit its contents.
    – ke.
    Aug 27, 2019 at 20:29
  • 1
    This just happened to me on a Razer Blade laptop with Windows 10. Unfortunately WUBI doesn't support Windows 10, so now I'm not sure what to do, as the Ubuntu Live USB won't boot any more. Any idea where to find a bootable GRUB+MOK image that can be used to fix this? I assume the half-disabled secure boot can't be fixed (or even cancelled) from anywhere else in the laptop or BIOS? Dec 31, 2019 at 1:40
6

I faced the same problem with the same error message when installing Ubuntu 18.04.2 LTS on my Acer Aspire V 17 Nitro Black Edition. The proper solution for me was to turn on secure boot again and to add the \EFI\BOOT\grubx64.efi (located on the Ubuntu installation USB medium) to the trusted .efi list in my BIOS (F2) and turned the secure boot off again. Afterwards I rebooted and called the the boot manager via F12 there I was able to select the trusted efi file. This invoked grub and I just needed to select install Ubuntu to start the installation.

4

Secure Boot with third party drivers checked/enabled during Install requires registering new MOK into UEFI at reboot. Ubuntu installer does this by registering some Mok* EFI variables before it has actually finished creating the EFI System Partition for your new Ubuntu installation. If the Installer is interrupted before it is finished, we need to remove two Mok* EFI variables:

Variable NV+RT+BS '605DAB50-E046-4300-ABB6-3DD810DD8B23:MokAuth' DataSize = 0xAC
Variable NV+RT+BS '605DAB50-E046-4300-ABB6-3DD810DD8B23:MokNew' DataSize = 0x3C5

Run the following two commands from the UEFI (Internal) Shell:

dmpstore -d -all MokAuth
dmpstore -d -all MokNew

Now when you reboot with your Ubuntu installation media, you should no longer get the "Failed to open \EFI\BOOT\mmx64.efi - Not Found" error.

If your Secure Boot signed Internal Shell does not have the dmpstore command (or you do not have an Internal Shell option), you will have to temporarily disable Secure Boot and use a different Shell (e.g., Copy https://github.com/tianocore/edk2/blob/UDK2018/ShellBinPkg/UefiShell/X64/Shell.efi to a USB_flash_drive at /EFI/Boot/bootx64.efi and boot it).

Update: For a Secure Boot enabled solution: boot https://clonezilla.org/downloads/download.php?branch=alternative "alternative amd64" with Secure Boot enabled. Enter_shell command line prompt. cmd Enter command line prompt. Run:

sudo chattr -i /sys/firmware/efi/efivars/Mok{Auth,New}
sudo rm /sys/firmware/efi/efivars/Mok{Auth,New}

Ref: https://bugs.launchpad.net/ubuntu/+source/grub2/+bug/1798171/comments/51

4
  • 2
    The bug has now been fixed in Ubuntu 19.10, so you can just use that. If you start the 19.10 installer, check the third party drivers box, and then cancel the installation, the installer will fix the variables itself. After doing that, my 18.04 USB stick began working again. Thanks for the help!
    – cgmb
    Dec 6, 2019 at 8:34
  • @cgmb Touché! Thank you!
    – fabiomaia
    Feb 22, 2020 at 17:14
  • How do you access this UEFI shell? Mar 3, 2020 at 11:54
  • @Dustin Michels: Copy github.com/tianocore/edk2/blob/UDK2018/ShellBinPkg/UefiShell/… to a USB_flash_drive at /EFI/Boot/bootx64.efi and boot it. Secure Boot must be disabled because Microsoft will never sign any Shell program.
    – rcpa0
    Mar 25, 2020 at 18:41
3

This happens because windows gets a chance to run first, runs its updates and turns on secure boot in the bios. You need to go into bios and turn it off. During ubuntu installation it will ask to turn it on if you install 3rd party drivers.

Windows just Hellen Keller's your BIOS and lets you figure out what it messed up.

2

I had the same problem. Creating an UEFI-only bootable USB did the trick for me. Here're the instructions.

More information about the UEFI bootable on Ubuntu.

1
  • 3
    Please edit your answer to include the actual steps to the solution (+ linnks) rather than just links
    – j-money
    Mar 27, 2019 at 10:07
1

I ended up installing JackHack96's Ubuntu 18.04 respin for the XPS 15 and then upgrading to 18.10

1

For me, the following worked.

  1. Keep the secure boot on

  2. Go to BIOS by pressing F2 during boot, then go to Boot using arrow keys. Click on UEFI Hard Disk Drive BBS Priorities

                 Aptio Setup Utility - Copyright (C) 2014 ...
      Main  Advanced  Chipset  Feature | Boot | Security ...
    ---------------------------------------------------------
      Boot Configuration
    
      Bootup NumLock State  [On]
      Quiet Boot            [Enabled]
    
      Set Boot Priority
      Boot Option #1        [USB Key]
      Boot Option #2        [CD/DVD]
      Boot Option #3        [Hard Disk:ubuntu]
      Boot Option #4        [USB CD/DVD]
      Boot Option #5        [USB Hard Disk]
      Boot Option #6        [Network]
    
    > UEFI Hard Disk Drive BBS Priorities
    
    ---------------------------------------------------------
                 Version 2.15.1236. Copyright (C) 2014 ...
    

    Transcribed from: BIOS screenshot 1

  3. Then, you get to this screen:

                 Aptio Setup Utility - Copyright (C) 2014 ...
                                     | Boot |
    ---------------------------------------------------------
      Boot Option #1        [ubuntu]
      Boot Option #2        [UEFI OS (P0: SAMSUN...]
      Boot Option #3        [ubuntu (P0: SAMSUNG...]
    
    ---------------------------------------------------------
    

    Transcribed from: BIOS screenshot 2

    Here make sure that Boot Option #1 is selected as ubuntu

Note: Not sure if this will create issues if you have dual boot with Windows. In my case, I only have Ubuntu! Also, as suggested by Fransisco, I copied grub64.efi to mmx64.efi to make it boot.

1

I used PowerISO for Linux to modify the ISO and copy grubx64.efi to mmx64.efi inside \EFI\BOOT\ directory.

1
  • This did not work for me. I had to rename the file directly in the USB drive, which I could only do on Windows. Apr 21, 2020 at 7:03
0

i solved the problem by following this page: https://www.pcwelt.de/ratgeber/So-klappt-der-Multiboot-mit-Windows-Linux-Doppel-OS-9666313.html

Ok, its written in german, so i will translate the part, which solved my problem: in the boot menue, and there the boot options, you have to search for somthing like "CSM"; "Launch CSM"; "UEFI and Legacy". This option has to be enabled. The boot mode has to be on "Auto".

After this, i could boot from ubuntu-cd. but only overwrite the preinstalled windows 10...which wasnt a real lose.

You must log in to answer this question.

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