首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >无法从GRUB菜单引导到windows (没有找到磁盘'hd1,gpt1‘)

无法从GRUB菜单引导到windows (没有找到磁盘'hd1,gpt1‘)
EN

Unix & Linux用户
提问于 2023-03-16 12:18:45
回答 1查看 321关注 0票数 1

我双引导Windows和Fedora旋转。启动系统时,如果选择,则以下错误打印

代码语言:javascript
运行
复制
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,但是如果我先转到,然后按前面提到的任意键,然后转到Fedora,下面的pops

代码语言:javascript
运行
复制
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...

我尝试过不同的发行版(薄荷、manjaro、pop ),但问题依然存在。不过,我可以从BIOS启动菜单引导到windows。在在线阅读之后,我尝试使用ubuntu引导修复,它提供了以下输出:

代码语言:javascript
运行
复制
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,给了它100 of的空间。

快速引导被禁用。

启动菜单对ubuntu非常好,因为它管理引导加载程序安装本身(至少我认为是这样)。

EN

回答 1

Unix & Linux用户

发布于 2023-03-17 07:37:34

在我看来,sdb1磁盘上的ESP分区可能在安装Fedora之后的某个时候被重新格式化了,而且Fedora的GRUB配置文件从那时起就没有更新过。ESP的卷序列号(即在FAT32分区上使用的东西代替了文件系统UUID)已经改变,GRUB仍然在寻找旧的序列号。

如果Fedora安装了os-prober包,修复可能就像引导到Fedora并以root用户的身份运行此命令一样简单:

代码语言:javascript
运行
复制
grub2-mkconfig > /boot/grub/grub.cfg

这将导致os-prober重新检测Windows的位置,并将旧的FAT32文件系统序列号7E79-F46D替换为新的文件系统序列号7E79-F46D,这似乎是9228-4C98。

或者,您可以在Fedora中手动编辑/boot/grub/grub.cfg,并将字符串7E79-F46D替换为9228-4C98

消息disk 'hd1,gpt1' not found可能是os-prober为发现的每个操作系统添加多个“搜索提示”的结果。但是,由于它不能确定地知道固件的磁盘检测顺序,所以它只是猜测分区sdb1可能是固件的hd1,gpt1,因此对于GRUB也是如此。

固件可能会以不同的顺序检测驱动器,这让os-prober's猜错了。但只要文件系统UUID/ not 32序列号是正确的,GRUB的优先级就会更高:只要GRUB能够找到具有正确UUID/序列号的文件系统,它就不会关心固件将调用什么。由于序列号似乎已经更改,GRUB将找不到它所要查找的旧序列号,并将返回到猜测的hd1,gpt1标识符,这显然也是不正确的。

票数 0
EN
页面原文内容由Unix & Linux提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://unix.stackexchange.com/questions/739982

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档