我的机器上安装了 Windows 10。当我决定也使用双启动安装 Fedora 23 时,Fedora 工作正常,但当我尝试启动 Windows 10 时遇到了问题。
在 grub 启动菜单中没有启动 Windows 的选项。我试图在互联网上找到解决方案,我发现这是一个常见问题,解决方案是更改文件/etc/grub.d/40_custom
并将其添加到 grub 配置中,使用grub2-mkconfig -o /boot/efi/EFI/fedora/grub.cfg
.完成后,启动菜单中会出现一个 Windows 条目,但当我尝试启动它时,收到以下错误:
error: file `/EFI/Microsoft/Boot/bootmgfw.efi' not found.
error: you need to load the kernel first.
fdisk -l
给出以下输出:
Disk /dev/sda: 232.9 GiB, 250059350016 bytes, 488397168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 4100E3EC-6448-11E4-825E-18CF5E1C1030
Device Start End Sectors Size Type
/dev/sda1 2048 1845247 1843200 900M Windows recovery environment
/dev/sda2 1845248 2050047 204800 100M EFI System
/dev/sda3 2050048 2312191 262144 128M Microsoft reserved
/dev/sda4 2312192 352907181 350594990 167.2G Microsoft basic data
/dev/sda5 352907264 353875967 968704 473M Windows recovery environment
/dev/sda6 353875968 354899967 1024000 500M Linux filesystem
/dev/sda7 354899968 414562303 59662336 28.5G Linux LVM
Disk /dev/sdb: 698.7 GiB, 750156374016 bytes, 1465149168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: dos
Disk identifier: 0x96551baf
Device Boot Start End Sectors Size Id Type
/dev/sdb1 2048 1269832126 1269830079 605.5G 7 HPFS/NTFS/exFAT
/dev/sdb2 1269833726 1465147391 195313666 93.1G 5 Extended
/dev/sdb5 1269833728 1465147391 195313664 93.1G 83 Linux
Partition 2 does not start on physical sector boundary.
Disk /dev/mapper/fedora-root: 10.5 GiB, 11219763200 bytes, 21913600 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/mapper/fedora-swap: 3 GiB, 3217031168 bytes, 6283264 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/mapper/fedora-home: 15 GiB, 16106127360 bytes, 31457280 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
所以我认为在文件中,我必须像这样40_custom
放置驱动器的ID :/dev/sda2
#!/bin/sh
exec tail -n +3 $0
# This file provides an easy way to add custom menu entries. Simply type the
# menu entries you want to add after this comment. Be careful not to change
# the 'exec tail' line above.
menuentry 'Microsoft Windows 10' {
search --no-floppy --fs-uuid --set=root '4784-075F'
chainloader /EFI/Microsft/Boot/bootmgfw.efi
boot
}
我尝试使用uuid
和(如上)并使用驱动器的名称,但我仍然遇到相同的错误。
如果您需要一些额外信息,请询问!我用了这个话题尝试修复它,但没有帮助。