在 HP Envy x360 上同时安装 Ubuntu 22 和 Windows 10 Home 时出现“无法在 /dev/nvme0n1 中安装 GRUB”

在 HP Envy x360 上同时安装 Ubuntu 22 和 Windows 10 Home 时出现“无法在 /dev/nvme0n1 中安装 GRUB”

我正在尝试双启动我的 HP envy x360,它有 512 GB 的 SSD 和已安装的 Windows 10 Home。我使用 Rufus 创建了一个可启动的 USB,并在其中安装了 Ubuntu 22.04。

我还从 BIOS 设置中禁用了安全启动。

BIOS 启动选项:

BIOS 启动选项(显示安全启动已关闭)

我禁用了 bitlocker 并解密了我的 C 盘,我还缩小了 C 盘以创建一些未分配的空间。

磁盘管理器显示 bitlocker 已关闭,并且有大约 70Gbs 的未分配空间

我有以下存储控制器: !设备管理器显示 RST 存储控制器

然后,我使用 Windows 的“更改高级启动选项”从 USB 重新启动了笔记本电脑,我将包括以下步骤:

从 USB 启动第 2 部分

(我选择了“EFI USB 设备选项”)

然后我选择“安装 Ubuntu”选项,并选择正常安装。当被问到在哪里安装 Ubuntu 时,我选择了与 Windows 启动管理器一起安装 Ubuntu选项:

安装类型页面

安装开始了,进度条一直填满,直到接近结束,我收到此错误:无法在 /dev/nvme0n1 中安装 GRUB:执行“grub-install /dev/nvme0n1”失败。这是一个致命错误。

错误消息的图片

我被要求重新启动计算机,然后 Windows 就加载了。

我尝试过的其他方法:

  1. 我在安装类型上选择了“其他”选项,并将 3 GB 安装为 /root 目录,将我在 Windows 上创建的其余可用空间安装为根 (/) 目录。其余选项保持不变,这是分区屏幕的图片。

分割页

尝试安装后,我得到了与之前相同的错误,但 Ubuntu 安装在我的驱动器上,因为下次我尝试运行安装程序时,我可以选择删除并重新安装 Ubuntu

  1. 我再次选择了“其他”选项,这次只将 / 目录设置为可用空间,并将“引导加载程序安装设备”设置为标记为“Windows 引导管理器”的分区。我尝试再次安装,但出现相同的错误。

  2. 我将另一个版本 (Ubuntu 20.04) 刻录到 USB 上,并尝试使用其他内容选项并得到同样的错误。

我很乐意分享任何可以澄清问题的信息/截图。

我使用 Boot-Repair 获取了启动信息摘要,并得到了这个 pastebin:https://paste.ubuntu.com/p/DZdJGBshsP/

============================== Boot Info Summary ===============================

 => Grub2 (v2.00) is installed in the MBR of /dev/sda and looks at sector 1 of 
    the same hard drive for core.img. core.img is at this location and looks 
    for (hd0,msdos1)/boot/grub. It also embeds following components:
    
    modules
    ---------------------------------------------------------------------------
    biosdisk fshelp fat exfat ext2 ntfs ntfscomp part_msdos
    ---------------------------------------------------------------------------

sda1: __________________________________________________________________________

    File system:       vfat
    Boot sector type:  MSWIN4.1: FAT32
    Boot sector info:  No errors found in the Boot Parameter Block.
    Operating System:  
    Boot files:        /boot/grub/grub.cfg /efi/boot/bootx64.efi 
                       /efi/boot/grubx64.efi /efi/boot/mmx64.efi

md/imsm0: ______________________________________________________________________

    File system:       
    Boot sector type:  Unknown
    Boot sector info: 


================================ 2 OS detected =================================

OS#1:   Windows 10 or 11 on nvme0n1p3
OS#2:   Ubuntu 22.04 LTS on nvme0n1p5

================================ Host/Hardware =================================

CPU architecture: 64-bit
Video: CometLake-U GT2 [UHD Graphics] GP108M [GeForce MX330] from Intel Corporation NVIDIA Corporation
Live-session OS is Ubuntu 64-bit (Ubuntu 22.04 LTS, jammy, x86_64)

===================================== UEFI =====================================

BIOS/UEFI firmware: F.24(15.24) from Insyde
The firmware is EFI-compatible, and is set in EFI-mode for this live-session.
SecureBoot disabled - SecureBoot disabled
Platform is in Setup Mode - Please report this message to [email protected].
BootCurrent: 0000
Timeout: 0 seconds
BootOrder: 0001,2001,3001,2002,2004
Boot0000* USB Hard Drive (UEFI) - General USB Flash Disk (General USB Flash Disk)   PciRoot(0x0)/Pci(0x14,0x0)/USB(0,0)/HD(1,MBR,0x18d8d7,0x800,0x1dd9000)RC
Boot0001* Windows Boot Manager  HD(1,GPT,14b3b884-38b7-4d46-93f7-ea16b411282c,0x800,0x82000)/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.}....................
Boot2001* EFI USB Device    RC
Boot3001* Internal Hard Disk or Solid State Disk    RC

de3ee3ac3e402dfb9f2cb2b38d215225   nvme0n1p1/Boot/bootx64.efi
d9c4ec54a5e4fff17ea5ca059dee9416   nvme0n1p1/HP/BIOSUpdate/BiosMgmt32.efi
659a6171d178c951211c4868fccbfa9b   nvme0n1p1/HP/BIOSUpdate/BiosMgmt.efi
1b8c0684ede8539ccc205cf7a750eca3   nvme0n1p1/HP/BIOSUpdate/CryptRSA32.efi
6488d391f74263c9da3c3d47dffa6212   nvme0n1p1/HP/BIOSUpdate/CryptRSA.efi
6d6c99b06136830bbc041fe57b04f658   nvme0n1p1/HP/BIOSUpdate/HpBiosMgmt.efi
6488d391f74263c9da3c3d47dffa6212   nvme0n1p1/HP/SystemDiags/CryptRSA.efi
9ca774eb2290dce4f276eaec4aced423   nvme0n1p1/HP/SystemDiags/SysDiags.efi
72293f4ecf0f5b24dce601d2c3c4b26e   nvme0n1p1/Microsoft/Boot/bootmgfw.efi
75641ea3cae97c7ea935e501d6e5e227   nvme0n1p1/Microsoft/Boot/bootmgr.efi

============================= Drive/Partition Info =============================

Disks info: ____________________________________________________________________

nvme0n1 : is-GPT,   no-BIOSboot,    has---ESP,  not-usb,    not-mmc, has-os,    has-win,    2048 sectors * 512 bytes
nvme1n1 : notGPT,   no-BIOSboot,    has-noESP,  not-usb,    not-mmc, no-os, no-wind,    2048 sectors * 512 bytes

Partitions info (1/3): _________________________________________________________

nvme0n1p1   : no-os,    32, nopakmgr,   no-docgrub, nogrub, nogrubinstall,  no-grubenv, noupdategrub,   not-far
nvme0n1p3   : is-os,    32, nopakmgr,   no-docgrub, nogrub, nogrubinstall,  no-grubenv, noupdategrub,   farbios
nvme0n1p4   : no-os,    32, nopakmgr,   no-docgrub, nogrub, nogrubinstall,  no-grubenv, noupdategrub,   farbios
nvme0n1p5   : is-os,    64, apt-get,    signed grub-pc grub-efi ,   grub2,  grub-install,   grubenv-ok, update-grub,    farbios

Partitions info (2/3): _________________________________________________________

nvme0n1p1   : is---ESP, part-has-no-fstab,  no-nt,  no-winload, no-recov-nor-hid,   no-bmgr,    notwinboot
nvme0n1p3   : isnotESP, part-has-no-fstab,  no-nt,  haswinload, no-recov-nor-hid,   no-bmgr,    notwinboot
nvme0n1p4   : isnotESP, part-has-no-fstab,  no-nt,  no-winload, recovery-or-hidden, no-bmgr,    notwinboot
nvme0n1p5   : isnotESP, fstab-has-goodEFI,  no-nt,  no-winload, no-recov-nor-hid,   no-bmgr,    notwinboot

Partitions info (3/3): _________________________________________________________

nvme0n1p1   : not--sepboot, no---boot,  part-has-no-fstab,  not-sep-usr,    no---usr,   part-has-no-fstab,  no--grub.d, nvme0n1
nvme0n1p3   : not--sepboot, no---boot,  part-has-no-fstab,  not-sep-usr,    no---usr,   part-has-no-fstab,  no--grub.d, nvme0n1
nvme0n1p4   : not--sepboot, no---boot,  part-has-no-fstab,  not-sep-usr,    no---usr,   part-has-no-fstab,  no--grub.d, nvme0n1
nvme0n1p5   : not--sepboot, with-boot,  fstab-without-boot, not-sep-usr,    with--usr,  fstab-without-usr,  std-grub.d, nvme0n1

fdisk -l (filtered): ___________________________________________________________

Disk nvme0n1: 476.94 GiB, 512110190592 bytes, 1000215216 sectors
Disk identifier: 9B6B322A-E01A-48C4-BAA5-86025779ADA6
              Start        End   Sectors   Size Type
nvme0n1p1      2048     534527    532480   260M EFI System
nvme0n1p2    534528     567295     32768    16M Microsoft reserved
nvme0n1p3    567296  855754751 855187456 407.8G Microsoft basic data
nvme0n1p4 999116800 1000198143   1081344   528M Windows recovery environment
nvme0n1p5 855754752  999116799 143362048  68.4G Linux filesystem
Partition table entries are not in disk order.
Disk nvme1n1: 27.25 GiB, 29260513280 bytes, 57149440 sectors
Disk sda: 14.92 GiB, 16025387008 bytes, 31299584 sectors
Disk identifier: 0x0018d8d7
      Boot Start      End  Sectors  Size Id Type
sda1  *     2048 31299583 31297536 14.9G  c W95 FAT32 (LBA)

parted -lm (filtered): _________________________________________________________

sda:16.0GB:scsi:512:512:msdos:General USB Flash Disk:;
1:1049kB:16.0GB:16.0GB:fat32::boot, lba;
nvme0n1:512GB:nvme:512:512:gpt:INTEL HBRPEKNX0202AH:;
1:1049kB:274MB:273MB:fat32:EFI system partition:boot, esp;
2:274MB:290MB:16.8MB::Microsoft reserved partition:msftres;
3:290MB:438GB:438GB:ntfs:Basic data partition:msftdata;
5:438GB:512GB:73.4GB:ext4::;
4:512GB:512GB:554MB:ntfs:Basic data partition:hidden, diag;
nvme1n1:29.3GB:nvme:512:512:unknown:INTEL HBRPEKNX0202AHO:;

blkid (filtered): ______________________________________________________________

NAME        FSTYPE          UUID                                 PARTUUID                             LABEL            PARTLABEL
sda                                                                                                                    
└─sda1      vfat            706B-8706                            0018d8d7-01                          UBUNTU 22_0      
nvme0n1     isw_raid_member                                                                                            
├─nvme0n1p1 vfat            B439-C902                            14b3b884-38b7-4d46-93f7-ea16b411282c SYSTEM           EFI system partition
├─nvme0n1p2                                                      0d52444b-83ce-4acc-9ad6-e9d1793b3caf                  Microsoft reserved partition
├─nvme0n1p3 ntfs            D072752072750C8A                     4a6dbb08-0a42-4e83-93c8-575223ff2e5e Windows          Basic data partition
├─nvme0n1p4 ntfs            B4A21A18A219E022                     f8471a8e-ada5-4520-865b-7de240c6cbf4 Windows RE tools Basic data partition
└─nvme0n1p5 ext4            7a62fc8e-de21-4c0f-8850-2fa855cf0c02 d7f44e53-cab5-458b-a31e-aebab9ef178a                  
nvme1n1     isw_raid_member                                                                                            
└─md127                                                                                                                

Mount points (filtered): _______________________________________________________

                        Avail Use% Mounted on
/dev/nvme0n1p1         173.7M  32% /mnt/boot-sav/nvme0n1p1
/dev/nvme0n1p3         134.7G  67% /mnt/boot-sav/nvme0n1p3
/dev/nvme0n1p4          67.7M  87% /mnt/boot-sav/nvme0n1p4
/dev/nvme0n1p5          54.8G  13% /target
/dev/sda1               11.5G  23% /cdrom

Mount options (filtered): ______________________________________________________

/dev/nvme0n1p1         vfat            ro,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro
/dev/nvme0n1p3         fuseblk         rw,relatime,user_id=0,group_id=0,allow_other,blksize=4096
/dev/nvme0n1p4         fuseblk         rw,relatime,user_id=0,group_id=0,allow_other,blksize=4096
/dev/nvme0n1p5         ext4            rw,relatime,errors=remount-ro
/dev/sda1              vfat            ro,noatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro

====================== sda1/boot/grub/grub.cfg (filtered) ======================

Try or Install Ubuntu
Ubuntu (safe graphics)
OEM install (for manufacturers)
Boot from next volume
UEFI Firmware Settings
Test memory

==================== sda1: Location of files loaded by Grub ====================

           GiB - GB             File                                 Fragment(s)
            ?? = ??             boot/grub/grub.cfg                             1

=================== blkid (filtered) before raid activation ====================

/dev/nvme0n1p1: LABEL="SYSTEM" UUID="B439-C902" BLOCK_SIZE="512" TYPE="vfat" PARTLABEL="EFI system partition" PARTUUID="14b3b884-38b7-4d46-93f7-ea16b411282c"
/dev/nvme0n1p3: LABEL="Windows" BLOCK_SIZE="512" UUID="D072752072750C8A" TYPE="ntfs" PARTLABEL="Basic data partition" PARTUUID="4a6dbb08-0a42-4e83-93c8-575223ff2e5e"
/dev/nvme0n1p4: LABEL="Windows RE tools" BLOCK_SIZE="512" UUID="B4A21A18A219E022" TYPE="ntfs" PARTLABEL="Basic data partition" PARTUUID="f8471a8e-ada5-4520-865b-7de240c6cbf4"
/dev/nvme0n1p5: UUID="7a62fc8e-de21-4c0f-8850-2fa855cf0c02" BLOCK_SIZE="4096" TYPE="ext4" PARTUUID="d7f44e53-cab5-458b-a31e-aebab9ef178a"
/dev/nvme1n1: TYPE="isw_raid_member"
/dev/sda1: LABEL="UBUNTU 22_0" UUID="706B-8706" BLOCK_SIZE="512" TYPE="vfat" PARTUUID="0018d8d7-01"
/dev/nvme0n1p2: PARTLABEL="Microsoft reserved partition" PARTUUID="0d52444b-83ce-4acc-9ad6-e9d1793b3caf"


==================================== dmraid ====================================

dmraid -si -c
no block devices found
dmraid -ay:
no block devices found
dmraid -sa -c:
no block devices found


==================================== mdadm =====================================
mdadm --assemble --scan

mdadm --detail --scan
ARRAY /dev/md/imsm0 metadata=imsm UUID=d4920e23:0470b5fb:00ee1f05:61a19535


Suggested repair: ______________________________________________________________

The default repair of the Boot-Repair utility would purge (in order to enable-raid) and reinstall the grub-efi of
nvme0n1p5,
using the following options:  nvme0n1p1/boot/efi
Additional repair would be performed: unhide-bootmenu-10s use-standard-efi-file

Blockers in case of suggested repair: __________________________________________

/target detected. Please close the Ubuntu installer, then retry. 

Final advice in case of suggested repair: ______________________________________

Please do not forget to make your UEFI firmware boot on the Ubuntu 22.04 LTS entry (nvme0n1p1/efi/****/grub****.efi (**** will be updated in the final message) file) !
If your computer reboots directly into Windows, try to change the boot order in your UEFI firmware.
If your UEFI firmware does not allow to change the boot order, change the default boot entry of the Windows bootloader.
For example you can boot into Windows, then type the following command in an admin command prompt:
bcdedit /set {bootmgr} path \EFI\****\grub****.efi (**** will be updated in the final message)

答案1

在 BIOS 启动管理器的启动菜单下,选择添加驱动器。查找您的 Ubuntu 分区驱动器,在其中找到启动目录,然后是 ESI 文件。添加它。应该加载 grub 启动菜单。我刚刚这样做是为了在 Windows 升级后恢复我的双启动,然后直接进入 Windows。现在 grub 又可以正常工作了

相关内容