Dualboot Ubuntu/Windows: "Error: file '/EFI/Microsoft/Boot/bootmgfw.efi' not found"

Dualboot Ubuntu/Windows: "Error: file '/EFI/Microsoft/Boot/bootmgfw.efi' not found"

我有一个双启动系统,在一块硬盘上安装了 Ubuntu 20.04 和 Windows 10。过去 4 周,一切都运行良好,直到一个小时前:

当我尝试从 GRUB 启动 Windows 时突然出现此错误:

error: file '/EFI/Microsoft/Boot/bootmgfw.efi' not found

我能做些什么来解决这个问题?

到目前为止我尝试并检查的内容:

  • 更新 grub
  • 检查了给定的文件:它确实存在!并且它的大小为 1558328 字节,因此它不是空的
  • 关注此回答并尝试了启动修复以及 Rescatux(重新安装 Mictrosoft Windows UEFI)

这里这是 boot-pair 分析我的当前启动设置的报告。

到目前为止,这些尝试都没有解决问题。有人有解决方案吗?或者至少有办法尝试一下吗?

[编辑]

到目前为止,我所取得的成果是能够使用 UEFI 再次启动这两个操作系统。在启动时按 DEL 键,我可以使用 UEFI 的启动菜单启动 grub(然后从那里启动 ubuntu)或启动 windows。但是当启动 grub 并尝试从那里启动 windows 时,我仍然收到相同的错误消息。这里这是 boot-repair 分析的另一个启动报告。如第 97 行所示

Boot0011* (Rescapp) bootmgfw.efi    HD(1,GPT,84e08278-2d18-4a4c-9885-fde204e033e6,0x800,0x32000)/File(\EFI_PRE_RESCATUX_2020-09-01-20-46-59\Microsoft\Boot\bootmgfw.efi)

UEFI 上有一个条目用于启动 Windows。但该条目使用 EFI 的备份来启动 Windows。GRUB 反而使用较新的文件来尝试启动 Windows,如您在 grub.cfg 文件中看到的:

### BEGIN /etc/grub.d/30_os-prober ###
menuentry 'Windows Boot Manager (on /dev/sda1)' --class windows --class os $menuentry_id_option 'osprober-efi-92CE-E05A' {
    insmod part_gpt
    insmod fat
    set root='hd0,gpt1'
    if [ x$feature_platform_search_hint = xy ]; then
      search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt1 --hint-efi=hd0,gpt1 --hint-baremetal=ahci0,gpt1  92CE-E05A
    else
      search --no-floppy --fs-uuid --set=root 92CE-E05A
    fi
    chainloader /EFI/Microsoft/Boot/bootmgfw.efi
}
set timeout_style=menu
if [ "${timeout}" = 0 ]; then
  set timeout=10
fi
### END /etc/grub.d/30_os-prober ###

我虽然只是换个路线

/EFI/Microsoft/Boot/bootmgfw.efi

/EFI_PRE_RESCATUX_2020-09-01-20-46-59/Microsoft/Boot/bootmgfw.efi

但文件顶部说您不应该编辑此配置文件,所以我不敢这么做。这会破坏任何东西吗?为什么只有备份版本有效,而最新版本无效?我的整个启动设置对我来说看起来有点混乱。

答案1

它对我有用。

  1. 创建可启动的 Windows 10 USB。
  2. 从启动菜单中选择 USB。
  3. “修复您的计算机”> 故障排除> 启动修复。
  4. 完毕

这将需要几秒钟。:)

答案2

我遇到了与 Tayfe(最顶部的帖子)同样的问题,突然当我从 grub 启动菜单中选择 Windows 10 时,弹出此错误“错误:未找到文件‘/EFI/Microsoft/Boot/bootmgfw.efi’”。

我尝试按照上述方法编辑 grub.cfg 文件,但没有帮助。

当我使用文件资源管理器浏览该位置时,efi 文件就在那里,只是在启动期间找不到它。

我修复它的方法是(首先从启动菜单禁用安全启动)(编辑)

1.创建可启动的 Windows 10 USB

1a.从 Windows 官方网站下载 Windows 10 iso。

1b.使用 balenaEtcher(这是我为 ubuntu 找到的唯一 rufus 替代品)创建可启动的 Windows 10 媒体。

  1b1.First format the usb.

  1b2.Then using Gparted(in device tab in Gparted) create a new partition table (type of partition == GPT ).

  1b3.then created a new partition of fat32 type(allocated all the space to this partition so there is only a single partition on the usb)

1bc. 使用 balena 蚀刻机将 windows 10 iso 文件蚀刻到这个 usb 上(它给出了一个关于 iso 的警告,说它可能无法被识别,请忽略它(我这样做了))。

2.现在,一旦您拥有可启动的 Windows 10 USB,请重新启动电脑,当您在 grub 启动菜单中时按 c 进入命令行。

3.按 ls。

4.它将显示电脑上的所有硬盘。

5.我的 usb 是 (hd0)(你的可能看起来不同,但你可以先在不插入 usb 的情况下执行“ls”部分,然后在插入 usb 的情况下再次执行该操作来找到它)或像下一步一样

6.查看硬盘的详细信息(例如,对于(hd0),执行“ls (hd0)”,它将显示详细信息,通过比较大小和名称,我知道这是我的可启动 USB,例如,对于(hd1,msdos)运行“ls (hd1,msdos)”,像这样)。

7.现在运行“set root=(hd0)”,您的“(hd0)”部分可能不同。

8.现在运行“ls -l /”

9.这将显示根目录(即 USB)上的所有文件

10.如果有“efi”DIR,则一切正常,您可以继续操作。

11.now just check "ls -l /efi/boot/" has an efi file or not mine showed me a file bootx64.efi when i ran this command.

12.You can also make sure your path "/efi/boot/bootx64.efi" is a correct path by opening the usb in ubuntu first and going to this path from the file explorer to check everything

13.So after the run root=(hd0) command, run this command "chainloader /efi/boot/bootx64.efi"

14.then if the command ran okay, run "boot".

15.this will boot into windows 10 installation, follow this link (https://www.thewindowsclub.com/boot-or-repair-windows-10-using-the-installation-media) from step number 3 or the instructions below

15a When you boot from the USB drive, it will kickstart Windows 10 installation. Do not have a craving to keep hitting next, or you will end up installing Windows. On the first installation screen, look for a link “Repair your computer.” Click on it. It will boot your computer into Advanced Recovery.

15b When at the advanced troubleshooting, select Advanced Options. Select Troubleshoot. Under Advanced options screen, you will see Startup Repair. Click on it and follow the instructions.

16.I followed all this and my error was fixed, hope the same happens for you.

答案3

I'm not sure whats the exact way to solve this problem. But I tried a few thing and finally came up with a solution! So at least a small summarize:

At some point I felt like I had completely messed up the UEFI. When booting the laptop mouse and keyboard were flashing once before they turned them self off again just before even GRUB or UEFI could be loaded. And when trying to boot from a USB stick I also got stuck with a blank screen. So I decided to simply reset the UEFI to factory standards. This solved the problems with mouse, keyboard and USB stick!

To solve the actual problem

error: file '/EFI/Microsoft/Boot/bootmgfw.efi' not found

I decided to give it a try and edit /boot/grub/grub.cfg as mentioned in my first post. I changed just this one single line, nothing else! This made it working for me! So now I can boot into Ubuntu and Windows 10 again from GRUB. The only thing I'm actually wondering about is where I got this file at /EFI_PRE_RESCATUX_2020-09-01-20-46-59/Microsoft/Boot/bootmgfw.efi from. Yes it looks a lot like Rescatux is responsible for this but I don't know exactly what I did that rescatux created this backup file.

Good luck if you're facing a similar problem! :)

答案4

Here's a much simpler alternative. It worked like a charm for me and can probably save thousands of other desperate souls.

  1. Download this file and save it in the Downloads folder.

  2. Save your Home Path in /tmp/home.txt:

    echo "$HOME" > /tmp/home.txt
    
  3. Export variable HOMEOLD:

    export HOMEOLD=$(cat /tmp/home.txt)
    
  4. Copy .tar.gz file to EFI directory:

    sudo cp $HOMEOLD/Downloads/WindowsBoot.tar.gz /boot/efi/EFI
    
  5. Enter the EFI directory:

    cd /boot/efi/EFI
    
  6. Decompress .tar.gz file:

    sudo tar -xzf WindowsBoot.tar.gz
    
  7. Delete .tar.gz file:

    sudo rm WindowsBoot.tar.gz
    
  8. Reboot and voilà!

    sudo reboot
    

Credit to Vinicius Rolins, a random Brazilian YouTuber who shared this solution in his channel, he also published a tutorial in Portuguese),..

相关内容