在 /etc/fstab 中:

在 /etc/fstab 中:

一旦我从 Ubuntu 23.04 升级到 23.10,我就无法再启动它了!

Gave up waiting for root device. Common problems:
 - Boot args (cat /proc/cmdline)
   - Check rootdelay= (did the system wait long enough?)
   - Check root= (did the system wait for the right device?)
 - Missing modules (cat /proc/modules; ls /dev)
ALERT! UUID=c0fc479f-b1cc-4e85-962b-43a72eec9e91 does not exist. Dropping to a shell!

BusyBox v1.36.1 (Ubuntu 1:1.36.1-3ubuntu1) built-in shell (ash)
Enter 'help' for a lost of built-in commands.
(initramfs)

我确保在 BIOS 设置中,系统配置中的 Sata 操作是 AHCI 而不是 RAID

我目前正在实时 USB 上运行 ubunut。我将文件中的 UUID 更改/etc/fstab为“dev/sdb5”。然后update-grub重新启动,但没有任何变化!

在 /etc/fstab 中:

GNU nano 7.2                       /etc/fstab                                 
# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
# / was on /dev/sdb5 during curtin installation
# /dev/disk/by-uuid/c0fc479f-b1cc-4e85-962b-43a72eec9e91 / ext4 defaults 0 1
# /boot/efi was on /dev/sdb1 during curtin installation
#/ dev/disk/by-uuid/1292-A439 /boot/efi vfat defaults 0 1
# UUID=c0fc479f-b1cc-4e85-962b-43a72eec9e91 / ext4 defaults 0 1

# <file system> <mount point>   <type>  <options>       <dump>  <pass>
/dev/sdb5       /               ext4    errors=remount-ro    0  1
/swapfile       swap            swap    defaults             0  0
/swap.img       none            swap    sw                   0  0
LABEL=Omar      /mnt/Omar       auto    nosuid,nodev,nofail,x-gvfs-show 0 0
/dev/sdc4       /mnt/sdc4       auto    nosuid,nodev,nofail,x-gvfs-show 0 0

/dev/sdb5: UUID="c0fc479f-b1cc-4e85-962b-43a72eec9e91" BLOCK_SIZE="4096" TYPE="ext4" PARTUUID="a2f6a2d2-f40f-cd41-b4a7-61b12759b403"
/dev/loop1: BLOCK_SIZE="131072" TYPE="squashfs"
/dev/sdd2: SEC_TYPE="msdos" LABEL_FATBOOT="ESP" LABEL="ESP" UUID="6F54-CACE" BLOCK_SIZE="512" TYPE="vfat" PARTLABEL="Appended2" PARTUUID="2a585014-a55f-4771-aef0-695c6f9e0059"
/dev/sdd1: BLOCK_SIZE="2048" UUID="2023-10-16-11-29-57-00" LABEL="Ubuntu 23.10.1 amd64" TYPE="iso9660" PARTLABEL="ISO9660" PARTUUID="2a585014-a55f-4771-aef3-695c6f9e0059"
/dev/sdd4: LABEL="writable" UUID="10e8c979-c7d9-4177-8fc4-d35e6e07519e" BLOCK_SIZE="4096" TYPE="ext4" PARTUUID="ab5ae46b-1d76-4bc4-89aa-bfdce9a78047"
/dev/loop8: BLOCK_SIZE="131072" TYPE="squashfs"
/dev/sdb4: BLOCK_SIZE="512" UUID="01D9D8E852906F70" TYPE="ntfs" PARTUUID="4be8ef1d-c5da-4121-b27e-7d2b3503538b"
/dev/sdb3: BLOCK_SIZE="512" UUID="01D9D8E850480610" TYPE="ntfs" PARTLABEL="Basic data partition" PARTUUID="64b110ca-af78-4621-80d3-4f19c7181db2"
/dev/sdb1: UUID="1292-A439" BLOCK_SIZE="512" TYPE="vfat" PARTLABEL="EFI System Partition" PARTUUID="684257cf-73a2-482d-a9e1-11ce37103972"
/dev/loop6: BLOCK_SIZE="131072" TYPE="squashfs"
/dev/loop4: BLOCK_SIZE="131072" TYPE="squashfs"
/dev/loop11: BLOCK_SIZE="131072" TYPE="squashfs"
/dev/loop2: BLOCK_SIZE="131072" TYPE="squashfs"
/dev/loop0: BLOCK_SIZE="131072" TYPE="squashfs"
/dev/loop9: BLOCK_SIZE="131072" TYPE="squashfs"
/dev/sdc1: BLOCK_SIZE="512" UUID="01D9E9BD38CA67E0" TYPE="ntfs" PARTUUID="209e706a-01"
/dev/loop7: BLOCK_SIZE="131072" TYPE="squashfs"
/dev/sda2: UUID="C5B4-CDD0" BLOCK_SIZE="512" TYPE="vfat" PARTLABEL="Basic data partition" PARTUUID="000fa007-bb10-5095-3efd-db2d0e401f00"
/dev/sda1: LABEL="Omar" BLOCK_SIZE="512" UUID="01DA00F083D02BE0" TYPE="ntfs" PARTLABEL="Basic data partition" PARTUUID="f64af970-d8e4-01d9-b878-257b72ecec00"
/dev/loop5: BLOCK_SIZE="131072" TYPE="squashfs"
/dev/loop12: BLOCK_SIZE="131072" TYPE="squashfs"
/dev/loop3: BLOCK_SIZE="131072" TYPE="squashfs"
/dev/loop10: BLOCK_SIZE="131072" TYPE="squashfs"
/dev/sdd3: PARTLABEL="Gap1" PARTUUID="2a585014-a55f-4771-aef1-695c6f9e0059"
/dev/sdb2: PARTLABEL="Microsoft reserved partition" PARTUUID="ffb570be-97c1-4b52-ae3a-59c8da2a3101"

fdisk -l

Disk /dev/loop0: 1.62 GiB, 1734254592 bytes, 3387216 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/loop1: 412.77 MiB, 432820224 bytes, 845352 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/loop2: 776.54 MiB, 814256128 bytes, 1590344 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/loop3: 240.51 MiB, 252190720 bytes, 492560 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/loop4: 73.9 MiB, 77492224 bytes, 151352 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/loop5: 4 KiB, 4096 bytes, 8 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/loop6: 11.2 MiB, 11747328 bytes, 22944 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/loop7: 496.98 MiB, 521121792 bytes, 1017816 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/sda: 465.76 GiB, 500107862016 bytes, 976773168 sectors
Disk model: ST500DM002-1BD14
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: gpt
Disk identifier: EC95E2E0-B1C9-03B3-B878-257B72ECEC00

Device         Start       End   Sectors   Size Type
/dev/sda1       4096 523642879 523638784 249.7G Microsoft basic data
/dev/sda2  523642880 976764927 453122048 216.1G Microsoft basic data


Disk /dev/sdb: 238.47 GiB, 256060514304 bytes, 500118192 sectors
Disk model: SAMSUNG MZ7LN256
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 0E99A25E-4EAC-4265-964D-4D4FF9CF3DD0

Device         Start       End   Sectors   Size Type
/dev/sdb1       2048   4392959   4390912   2.1G EFI System
/dev/sdb2    4392960   4425727     32768    16M Microsoft reserved
/dev/sdb3    4425728 251897855 247472128   118G Microsoft basic data
/dev/sdb4  251897856 253358079   1460224   713M Windows recovery environment
/dev/sdb5  253358080 500117503 246759424 117.7G Linux filesystem


Disk /dev/sdc: 298.09 GiB, 320072933376 bytes, 625142448 sectors
Disk model: SAMSUNG HD322GJ 
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x209e706a

Device     Boot Start       End   Sectors   Size Id Type
/dev/sdc1        2048 625127423 625125376 298.1G  7 HPFS/NTFS/exFAT


Disk /dev/sdd: 28.82 GiB, 30943995904 bytes, 60437492 sectors
Disk model: DataTraveler 3.0
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 2A585014-A55F-4771-AEF2-695C6F9E0059

Device        Start      End  Sectors  Size Type
/dev/sdd1        64 10094759 10094696  4.8G Microsoft basic data
/dev/sdd2  10094760 10104795    10036  4.9M EFI System
/dev/sdd3  10104796 10105395      600  300K Microsoft basic data
/dev/sdd4  10108928 60436479 50327552   24G Linux filesystem


Disk /dev/loop8: 91.69 MiB, 96141312 bytes, 187776 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/loop9: 10.52 MiB, 11026432 bytes, 21536 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/loop10: 40.86 MiB, 42840064 bytes, 83672 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/loop11: 452 KiB, 462848 bytes, 904 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/loop12: 130.95 MiB, 137310208 bytes, 268184 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

sdb5(安装有 Ubuntu 的地方)上的 SMART 测试结果

smartctl 7.3 2022-02-28 r5338 [x86_64-linux-6.5.0-9-generic] (local build)
Copyright (C) 2002-22, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF INFORMATION SECTION ===
Model Family:     Samsung based SSDs
Device Model:     SAMSUNG MZ7LN256HCHP-000L7
Serial Number:    S20HNXAH205538
LU WWN Device Id: 5 002538 d00000000
Firmware Version: EMT03L6Q
User Capacity:    256,060,514,304 bytes [256 GB]
Sector Size:      512 bytes logical/physical
Rotation Rate:    Solid State Device
TRIM Command:     Available
Device is:        In smartctl database 7.3/5319
ATA Version is:   ACS-2, ATA8-ACS T13/1699-D revision 4c
SATA Version is:  SATA 3.1, 6.0 Gb/s (current: 6.0 Gb/s)
Local Time is:    Fri Nov 10 18:03:23 2023 UTC
SMART support is: Available - device has SMART capability.
SMART support is: Enabled

=== START OF READ SMART DATA SECTION ===
SMART overall-health self-assessment test result: PASSED

General SMART Values:
Offline data collection status:  (0x00) Offline data collection activity
                    was never started.
                    Auto Offline Data Collection: Disabled.
Self-test execution status:      (   0) The previous self-test routine completed
                    without error or no self-test has ever 
                    been run.
Total time to complete Offline 
data collection:        (    0) seconds.
Offline data collection
capabilities:            (0x53) SMART execute Offline immediate.
                    Auto Offline data collection on/off support.
                    Suspend Offline collection upon new
                    command.
                    No Offline surface scan supported.
                    Self-test supported.
                    No Conveyance Self-test supported.
                    Selective Self-test supported.
SMART capabilities:            (0x0003) Saves SMART data before entering
                    power-saving mode.
                    Supports SMART auto save timer.
Error logging capability:        (0x01) Error logging supported.
                    General Purpose Logging supported.
Short self-test routine 
recommended polling time:    (   2) minutes.
Extended self-test routine
recommended polling time:    ( 133) minutes.
SCT capabilities:          (0x003d) SCT Status supported.
                    SCT Error Recovery Control supported.
                    SCT Feature Control supported.
                    SCT Data Table supported.

SMART Attributes Data Structure revision number: 1
Vendor Specific SMART Attributes with Thresholds:
ID# ATTRIBUTE_NAME          FLAG     VALUE WORST THRESH TYPE      UPDATED  WHEN_FAILED RAW_VALUE
  5 Reallocated_Sector_Ct   0x0033   100   100   010    Pre-fail  Always       -       0
  9 Power_On_Hours          0x0032   092   092   000    Old_age   Always       -       37035
 12 Power_Cycle_Count       0x0032   096   096   000    Old_age   Always       -       3629
170 Unused_Rsvd_Blk_Ct_Chip 0x0032   100   100   010    Old_age   Always       -       0
171 Program_Fail_Count_Chip 0x0032   100   100   010    Old_age   Always       -       0
172 Erase_Fail_Count_Chip   0x0032   100   100   010    Old_age   Always       -       0
173 Wear_Leveling_Count     0x0033   087   087   005    Pre-fail  Always       -       268
174 Unexpect_Power_Loss_Ct  0x0032   099   099   000    Old_age   Always       -       416
178 Used_Rsvd_Blk_Cnt_Chip  0x0013   100   100   010    Pre-fail  Always       -       0
180 Unused_Rsvd_Blk_Cnt_Tot 0x0013   100   100   010    Pre-fail  Always       -       723
184 End-to-End_Error        0x0033   100   100   097    Pre-fail  Always       -       0
187 Uncorrectable_Error_Cnt 0x0032   100   100   000    Old_age   Always       -       0
194 Temperature_Celsius     0x0032   070   035   000    Old_age   Always       -       30
199 CRC_Error_Count         0x003e   099   099   000    Old_age   Always       -       1
233 Media_Wearout_Indicator 0x0013   086   086   000    Pre-fail  Always       -       14529068
241 Total_LBAs_Written      0x0032   099   099   000    Old_age   Always       -       25725
242 Total_LBAs_Read         0x0032   099   099   000    Old_age   Always       -       40003
249 NAND_Writes_1GiB        0x0032   099   099   000    Old_age   Always       -       68640

系统日志文件

https://filetransfer.io/data-package/R92DQfAA#link

更新:

我发现该grub.cfg文件仍然具有 UUID,而不是/dev/sdb5我在fstab文件中提到的那样。我更改 fstab 文件后更新了 grup

/boot/grub/grub.cfg

#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by grub-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#

### BEGIN /etc/grub.d/00_header ###
if [ -s $prefix/grubenv ]; then
  set have_grubenv=true
  load_env
fi
if [ "${initrdfail}" = 2 ]; then
   set initrdfail=
elif [ "${initrdfail}" = 1 ]; then
   set next_entry="${prev_entry}"
   set prev_entry=
   save_env prev_entry
   if [ "${next_entry}" ]; then
      set initrdfail=2
   fi
fi
if [ "${next_entry}" ] ; then
   set default="${next_entry}"
   set next_entry=
   save_env next_entry
   set boot_once=true
else
   set default="0"
fi

if [ x"${feature_menuentry_id}" = xy ]; then
  menuentry_id_option="--id"
else
  menuentry_id_option=""
fi

export menuentry_id_option

if [ "${prev_saved_entry}" ]; then
  set saved_entry="${prev_saved_entry}"
  save_env saved_entry
  set prev_saved_entry=
  save_env prev_saved_entry
  set boot_once=true
fi

function savedefault {
  if [ -z "${boot_once}" ]; then
    saved_entry="${chosen}"
    save_env saved_entry
  fi
}
function initrdfail {
    if [ -n "${have_grubenv}" ]; then if [ -n "${partuuid}" ]; then
      if [ -z "${initrdfail}" ]; then
        set initrdfail=1
        if [ -n "${boot_once}" ]; then
          set prev_entry="${default}"
          save_env prev_entry
        fi
      fi
      save_env initrdfail
    fi; fi
}
function recordfail {
  set recordfail=1
  if [ -n "${have_grubenv}" ]; then if [ -z "${boot_once}" ]; then save_env recordfail; fi; fi
}
function load_video {
  if [ x$feature_all_video_module = xy ]; then
    insmod all_video
  else
    insmod efi_gop
    insmod efi_uga
    insmod ieee1275_fb
    insmod vbe
    insmod vga
    insmod video_bochs
    insmod video_cirrus
  fi
}

if [ x$feature_default_font_path = xy ] ; then
   font=unicode
else
insmod part_gpt
insmod ext2
set root='hd1,gpt5'
if [ x$feature_platform_search_hint = xy ]; then
  search --no-floppy --fs-uuid --set=root --hint-bios=hd1,gpt5 --hint-efi=hd1,gpt5 --hint-baremetal=ahci1,gpt5 --hint='hd1,gpt5'  c0fc479f-b1cc-4e85-962b-43a72eec9e91
else
  search --no-floppy --fs-uuid --set=root c0fc479f-b1cc-4e85-962b-43a72eec9e91
fi
    font="/usr/share/grub/unicode.pf2"
fi

if loadfont $font ; then
  set gfxmode=auto
  load_video
  insmod gfxterm
fi
terminal_output gfxterm
insmod part_gpt
insmod ext2
set root='hd1,gpt5'
if [ x$feature_platform_search_hint = xy ]; then
  search --no-floppy --fs-uuid --set=root --hint-bios=hd1,gpt5 --hint-efi=hd1,gpt5 --hint-baremetal=ahci1,gpt5 --hint='hd1,gpt5'  c0fc479f-b1cc-4e85-962b-43a72eec9e91
else
  search --no-floppy --fs-uuid --set=root c0fc479f-b1cc-4e85-962b-43a72eec9e91
fi
insmod gfxmenu
loadfont ($root)/usr/share/grub/themes/Vimix/dejavu_32.pf2
loadfont ($root)/usr/share/grub/themes/Vimix/dejavu_sans_12.pf2
loadfont ($root)/usr/share/grub/themes/Vimix/dejavu_sans_14.pf2
loadfont ($root)/usr/share/grub/themes/Vimix/dejavu_sans_16.pf2
loadfont ($root)/usr/share/grub/themes/Vimix/dejavu_sans_24.pf2
loadfont ($root)/usr/share/grub/themes/Vimix/dejavu_sans_48.pf2
loadfont ($root)/usr/share/grub/themes/Vimix/terminus-12.pf2
loadfont ($root)/usr/share/grub/themes/Vimix/terminus-14.pf2
loadfont ($root)/usr/share/grub/themes/Vimix/terminus-16.pf2
loadfont ($root)/usr/share/grub/themes/Vimix/terminus-18.pf2
insmod jpeg
insmod png
set theme=($root)/usr/share/grub/themes/Vimix/theme.txt
export theme
if [ "${recordfail}" = 1 ] ; then
  set timeout=30
else
  if [ x$feature_timeout_style = xy ] ; then
    set timeout_style=hidden
    set timeout=0
  # Fallback hidden-timeout code in case the timeout_style feature is
  # unavailable.
  elif sleep --interruptible 0 ; then
    set timeout=0
  fi
fi
### END /etc/grub.d/00_header ###

### BEGIN /etc/grub.d/05_debian_theme ###
set menu_color_normal=white/black
set menu_color_highlight=black/light-gray
### END /etc/grub.d/05_debian_theme ###

### BEGIN /etc/grub.d/10_linux ###
function gfxmode {
    set gfxpayload="${1}"
    if [ "${1}" = "keep" ]; then
        set vt_handoff=vt.handoff=7
    else
        set vt_handoff=
    fi
}
if [ "${recordfail}" != 1 ]; then
  if [ -e ${prefix}/gfxblacklist.txt ]; then
    if [ ${grub_platform} != pc ]; then
      set linux_gfx_mode=keep
    elif hwmatch ${prefix}/gfxblacklist.txt 3; then
      if [ ${match} = 0 ]; then
        set linux_gfx_mode=keep
      else
        set linux_gfx_mode=text
      fi
    else
      set linux_gfx_mode=text
    fi
  else
    set linux_gfx_mode=keep
  fi
else
  set linux_gfx_mode=text
fi
export linux_gfx_mode
menuentry 'Ubuntu' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-c0fc479f-b1cc-4e85-962b-43a72eec9e91' {
    recordfail
    load_video
    gfxmode $linux_gfx_mode
    insmod gzio
    if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
    insmod part_gpt
    insmod ext2
    set root='hd1,gpt5'
    if [ x$feature_platform_search_hint = xy ]; then
      search --no-floppy --fs-uuid --set=root --hint-bios=hd1,gpt5 --hint-efi=hd1,gpt5 --hint-baremetal=ahci1,gpt5 --hint='hd1,gpt5'  c0fc479f-b1cc-4e85-962b-43a72eec9e91
    else
      search --no-floppy --fs-uuid --set=root c0fc479f-b1cc-4e85-962b-43a72eec9e91
    fi
    linux   /boot/vmlinuz-6.5.0-10-generic root=UUID=c0fc479f-b1cc-4e85-962b-43a72eec9e91 ro  quiet splash $vt_handoff
    initrd  /boot/initrd.img-6.5.0-10-generic
}
submenu 'Advanced options for Ubuntu' $menuentry_id_option 'gnulinux-advanced-c0fc479f-b1cc-4e85-962b-43a72eec9e91' {
    menuentry 'Ubuntu, with Linux 6.5.0-10-generic' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-6.5.0-10-generic-advanced-c0fc479f-b1cc-4e85-962b-43a72eec9e91' {
        recordfail
        load_video
        gfxmode $linux_gfx_mode
        insmod gzio
        if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
        insmod part_gpt
        insmod ext2
        set root='hd1,gpt5'
        if [ x$feature_platform_search_hint = xy ]; then
          search --no-floppy --fs-uuid --set=root --hint-bios=hd1,gpt5 --hint-efi=hd1,gpt5 --hint-baremetal=ahci1,gpt5 --hint='hd1,gpt5'  c0fc479f-b1cc-4e85-962b-43a72eec9e91
        else
          search --no-floppy --fs-uuid --set=root c0fc479f-b1cc-4e85-962b-43a72eec9e91
        fi
        echo    'Loading Linux 6.5.0-10-generic ...'
        linux   /boot/vmlinuz-6.5.0-10-generic root=UUID=c0fc479f-b1cc-4e85-962b-43a72eec9e91 ro  quiet splash $vt_handoff
        echo    'Loading initial ramdisk ...'
        initrd  /boot/initrd.img-6.5.0-10-generic
    }
    menuentry 'Ubuntu, with Linux 6.5.0-10-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-6.5.0-10-generic-recovery-c0fc479f-b1cc-4e85-962b-43a72eec9e91' {
        recordfail
        load_video
        insmod gzio
        if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
        insmod part_gpt
        insmod ext2
        set root='hd1,gpt5'
        if [ x$feature_platform_search_hint = xy ]; then
          search --no-floppy --fs-uuid --set=root --hint-bios=hd1,gpt5 --hint-efi=hd1,gpt5 --hint-baremetal=ahci1,gpt5 --hint='hd1,gpt5'  c0fc479f-b1cc-4e85-962b-43a72eec9e91
        else
          search --no-floppy --fs-uuid --set=root c0fc479f-b1cc-4e85-962b-43a72eec9e91
        fi
        echo    'Loading Linux 6.5.0-10-generic ...'
        linux   /boot/vmlinuz-6.5.0-10-generic root=UUID=c0fc479f-b1cc-4e85-962b-43a72eec9e91 ro single recovery nomodeset dis_ucode_ldr 
        echo    'Loading initial ramdisk ...'
        initrd  /boot/initrd.img-6.5.0-10-generic
    }
    menuentry 'Ubuntu, with Linux 6.5.0-9-generic' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-6.5.0-9-generic-advanced-c0fc479f-b1cc-4e85-962b-43a72eec9e91' {
        recordfail
        load_video
        gfxmode $linux_gfx_mode
        insmod gzio
        if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
        insmod part_gpt
        insmod ext2
        set root='hd1,gpt5'
        if [ x$feature_platform_search_hint = xy ]; then
          search --no-floppy --fs-uuid --set=root --hint-bios=hd1,gpt5 --hint-efi=hd1,gpt5 --hint-baremetal=ahci1,gpt5 --hint='hd1,gpt5'  c0fc479f-b1cc-4e85-962b-43a72eec9e91
        else
          search --no-floppy --fs-uuid --set=root c0fc479f-b1cc-4e85-962b-43a72eec9e91
        fi
        echo    'Loading Linux 6.5.0-9-generic ...'
        linux   /boot/vmlinuz-6.5.0-9-generic root=/dev/sdb5 ro  quiet splash $vt_handoff
    }
    menuentry 'Ubuntu, with Linux 6.5.0-9-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-6.5.0-9-generic-recovery-c0fc479f-b1cc-4e85-962b-43a72eec9e91' {
        recordfail
        load_video
        insmod gzio
        if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
        insmod part_gpt
        insmod ext2
        set root='hd1,gpt5'
        if [ x$feature_platform_search_hint = xy ]; then
          search --no-floppy --fs-uuid --set=root --hint-bios=hd1,gpt5 --hint-efi=hd1,gpt5 --hint-baremetal=ahci1,gpt5 --hint='hd1,gpt5'  c0fc479f-b1cc-4e85-962b-43a72eec9e91
        else
          search --no-floppy --fs-uuid --set=root c0fc479f-b1cc-4e85-962b-43a72eec9e91
        fi
        echo    'Loading Linux 6.5.0-9-generic ...'
        linux   /boot/vmlinuz-6.5.0-9-generic root=/dev/sdb5 ro single recovery nomodeset dis_ucode_ldr 
    }
    menuentry 'Ubuntu, with Linux 6.2.0-36-generic' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-6.2.0-36-generic-advanced-c0fc479f-b1cc-4e85-962b-43a72eec9e91' {
        recordfail
        load_video
        gfxmode $linux_gfx_mode
        insmod gzio
        if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
        insmod part_gpt
        insmod ext2
        set root='hd1,gpt5'
        if [ x$feature_platform_search_hint = xy ]; then
          search --no-floppy --fs-uuid --set=root --hint-bios=hd1,gpt5 --hint-efi=hd1,gpt5 --hint-baremetal=ahci1,gpt5 --hint='hd1,gpt5'  c0fc479f-b1cc-4e85-962b-43a72eec9e91
        else
          search --no-floppy --fs-uuid --set=root c0fc479f-b1cc-4e85-962b-43a72eec9e91
        fi
        echo    'Loading Linux 6.2.0-36-generic ...'
        linux   /boot/vmlinuz-6.2.0-36-generic root=UUID=c0fc479f-b1cc-4e85-962b-43a72eec9e91 ro  quiet splash $vt_handoff
        echo    'Loading initial ramdisk ...'
        initrd  /boot/initrd.img-6.2.0-36-generic
    }
    menuentry 'Ubuntu, with Linux 6.2.0-36-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-6.2.0-36-generic-recovery-c0fc479f-b1cc-4e85-962b-43a72eec9e91' {
        recordfail
        load_video
        insmod gzio
        if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
        insmod part_gpt
        insmod ext2
        set root='hd1,gpt5'
        if [ x$feature_platform_search_hint = xy ]; then
          search --no-floppy --fs-uuid --set=root --hint-bios=hd1,gpt5 --hint-efi=hd1,gpt5 --hint-baremetal=ahci1,gpt5 --hint='hd1,gpt5'  c0fc479f-b1cc-4e85-962b-43a72eec9e91
        else
          search --no-floppy --fs-uuid --set=root c0fc479f-b1cc-4e85-962b-43a72eec9e91
        fi
        echo    'Loading Linux 6.2.0-36-generic ...'
        linux   /boot/vmlinuz-6.2.0-36-generic root=UUID=c0fc479f-b1cc-4e85-962b-43a72eec9e91 ro single recovery nomodeset dis_ucode_ldr 
        echo    'Loading initial ramdisk ...'
        initrd  /boot/initrd.img-6.2.0-36-generic
    }
}

### END /etc/grub.d/10_linux ###

### BEGIN /etc/grub.d/10_linux_zfs ###
### END /etc/grub.d/10_linux_zfs ###

### BEGIN /etc/grub.d/20_linux_xen ###

### END /etc/grub.d/20_linux_xen ###

### BEGIN /etc/grub.d/25_bli ###
if [ "$grub_platform" = "efi" ]; then
  insmod bli
fi
### END /etc/grub.d/25_bli ###

### BEGIN /etc/grub.d/30_os-prober ###
### END /etc/grub.d/30_os-prober ###

### BEGIN /etc/grub.d/30_uefi-firmware ###
if [ "$grub_platform" = "efi" ]; then
    fwsetup --is-supported
    if [ "$?" = 0 ]; then
        menuentry 'UEFI Firmware Settings' $menuentry_id_option 'uefi-firmware' {
            fwsetup
        }
    fi
fi
### END /etc/grub.d/30_uefi-firmware ###

### BEGIN /etc/grub.d/40_custom ###
# This file provides an easy way to add custom menu entries.  Simply type the
# menu entries you want to add after this comment.  Be careful not to change
# the 'exec tail' line above.
### END /etc/grub.d/40_custom ###

### BEGIN /etc/grub.d/41_custom ###
if [ -f  ${config_directory}/custom.cfg ]; then
  source ${config_directory}/custom.cfg
elif [ -z "${config_directory}" -a -f  $prefix/custom.cfg ]; then
  source $prefix/custom.cfg
fi
### END /etc/grub.d/41_custom ###

答案1

天哪,我修好了它!!

首先,我真的不知道问题到底是什么。但是,我发现 EFI 分区可能已损坏。我按照以下步骤修复了这个问题(我认为这可以解决大多数类似的启动问题)。

以下是我解决大多数启动问题的方法:

1)创建启动修复 USB:

有些 Linux 发行版不支持启动修复,比如 Ubuntu 23,所以最好创建启动修复磁盘

2)启动实时启动修复 USB

这是一个经过修改的 Lubuntu 发行版,其中包含一个启动修复工具和一些修复其他启动问题的工具。运行启动修复工具并单击推荐修复。这可以解决大多数问题。如果这不能解决您的问题,请继续阅读。

3)清除所有内容

  • 这里您应该格式化 EFI 分区,因为它可能已损坏(就像我的情况一样)(您可以使用已在启动修复实时 USB 中安装的 GParted 工具。

  • 现在您可以使用以下方式重新创建此 EFI 分区这边走或者你可以使用 Windows USB 重新生成它(如果你有 Windows 和 Ubuntu 双启动)联合电力工程 膜生物反应器

  • 如果您使用 Windows USB 方法恢复它并恢复 Windows EFI 分区,您将能够在启动到 Windows 后打开 cmd 和管理员并运行以下命令:

    bcdedit /set {bootmgr} displaybootmenu yes

    bcdedit /set {bootmgr} path \EFI\ubuntu\grubx64.efi

  • 删除这些文件(或将其作为备份): etc/default/grub boot/grub/grub.cfg

  • 查看检查 `etc/fstab' 文件,确保其中没有错误。您可以查看这个问题这里和网上有很多关于如何修复损坏的 fstab 文件的主题。

  • 运行以下命令在实时 USB 终端中挂载和 chroot 你的 Ubuntu,但替换sdb5与安装 Ubuntu 的分区一致。

    sudo mount /dev/sdb5 /mnt && mount --rbind /dev /mnt/dev && mount --rbind /proc /mnt/proc && mount --rbind /sys /mnt/sys && chroot /mnt bash

  • 现在运行此命令来重新生成“etc/default/grub”文件:

    sudo apt-get remove --purge grub-pc && apt-get install grub-pc

  • 进而update-grub

4)再次运行启动修复工具

这里一切都会运转良好。:)

相关内容