我双启动 Windows 和 Fedora KDE。启动系统时,如果我选择 Windows Boot Manager,则会打印以下错误
error: ../../grub-core/commands/search.c:315:no such device: 7E79-F46D.
error: ../../grub-core/net/net.c:1552:disk 'hd1,gpt1' not found.
Press any key to continue...
如果我直接启动到 Fedora,它适用于 Fedora,但如果我先进入 Windows 启动管理器,然后按上述任意键,然后进入 Fedora,则会弹出以下窗口
error: ../../grub-core/net/net.c:1552:disk 'hd1,gpt1' not found.
error: ../../grub-core/loader/i386/efi/linux.c:258:you need to load the kernel first
Press any key to continue...
我尝试过不同的发行版(mint、manjaro、pop os),但问题仍然存在。不过我可以从 BIOS 启动菜单启动到 Windows。在线阅读后,我尝试使用 ubuntu 启动修复,它给出了以下输出:
boot-repair-4ppa203 [20230314_0920]
============================== Boot Info Summary ===============================
=> No boot loader is installed in the MBR of /dev/sda.
=> No boot loader is installed in the MBR of /dev/sdb.
sda1: __________________________________________________________________________
File system:
Boot sector type: -
Boot sector info:
sda2: __________________________________________________________________________
File system: ntfs
Boot sector type: Windows 8/10/11/2012: NTFS
Boot sector info: No errors found in the Boot Parameter Block.
Boot file info: Grub2 (v2.00) in the file
/Fedora-KDE-Live-x86_64-37-1.7.iso looks at sector 0
of the same hard drive for core.img, but core.img can
not be found at this location. Grub2 (v2.00) in the
file /linuxmint-21.1-cinnamon-64bit.iso looks at
sector 0 of the same hard drive for core.img, but
core.img can not be found at this location.
Operating System:
Boot files:
sda3: __________________________________________________________________________
File system: vfat
Boot sector type: FAT32
Boot sector info: No errors found in the Boot Parameter Block.
Operating System:
Boot files: /efi/BOOT/fbia32.efi /efi/BOOT/fbx64.efi
/efi/fedora/gcdia32.efi /efi/fedora/gcdx64.efi
/efi/fedora/grubia32.efi /efi/fedora/grubx64.efi
/efi/fedora/mmia32.efi /efi/fedora/mmx64.efi
/efi/fedora/shim.efi /efi/fedora/shimia32.efi
/efi/fedora/shimx64.efi /efi/fedora/grub.cfg
sda4: __________________________________________________________________________
File system: ext4
Boot sector type: -
Boot sector info:
Operating System:
Boot files: /grub2/grub.cfg
sda5: __________________________________________________________________________
File system: btrfs
Boot sector type: -
Boot sector info:
Operating System:
Boot files:
sdb1: __________________________________________________________________________
File system: vfat
Boot sector type: Windows 8/10/11/2012: FAT32
Boot sector info: No errors found in the Boot Parameter Block.
Operating System:
Boot files: /efi/Boot/bootx64.efi /efi/Microsoft/Boot/bootmgfw.efi
/efi/Microsoft/Boot/bootmgr.efi
sdb2: __________________________________________________________________________
File system:
Boot sector type: -
Boot sector info:
sdb3: __________________________________________________________________________
File system: ntfs
Boot sector type: Windows 8/10/11/2012: NTFS
Boot sector info: No errors found in the Boot Parameter Block.
Operating System: Windows 10 or 11
Boot files: /Windows/System32/winload.exe
sdb4: __________________________________________________________________________
File system: ntfs
Boot sector type: Windows 8/10/11/2012: NTFS
Boot sector info: No errors found in the Boot Parameter Block.
Operating System:
Boot files:
sdc: ___________________________________________________________________________
File system: iso9660
Boot sector type: Unknown
Boot sector info:
Operating System:
Boot files: /boot/grub/grub.cfg
================================ 1 OS detected =================================
OS#1: Windows 10 or 11 on sdb3
================================ Host/Hardware =================================
CPU architecture: 64-bit
Video: UHD Graphics 620 from Intel Corporation
Live-session OS is Ubuntu 64-bit (Boot-Repair-Disk 64bit 20200604, bionic, x86_64)
===================================== UEFI =====================================
BIOS/UEFI firmware: Q80 Ver. 01.23.00 from HP
The firmware is EFI-compatible, and is set in EFI-mode for this live-session.
SecureBoot disabled (confirmed by mokutil).
BootCurrent: 0006
Timeout: 0 seconds
BootOrder: 0008,0000,0006,0007,0005,0004,0002
Boot0000* Windows Boot Manager HD(1,GPT,e748a39c-9f78-44ed-8915-3765c578105b,0x800,0x32000)/File(\EFI\Microsoft\Boot\bootmgfw.efi)WINDOWS.........x...B.C.D.O.B.J.E.C.T.=.{.9.d.e.a.8.6.2.c.-.5.c.d.d.-.4.e.7.0.-.a.c.c.1.-.f.3.2.b.3.4.4.d.4.7.9.5.}...o....................ISPH
Boot0002* Intel Corporation: IBA CL Slot 00FE v0112 BBS(Network,Intel Corporation: IBA CL Slot 00FE v0112,0x0)/PciRoot(0x0)/Pci(0x1f,0x6)/IPv4(0.0.0.00.0.0.0,0,0)......ISPH
Boot0004* ST1000LM049-2GH172 BBS(HD,ST1000LM049-2GH172 ,0x400)/PciRoot(0x0)/Pci(0x17,0x0)/Sata(0,0,0)......ISPH
Boot0005* LITEON CV8-8E128-HP BBS(HD,LITEON CV8-8E128-HP ,0x400)/PciRoot(0x0)/Pci(0x17,0x0)/Sata(2,0,0)......ISPH
Boot0006* SanDisk Cruzer Force 03002509050721090403 PciRoot(0x0)/Pci(0x14,0x0)/USB(0,0)N.....YM....R,Y.....ISPH
Boot0007 USB: BBS(65535,,0x0)/PciRoot(0x0)/Pci(0x14,0x0)......ISPH
Boot0008* Fedora HD(3,GPT,ad025592-09c4-4d88-9663-fadfa21250a2,0x67ebc800,0x12c000)/File(\EFI\fedora\shimx64.efi)....ISPH
b023680fdcebf4a4b32618450f63fdd3 sda3/BOOT/fbia32.efi
9d035bba35672038e084af85e1b8d1df sda3/BOOT/fbx64.efi
33f35e43edabf2d5b94db33a2f8d2599 sda3/fedora/gcdia32.efi
a13472d919f98153986eed4d471285dc sda3/fedora/gcdx64.efi
7e4b520bf3912dcbf972c73dbb5fe531 sda3/fedora/grubia32.efi
8f52418dc2e07dded3570ae1a60f17cb sda3/fedora/grubx64.efi
7010d05a34cbf0c3e696df6a62f56015 sda3/fedora/mmia32.efi
bd6eccfe55c5ec7e206500ac01cb0cd4 sda3/fedora/mmx64.efi
88a7b0e2436865122255f78aa52edaec sda3/fedora/shim.efi
b6410a7309a1aa9a05df02ea1954c02d sda3/fedora/shimia32.efi
88a7b0e2436865122255f78aa52edaec sda3/fedora/shimx64.efi
b6410a7309a1aa9a05df02ea1954c02d sda3/BOOT/BOOTIA32.efi
88a7b0e2436865122255f78aa52edaec sda3/BOOT/BOOTX64.efi
20ac8dde00311476f3755604eb0e545a sdb1/Boot/bootx64.efi
20ac8dde00311476f3755604eb0e545a sdb1/Microsoft/Boot/bootmgfw.efi
27d382c5fc21df6f4a75baed05aa1d9d sdb1/Microsoft/Boot/bootmgr.efi
============================= Drive/Partition Info =============================
Disks info: ____________________________________________________________________
sda : is-GPT, no-BIOSboot, has---ESP, not-usb, not-mmc, no-os, no-wind, 34 sectors * 512 bytes
sdb : is-GPT, no-BIOSboot, has---ESP, not-usb, not-mmc, has-os, has-win, 2048 sectors * 512 bytes
Partitions info (1/3): _________________________________________________________
sda2 : no-os, 64, nopakmgr, no-docgrub, nogrub, nogrubinstall, no-grubenv, noupdategrub, farbios
sda3 : no-os, 64, nopakmgr, no-docgrub, nogrub, nogrubinstall, no-grubenv, noupdategrub, farbios
sda4 : no-os, 64, nopakmgr, no-docgrub, nogrub, nogrubinstall, no-grubenv, noupdategrub, farbios
sda5 : no-os, 64, nopakmgr, no-docgrub, nogrub, nogrubinstall, no-grubenv, noupdategrub, farbios
sdb1 : no-os, 64, nopakmgr, no-docgrub, nogrub, nogrubinstall, no-grubenv, noupdategrub, not-far
sdb3 : is-os, 64, nopakmgr, no-docgrub, nogrub, nogrubinstall, no-grubenv, noupdategrub, farbios
sdb4 : no-os, 64, nopakmgr, no-docgrub, nogrub, nogrubinstall, no-grubenv, noupdategrub, farbios
Partitions info (2/3): _________________________________________________________
sda2 : isnotESP, part-has-no-fstab, no-nt, no-winload, no-recov-nor-hid, no-bmgr, notwinboot
sda3 : is---ESP, part-has-no-fstab, no-nt, no-winload, no-recov-nor-hid, no-bmgr, notwinboot
sda4 : isnotESP, part-has-no-fstab, no-nt, no-winload, no-recov-nor-hid, no-bmgr, notwinboot
sda5 : isnotESP, part-has-no-fstab, no-nt, no-winload, no-recov-nor-hid, no-bmgr, notwinboot
sdb1 : is---ESP, part-has-no-fstab, no-nt, no-winload, no-recov-nor-hid, no-bmgr, notwinboot
sdb3 : isnotESP, part-has-no-fstab, no-nt, haswinload, no-recov-nor-hid, no-bmgr, notwinboot
sdb4 : isnotESP, part-has-no-fstab, no-nt, no-winload, recovery-or-hidden, no-bmgr, notwinboot
Partitions info (3/3): _________________________________________________________
sda2 : not--sepboot, no---boot, part-has-no-fstab, not-sep-usr, no---usr, part-has-no-fstab, no--grub.d, sda
sda3 : not--sepboot, no---boot, part-has-no-fstab, not-sep-usr, no---usr, part-has-no-fstab, no--grub.d, sda
sda4 : is---sepboot, no---boot, part-has-no-fstab, not-sep-usr, no---usr, part-has-no-fstab, no--grub.d, sda
sda5 : maybesepboot, no---boot, part-has-no-fstab, not-sep-usr, no---usr, part-has-no-fstab, no--grub.d, sda
sdb1 : not--sepboot, no---boot, part-has-no-fstab, not-sep-usr, no---usr, part-has-no-fstab, no--grub.d, sdb
sdb3 : not--sepboot, no---boot, part-has-no-fstab, not-sep-usr, no---usr, part-has-no-fstab, no--grub.d, sdb
sdb4 : not--sepboot, no---boot, part-has-no-fstab, not-sep-usr, no---usr, part-has-no-fstab, no--grub.d, sdb
fdisk -l (filtered): ___________________________________________________________
Disk sda: 931.5 GiB, 1000204886016 bytes, 1953525168 sectors
Disk identifier: 0363D3C5-E037-4DE4-B2AB-A524F4314F82
Start End Sectors Size Type
sda1 34 32767 32734 16M Microsoft reserved
sda2 32768 1743505407 1743472640 831.4G Microsoft basic data
sda3 1743505408 1744734207 1228800 600M EFI System
sda4 1744734208 1746831359 2097152 1G Linux filesystem
sda5 1746831360 1953523711 206692352 98.6G Linux filesystem
Disk sdb: 119.2 GiB, 128035676160 bytes, 250069680 sectors
Disk identifier: A48EA26A-2462-4A03-8D2A-0F74F610DCC4
Start End Sectors Size Type
sdb1 2048 206847 204800 100M EFI System
sdb2 206848 239615 32768 16M Microsoft reserved
sdb3 239616 248980558 248740943 118.6G Microsoft basic data
sdb4 248981504 250066943 1085440 530M Windows recovery environment
Disk sdc: 14.3 GiB, 15376318464 bytes, 30031872 sectors
Disk identifier: 0x2c534026
Boot Start End Sectors Size Id Type
sdc1 * 0 1802239 1802240 880M 0 Empty
sdc2 964 5891 4928 2.4M ef EFI (FAT-12/16/32)
Disk zram0: 991.2 MiB, 1039298560 bytes, 253735 sectors
Disk zram1: 991.2 MiB, 1039298560 bytes, 253735 sectors
Disk zram2: 991.2 MiB, 1039298560 bytes, 253735 sectors
Disk zram3: 991.2 MiB, 1039298560 bytes, 253735 sectors
Disk zram4: 991.2 MiB, 1039298560 bytes, 253735 sectors
Disk zram5: 991.2 MiB, 1039298560 bytes, 253735 sectors
Disk zram6: 991.2 MiB, 1039298560 bytes, 253735 sectors
Disk zram7: 991.2 MiB, 1039298560 bytes, 253735 sectors
parted -lm (filtered): _________________________________________________________
sda:1000GB:scsi:512:4096:gpt:ATA ST1000LM049-2GH1:;
1:17.4kB:16.8MB:16.8MB::Microsoft reserved partition:msftres;
2:16.8MB:893GB:893GB:ntfs:Basic data partition:msftdata;
3:893GB:893GB:629MB:fat32:EFI System Partition:boot, esp;
4:893GB:894GB:1074MB:ext4::;
5:894GB:1000GB:106GB:btrfs::;
sdb:128GB:scsi:512:4096:gpt:ATA LITEON CV8-8E128:;
1:1049kB:106MB:105MB:fat32:EFI system partition:boot, esp;
2:106MB:123MB:16.8MB::Microsoft reserved partition:msftres;
3:123MB:127GB:127GB:ntfs:Basic data partition:msftdata;
4:127GB:128GB:556MB:ntfs::hidden, diag;
sdc:15.4GB:scsi:512:512:msdos:SanDisk Cruzer Force:;
2:494kB:3017kB:2523kB:::esp;
Free space >10MiB: ______________________________________________________________
sdc: 2.88MiB:14664MiB:14661MiB
blkid (filtered): ______________________________________________________________
NAME FSTYPE UUID PARTUUID LABEL PARTLABEL
sda
├─sda1 237662f0-b87f-42ce-8681-38220d97b59e Microsoft reserved partition
├─sda2 ntfs 227C126A7C1238CD a2ee1834-5c53-4c4d-ba12-aa5fac04b96e New Volume Basic data partition
├─sda3 vfat BE67-4BD6 ad025592-09c4-4d88-9663-fadfa21250a2 EFI System Partition
├─sda4 ext4 32bdddcb-ffdb-4824-881b-e28f0d03ace5 69b1c64a-957e-49d6-b375-ade22b66da81
└─sda5 btrfs b67bb84c-2381-4cbe-8ccd-ea1ed8c9f5c4 7adda1d6-0bc4-4b51-bcc0-6c0b7cffbda5 fedora_localhost-live
sdb
├─sdb1 vfat 9228-4C98 e748a39c-9f78-44ed-8915-3765c578105b EFI system partition
├─sdb2 ab205258-94e6-40d6-a308-8cf225b8a037 Microsoft reserved partition
├─sdb3 ntfs 8E5E38FF5E38E19F e6dcbd4d-96c9-4c0b-9826-ac7aecfc37a8 Basic data partition
└─sdb4 ntfs EE1EAD5E1EAD2117 8003e7fa-b647-47ae-9e9f-7bce2481a4d7
sdc iso9660 2020-06-13-00-42-55-00 Boot-Repair-Disk 64bit
├─sdc1 iso9660 2020-06-13-00-42-55-00 2c534026-01 Boot-Repair-Disk 64bit
└─sdc2 vfat D055-8513 2c534026-02 Boot-Repair-Disk 64bit
Mount points (filtered): _______________________________________________________
Avail Use% Mounted on
/dev/sda2 771.3G 7% /mnt/boot-sav/sda2
/dev/sda3 581.4M 3% /mnt/boot-sav/sda3
/dev/sda4 735.7M 18% /mnt/boot-sav/sda4
/dev/sda5 90.8G 6% /mnt/boot-sav/sda5
/dev/sdb1 69.4M 28% /mnt/boot-sav/sdb1
/dev/sdb3 61.9G 48% /mnt/boot-sav/sdb3
/dev/sdb4 88.5M 83% /mnt/boot-sav/sdb4
/dev/sdc 0 100% /cdrom
Mount options (filtered): ______________________________________________________
===================== sda3/efi/fedora/grub.cfg (filtered) ======================
search --no-floppy --fs-uuid --set=dev 32bdddcb-ffdb-4824-881b-e28f0d03ace5
set prefix=($dev)/grub2
export $prefix
configfile $prefix/grub.cfg
======================== sda4/grub2/grub.cfg (filtered) ========================
Windows Boot Manager (on sdb1) osprober-efi-9228-4C98
### END /etc/grub.d/30_os-prober ###
UEFI Firmware Settings uefi-firmware
### END /etc/grub.d/30_uefi-firmware ###
==================== sda4: Location of files loaded by Grub ====================
GiB - GB File Fragment(s)
832.206066132 = 893.574459392 grub2/grub.cfg 1
832.257247925 = 893.629415424 vmlinuz-0-rescue-e4ac8fd2f5fb4a1c806fa70a643abcb1 2
832.282222748 = 893.656231936 vmlinuz-6.0.7-301.fc37.x86_64 2
832.407222748 = 893.790449664 initramfs-0-rescue-e4ac8fd2f5fb4a1c806fa70a643abcb1.img 4
832.442329407 = 893.828145152 initramfs-6.0.7-301.fc37.x86_64.img 1
====================== sdc/boot/grub/grub.cfg (filtered) =======================
Boot-Repair-Disk session
Boot-Repair-Disk session (failsafe)
==================== sdc: Location of files loaded by Grub =====================
GiB - GB File Fragment(s)
?? = ?? boot/grub/grub.cfg 1
======================== Unknown MBRs/Boot Sectors/etc =========================
/dev/sdb1: unknown GPT attributes
8000000000000000
/dev/sdb2: unknown GPT attributes
8000000000000000
/dev/sdb4: unknown GPT attributes
8000000000000001
Unknown BootLoader on sdc
BTRFS detected on sda5
ls sda5:
---
mount /dev/sda5 /mnt/boot-sav/sda5/
MOUNTCODE=0
---
os-prober before @ subvol mount:
/dev/sdb1@/efi/Microsoft/Boot/bootmgfw.efi:Windows Boot Manager:Windows:efi
---
Suggested repair: ______________________________________________________________
The default repair of the Boot-Repair utility would not act on the MBR.
Additional repair would be performed: win-legacy-basic-fix
我在 SSD 上安装了 Windows,在 HDD 上安装了 Fedora,并为其分配了 100GB 的空间。
快速启动被禁用。
引导菜单在 ubuntu 上工作得很好,因为它自己管理引导加载程序安装(至少我是这么认为的)。
答案1
在我看来,您sdb1
磁盘上的 ESP 分区可能在安装 Fedora 后的某个时候被重新格式化,并且 Fedora 的 GRUB 配置文件从那时起就没有更新过。 ESP 的卷序列号(即在 FAT32 分区上用来代替文件系统 UUID 的东西)已更改,并且 GRUB 仍在寻找旧的序列号。
如果您的 Fedoraos-prober
安装了该软件包,修复可能就像启动 Fedora 并以 root 身份运行以下命令一样简单:
grub2-mkconfig > /boot/grub/grub.cfg
这应该会导致os-prober
重新检测 Windows 启动管理器的位置,并用新的序列号(似乎是 9228-4C98)替换旧的 FAT32 文件系统序列号 7E79-F46D。
或者,您可以/boot/grub/grub.cfg
在 Fedora 中手动编辑并将字符串替换7E79-F46D
为9228-4C98
.
该消息disk 'hd1,gpt1' not found
可能是因为os-prober
它为找到的每个操作系统添加了多个“搜索提示”。但因为它无法明确知道固件的磁盘检测顺序,所以它只是猜测该分区sdb1
可能是hd1,gpt1
用于固件的,因此也是用于 GRUB 的。
固件实际上可能以不同的顺序检测驱动器,从而使os-prober
猜测错误。但只要文件系统 UUID/FAT32 序列号正确,这些对 GRUB 来说就会具有更高的优先级:只要 GRUB 能够找到具有正确 UUID/序列号的文件系统,它就不会关心固件会调用它什么。由于序列号似乎已更改,GRUB 将找不到它正在寻找的旧序列号,并且将回退到猜测的hd1,gpt1
标识符,这显然也是不正确的。