从 Ubuntu 22.04 升级到 23.04 后出现启动问题

从 Ubuntu 22.04 升级到 23.04 后出现启动问题

Ubuntu 建议我从 Ubuntu 22.04 升级到 23.04。我接受了。问题是,当 CPU 重新启动时,它会卡住,Ubuntu 无法启动。我用 Ubuntu 23.04 制作了一个实时 USB,安装了 Boot-repair,但 Boot-Repair 告诉我“当前会话处于 BIOS 兼容模式。请在 UEFI 固件中禁用 BIOS 兼容性/CSM/Legacy 模式,并从与 UEFI 启动模式兼容的实时 CD(或实时 USB)中使用此软件。例如,使用 Boot-Repair-Disk-64bit 的实时 USB(www.sourceforge.net/p/boot-repair-cd),确保您的 BIOS 设置为以 EFI 模式启动 USB。这将启用此功能。

我使用 GPT 分区方案(而不是 MBR)制作了一个新的实时 USB,我进入 CPU BIOS 停用 BIOS/CSM/传统模式以强制他使用 EFI。不幸的是,CPU 不想从我的实时 USB 启动 Ubuntu。这是启动信息摘要


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

 => Grub2 (v2.00) is installed in the MBR of /dev/sda and looks at sector 2048 
    of the same hard drive for core.img. core.img is at this location and 
    looks for (,gpt3)/boot/grub. It also embeds following components:
    
    modules
    ---------------------------------------------------------------------------
    fshelp ext2 part_gpt biosdisk
    ---------------------------------------------------------------------------
 => Windows 7/8/10/11/2012 is installed in the MBR of /dev/sdb.
 => Grub2 (v2.00) is installed in the MBR of /dev/sdc 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:       BIOS Boot partition
    Boot sector type:  Grub2's core.img
    Boot sector info: 

sda2: __________________________________________________________________________

    File system:       vfat
    Boot sector type:  FAT32
    Boot sector info:  No errors found in the Boot Parameter Block.
    Operating System:  
    Boot files:        /efi/BOOT/fbx64.efi /efi/BOOT/mmx64.efi 
                       /efi/ubuntu/grubx64.efi /efi/ubuntu/mmx64.efi 
                       /efi/ubuntu/shimx64.efi /efi/ubuntu/grub.cfg

sda3: __________________________________________________________________________

    File system:       ext4
    Boot sector type:  -
    Boot sector info: 
    Operating System:  Ubuntu 23.04
    Boot files:        /boot/grub/grub.cfg /etc/fstab /etc/default/grub 
                       /boot/grub/i386-pc/core.img

sdb1: __________________________________________________________________________

    File system:       ntfs
    Boot sector type:  Windows 7/2008: NTFS
    Boot sector info:  No errors found in the Boot Parameter Block.
    Operating System:  
    Boot files:        

sdc1: __________________________________________________________________________

    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

sdc2: __________________________________________________________________________

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


================================ 1 OS detected =================================

OS#1:   Ubuntu 23.04 on sda3

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

CPU architecture: 64-bit
Video: GF114M [GeForce GTX 670M] 2nd Generation Core Processor Family Integrated Graphics Controller from NVIDIA Corporation Intel Corporation
Live-session OS is Ubuntu 64-bit (Ubuntu 23.04, lunar, x86_64)

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

BIOS/UEFI firmware: 4.6.5(4.6) from American Megatrends Inc.
This live-session is in Legacy/BIOS/CSM mode (not in EFI mode).


0a832cd2c33c8a146b78778df8d33417   sda2/BOOT/fbx64.efi
abfc1dc97795531c0390328f9dd1a281   sda2/BOOT/mmx64.efi
7e494801bb7163fd063f386d7bc75ed8   sda2/ubuntu/grubx64.efi
abfc1dc97795531c0390328f9dd1a281   sda2/ubuntu/mmx64.efi
64349b3622c65f495a99dbf6102496e3   sda2/ubuntu/shimx64.efi
64349b3622c65f495a99dbf6102496e3   sda2/BOOT/BOOTX64.efi

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

Disks info: ____________________________________________________________________

sda : is-GPT,   hasBIOSboot,    has---ESP,  not-usb,    not-mmc, has-os,    no-wind,    2048 sectors * 512 bytes
sdb : notGPT,   no-BIOSboot,    has-noESP,  not-usb,    not-mmc, no-os, no-wind,    2048 sectors * 512 bytes
sdc : notGPT,   no-BIOSboot,    has-noESP,  usb-disk,   not-mmc, no-os, no-wind,    128 sectors * 512 bytes

Partitions info (1/3): _________________________________________________________

sda2    : no-os,    64, nopakmgr,   no-docgrub, nogrub, nogrubinstall,  no-grubenv, noupdategrub,   not-far
sda3    : is-os,    64, apt-get,    signed grub-pc grub-efi ,   grub2,  grub-install,   grubenv-ok, update-grub,    farbios
sdb1    : no-os,    64, nopakmgr,   no-docgrub, nogrub, nogrubinstall,  no-grubenv, noupdategrub,   farbios
sdc2    : no-os,    64, nopakmgr,   no-docgrub, nogrub, nogrubinstall,  no-grubenv, noupdategrub,   not-far

Partitions info (2/3): _________________________________________________________

sda2    : is---ESP, part-has-no-fstab,  no-nt,  no-winload, no-recov-nor-hid,   no-bmgr,    notwinboot
sda3    : isnotESP, fstab-has-goodEFI,  no-nt,  no-winload, no-recov-nor-hid,   no-bmgr,    notwinboot
sdb1    : isnotESP, part-has-no-fstab,  no-nt,  no-winload, no-recov-nor-hid,   no-bmgr,    notwinboot
sdc2    : isnotESP, part-has-no-fstab,  no-nt,  no-winload, no-recov-nor-hid,   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, with-boot,  fstab-without-boot, not-sep-usr,    with--usr,  fstab-without-usr,  std-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
sdc2    : maybesepboot, no---boot,  part-has-no-fstab,  not-sep-usr,    no---usr,   part-has-no-fstab,  no--grub.d, sdc

fdisk -l (filtered): ___________________________________________________________

Disk sda: 119.24 GiB, 128035676160 bytes, 250069680 sectors
Disk identifier: D2D99D60-1C94-472E-B3B0-C492B3BB41C1
        Start       End   Sectors   Size Type
sda1     2048      4095      2048     1M BIOS boot
sda2     4096   1054719   1050624   513M EFI System
sda3  1054720 250068991 249014272 118.7G Linux filesystem
Disk sdb: 465.76 GiB, 500107862016 bytes, 976773168 sectors
Disk identifier: 0x4cccbd3c
      Boot Start       End   Sectors   Size Id Type
sdb1        2048 976769023 976766976 465.8G  7 HPFS/NTFS/exFAT
Disk sdc: 14.84 GiB, 15938355200 bytes, 31129600 sectors
Disk identifier: 0x0e2a5668
      Boot    Start      End  Sectors  Size Id Type
sdc1  *         128 31129487 31129360 14.8G  c W95 FAT32 (LBA)
sdc2       31129488 31129550       63 31.5K ea Linux extended boot

parted -lm (filtered): _________________________________________________________

sda:128GB:scsi:512:512:gpt:ATA M4-CT128M4SSD2:;
1:1049kB:2097kB:1049kB:::bios_grub;
2:2097kB:540MB:538MB:fat32:EFI System Partition:boot, esp;
3:540MB:128GB:127GB:ext4::;
sdb:500GB:scsi:512:512:msdos:ATA ST9500420ASG:;
1:1049kB:500GB:500GB:ntfs::;
sdc:15.9GB:scsi:512:512:msdos:Generic Flash Disk:;
1:65.5kB:15.9GB:15.9GB:fat32::boot, lba;
2:15.9GB:15.9GB:32.3kB:::bls_boot;

blkid (filtered): ______________________________________________________________

NAME   FSTYPE   UUID                                 PARTUUID                             LABEL       PARTLABEL
sda                                                                                                   
├─sda1                                               d2f4fae9-1732-406d-b630-e1306bbda7de             
├─sda2 vfat     4923-9CD3                            61b40228-4f01-486c-98d8-1715a67f3b36             EFI System Partition
└─sda3 ext4     09cbb845-707c-496c-be87-4011d04eb235 50f94af3-e0ab-4896-bd3a-94ba7214340d             
sdb                                                                                                   
└─sdb1 ntfs     BC0AE0F90AE0B196                     4cccbd3c-01                          Data        
sdc                                                                                                   
├─sdc1 vfat     F4B8-1908                            0e2a5668-01                          UBUNTU 23_0 
└─sdc2                                               0e2a5668-02                                      

Mount points (filtered): _______________________________________________________

                           Avail Use% Mounted on
/dev/sda2                 505.9M   1% /mnt/boot-sav/sda2
/dev/sda3                  76.7G  29% /mnt/boot-sav/sda3
/dev/sdb1                 132.3G  72% /mnt/boot-sav/sdb1
/dev/sdc1                  10.2G  31% /cdrom
overlay                        0 100% /tmp/tmpfuzljpds/root.dir

Mount options (filtered): ______________________________________________________


===================== sda2/efi/ubuntu/grub.cfg (filtered) ======================

search.fs_uuid 09cbb845-707c-496c-be87-4011d04eb235 root hd0,gpt3 
set prefix=($root)'/boot/grub'
configfile $prefix/grub.cfg

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

Ubuntu   09cbb845-707c-496c-be87-4011d04eb235
Ubuntu, with Linux 6.2.0-33-generic   09cbb845-707c-496c-be87-4011d04eb235
Ubuntu, with Linux 6.2.0-32-generic   09cbb845-707c-496c-be87-4011d04eb235
### END /etc/grub.d/30_os-prober ###
### END /etc/grub.d/30_uefi-firmware ###

========================== sda3/etc/fstab (filtered) ===========================

# <file system> <mount point>   <type>  <options>       <dump>  <pass>
# / was on /dev/sda3 during installation
UUID=09cbb845-707c-496c-be87-4011d04eb235 /               ext4    errors=remount-ro 0       1
# /boot/efi was on /dev/sda2 during installation
UUID=4923-9CD3  /boot/efi       vfat    umask=0077      0       1
/swapfile                                 none            swap    sw              0       0

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

GRUB_DEFAULT=0
GRUB_TIMEOUT_STYLE=hidden
GRUB_TIMEOUT=0
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
GRUB_CMDLINE_LINUX=""

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

           GiB - GB             File                                 Fragment(s)
  23.685947418 = 25.432592384   boot/grub/grub.cfg                             1
 106.792854309 = 114.667954176  boot/grub/i386-pc/core.img                     1
  24.343936920 = 26.139103232   boot/vmlinuz                                   2
  35.851749420 = 38.495522816   boot/vmlinuz-6.2.0-32-generic                  2
  24.343936920 = 26.139103232   boot/vmlinuz-6.2.0-33-generic                  2
  35.851749420 = 38.495522816   boot/vmlinuz.old                               2
  41.480754852 = 44.539621376   boot/initrd.img                                1
  41.699428558 = 44.774420480   boot/initrd.img-6.2.0-32-generic               1
  41.480754852 = 44.539621376   boot/initrd.img-6.2.0-33-generic               1
  41.699428558 = 44.774420480   boot/initrd.img.old                            1

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

-rwxr-xr-x 1 root root 18683 Apr 15  2022 10_linux
-rwxr-xr-x 1 root root 43263 Dec  9  2022 10_linux_zfs
-rwxr-xr-x 1 root root 14387 Dec 18  2022 20_linux_xen
-rwxr-xr-x 1 root root 13369 Apr 15  2022 30_os-prober
-rwxr-xr-x 1 root root  1372 Apr 15  2022 30_uefi-firmware
-rwxr-xr-x 1 root root   722 Feb 26  2023 35_fwupd
-rwxr-xr-x 1 root root   214 Sep  2  2021 40_custom
-rwxr-xr-x 1 root root   215 Apr 15  2022 41_custom

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

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

==================== sdc1: 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 would reinstall the grub-efi of
sda3,
using the following options:  sda2/boot/efi
Additional repair would be performed: unhide-bootmenu-10s use-standard-efi-file

Blockers in case of suggested repair: __________________________________________

 The current session is in BIOS-compatibility mode. Please disable BIOS-compatibility/CSM/Legacy mode in your UEFI firmware, and use this software from a live-CD (or live-USB) that is compatible with UEFI booting mode. For example, use a live-USB of Boot-Repair-Disk-64bit (www.sourceforge.net/p/boot-repair-cd), after making sure your BIOS is set up to boot USB in EFI mode. This will enable this feature.

Final advice in case of suggested repair: ______________________________________

Please do not forget to make your UEFI firmware boot on the Ubuntu 23.04 entry (sda2/efi/****/grub****.efi (**** will be updated in the final message) file) !
The boot of your PC is in BIOS-compatibility/CSM/Legacy mode. You may want to retry after changing it to UEFI mode.

为了更清楚地了解我的 CPU,以下是 GParted 在 Live USB 上显示的内容:

GParted 屏幕截图

我想了解为什么即使在更改了 BIOS 中的设置后,我也无法使用带有 GPT 分区的实时 USB 启动 UEFI。最终,我想修复升级到 Ubuntu 23.04 后的启动问题。

Rufus 配置制作可启动 USB;

Rufus 配置制作可启动 USB

答案1

(我不允许发表评论,因此我将尝试从这里提供一些建议)

在使用 USB 拇指之前

1-当您启动 ubuntu 时,是否会出现 grub boatloader 菜单?如果没有,请尝试在出现公司徽标时按 F4,然后您可以选择:

  • Ubuntu 操作系统入门

  • 启动到恢复模式,这是一个命令行界面

  • 更改固件设置,从那里您可以禁用安全启动并禁用传统模式,还可以更改启动顺序。

如果以上方法均无效:

1- 无论是 BIOS 还是 EFI,只要您从启动固件中选择,您就能够启动到实时 USB(启动时连续按 F12)

2-选择从 UEFI 模式启动,安全模式关闭

这将帮助您启动您的操作系统或实时 USB。

相关内容