grub-efi purge 已取消,与 Windows 双启动

grub-efi purge 已取消,与 Windows 双启动

我的 Ubuntu 操作系统空间不足,于是我决定扩展它,方法是从 Windows 操作系统分区中取消分配空间并将其分配给 Ubuntu。Ubuntu 随后立即运行,但 Windows 无法启动。Windows 运行了自己的文件检查并“修复”了文件,然后启动了,但现在 Ubuntu 无法启动。现在,当我想启动 Ubuntu 时,它不是 GNU/Linux,只是黑屏。

我使用带有 Boot-Repair 的实时 USB 棒来修复问题,它建议清除 GRUB 并重新安装。我遇到了问题,并尽我所能。例如,我遇到了软件包问题,我只是手动“修复”它们(?)。但现在,它只是说grub-efi purge is cancelled。我觉得我真的弄坏了东西。我做了自己的研究,解决方案与 EFI 分区和更改那里的内容密切相关,我现在有点害怕这样做。

启动修复启动信息摘要:

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

 => No boot loader is installed in the MBR of /dev/nvme0n1.
 => No known boot loader is installed in the MBR of /dev/sda.

nvme0n1p1: _____________________________________________________________________

    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:        

nvme0n1p2: _____________________________________________________________________

    File system:       
    Boot sector type:  -
    Boot sector info: 

nvme0n1p3: _____________________________________________________________________

    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:        

nvme0n1p4: _____________________________________________________________________

    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:        

nvme0n1p5: _____________________________________________________________________

    File system:       ext4
    Boot sector type:  -
    Boot sector info: 
    Operating System:  Ubuntu 22.04.3 LTS
    Boot files:        /boot/grub/grub.cfg /etc/fstab /etc/default/grub

sda1: __________________________________________________________________________

    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:        /boot/grub/grub.cfg /efi/boot/bootx64.efi 
                       /efi/boot/grubx64.efi /efi/boot/mmx64.efi

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

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

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

CPU architecture: 64-bit
Video: GA107M [GeForce RTX 3050 Mobile] TigerLake-H GT1 [UHD Graphics] from NVIDIA Corporation Intel Corporation
Live-session OS is Ubuntu 64-bit (Ubuntu 22.04.3 LTS, jammy, x86_64)

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

BIOS/UEFI firmware: V1.18(1.18) from Insyde Corp.
The firmware is EFI-compatible, and is set in EFI-mode for this live-session.
No EFI in dmseg.
SecureBoot disabled (confirmed by mokutil).
BootCurrent: 0000
Timeout: 0 seconds
BootOrder: 0000,0001,0002,2001,2002,2003
Boot0000* Linpus lite   HD(1,GPT,d890c60c-56a1-4c95-8377-d22b508a032e,0x800,0x39bb7e0)/File(\EFI\Boot\grubx64.efi)RC
Boot0001* Windows Boot Manager  HD(1,GPT,f9395298-f076-48ab-9d99-76af71f5c8f1,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.}....................
Boot0002* ubuntu    HD(1,GPT,f9395298-f076-48ab-9d99-76af71f5c8f1,0x800,0x32000)/File(\EFI\ubuntu\shimx64.efi)
Boot2001* EFI USB Device    RC
Boot2002* EFI DVD/CDROM RC
Boot2003* EFI Network   RC

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

Disks info: ____________________________________________________________________

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

Partitions info (1/3): _________________________________________________________

nvme0n1p1   : no-os,    64, nopakmgr,   no-docgrub, nogrub, nogrubinstall,  no-grubenv, noupdategrub,   not-far
nvme0n1p3   : is-os,    64, nopakmgr,   no-docgrub, nogrub, nogrubinstall,  no-grubenv, noupdategrub,   farbios
nvme0n1p4   : no-os,    64, nopakmgr,   no-docgrub, nogrub, nogrubinstall,  no-grubenv, noupdategrub,   farbios
nvme0n1p5   : is-os,    64, apt-get,    signed grub-pc grub-efi ,   grub2,  grub-install,   grubenv-ng, 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: 8BECBD3C-43DC-45B2-9BCE-419172A7FA16
              Start        End   Sectors   Size Type
nvme0n1p1      2048     206847    204800   100M EFI System
nvme0n1p2    206848     239615     32768    16M Microsoft reserved
nvme0n1p3    239616  862603263 862363648 411.2G Microsoft basic data
nvme0n1p4 998420480 1000210431   1789952   874M Windows recovery environment
nvme0n1p5 862603264  998420479 135817216  64.8G Linux filesystem
Partition table entries are not in disk order.
Disk sda: 28.87 GiB, 30995907072 bytes, 60538881 sectors
Disk identifier: 7045AE4E-C377-40BC-BF76-917289018D38
      Start      End  Sectors  Size Type
sda1   2048 60538847 60536800 28.9G Microsoft basic data

parted -lm (filtered): _________________________________________________________

sda:31.0GB:scsi:512:512:gpt:Kingston DataTraveler 3.0:;
1:1049kB:31.0GB:31.0GB:fat32:Main Data Partition:msftdata;
nvme0n1:512GB:nvme:512:512:gpt:WDC PC SN530 SDBPNPZ-512G-1114:;
1:1049kB:106MB:105MB:fat32:EFI system partition:boot, esp;
2:106MB:123MB:16.8MB::Microsoft reserved partition:msftres;
3:123MB:442GB:442GB:ntfs:Basic data partition:msftdata;
5:442GB:511GB:69.5GB:ext4::;
4:511GB:512GB:916MB:ntfs::hidden, diag;

blkid (filtered): ______________________________________________________________

NAME        FSTYPE   UUID                                 PARTUUID                             LABEL       PARTLABEL
sda                                                                                                        
└─sda1      vfat     B6BD-2780                            d890c60c-56a1-4c95-8377-d22b508a032e UBUNTU 22_0 Main Data Partition
nvme0n1                                                                                                    
├─nvme0n1p1 vfat     FEAB-FFD7                            f9395298-f076-48ab-9d99-76af71f5c8f1             EFI system partition
├─nvme0n1p2                                               87545613-096d-40e8-b3a7-aedaaf5de1fc             Microsoft reserved partition
├─nvme0n1p3 ntfs     020CB7520CB73F89                     141a3195-2de2-4709-9ceb-9d28505a636e             Basic data partition
├─nvme0n1p4 ntfs     424AB0C34AB0B4CF                     0cc59d7c-896c-4023-ae10-1ca6b68a498e             
└─nvme0n1p5 ext4     9e5a9876-5906-4a22-b0ef-6b0c527bde57 0a780072-4375-4fdd-9863-73ce29f81570             

Mount points (filtered): _______________________________________________________
                           Avail Use% Mounted on
/dev/nvme0n1p4             76.1M  91% /mnt/boot-sav/nvme0n1p4
/dev/nvme0n1p5             29.8G  48% /mnt
/dev/sda1                  24.2G  16% /cdrom

Mount options (filtered): ______________________________________________________

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

GNU/Linux   9e5a9876-5906-4a22-b0ef-6b0c527bde57
GNU/Linux, with Linux 6.2.0-35-generic   9e5a9876-5906-4a22-b0ef-6b0c527bde57
GNU/Linux, with Linux 6.2.0-34-generic   9e5a9876-5906-4a22-b0ef-6b0c527bde57
Windows Boot Manager (on nvme0n1p1)   osprober-efi-FEAB-FFD7
### END /etc/grub.d/30_os-prober ###
### END /etc/grub.d/30_uefi-firmware ###

======================== nvme0n1p5/etc/fstab (filtered) ========================

# <file system> <mount point>   <type>  <options>       <dump>  <pass>
# / was on /dev/nvme0n1p5 during installation
UUID=9e5a9876-5906-4a22-b0ef-6b0c527bde57 /               ext4    errors=remount-ro 0       1
# /boot/efi was on /dev/nvme0n1p1 during installation
UUID=FEAB-FFD7  /boot/efi       vfat    umask=0077      0       1
/swapfile                                 none            swap    sw              0       0

==================== nvme0n1p5/etc/default/grub (filtered) =====================

GRUB_DISABLE_OS_PROBER=false
GRUB_DISABLE_OS_PROBER=false
GRUB_DISABLE_OS_PROBER=false
GRUB_DISABLE_OS_PROBER=false

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

           GiB - GB             File                                 Fragment(s)
 440.186527252 = 472.646684672  boot/grub/grub.cfg                             1
 413.935695648 = 444.460068864  boot/vmlinuz                                   1
 437.938472748 = 470.232854528  boot/vmlinuz-6.2.0-34-generic                  2
 413.935695648 = 444.460068864  boot/vmlinuz-6.2.0-35-generic                  1
 437.938472748 = 470.232854528  boot/vmlinuz.old                               2
 433.646598816 = 465.624489984  boot/initrd.img                               70
 444.735122681 = 477.530701824  boot/initrd.img-6.2.0-34-generic              203
 433.646598816 = 465.624489984  boot/initrd.img-6.2.0-35-generic              70
 444.735122681 = 477.530701824  boot/initrd.img.old                           203

=================== nvme0n1p5: ls -l /etc/grub.d/ (filtered) ===================

-rwxr-xr-x 1 root root 18683 Dec 18  2022 10_linux
-rwxr-xr-x 1 root root 43031 Dec 18  2022 10_linux_zfs
-rwxr-xr-x 1 root root 14387 Dec 18  2022 20_linux_xen
-rwxr-xr-x 1 root root 13369 Dec 18  2022 30_os-prober
-rwxr-xr-x 1 root root  1372 Dec 18  2022 30_uefi-firmware
-rwxr-xr-x 1 root root   700 May 17 05:35 35_fwupd
-rwxr-xr-x 1 root root   214 Dec 18  2022 40_custom
-rwxr-xr-x 1 root root   215 Dec 18  2022 41_custom

====================== 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

Suggested repair: ______________________________________________________________

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



Final advice in case of suggested repair: ______________________________________

Please do not forget to make your UEFI firmware boot on the Ubuntu 22.04.3 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)

paste.ubuntu.com ko ()
paste.debian.net ko (https://paste.debian.net/)

相关内容