启动时启动菜单消失了

启动时启动菜单消失了
  • 我有一个装有 Ubuntu 的 SSD。我想将其作为我的默认操作系统。

  • 我有一块装有 Windows 10 的旧硬盘
  • 它还有另外两个分区:
    • 一个名为 HDRECOVERY 30GB
    • 另一个称为“系统”~1.5GB
    • 据我所知他们一直在那里。
  • 我使用 GParted 将这 3 个分区复制并粘贴到 SSD 中。
  • Ubuntu OS 分区仍在 SSD 上。

  • 我希望在启动时显示 grub 菜单,以便我在 Ubuntu 或 Windows 之间进行选择。

  • (如果我不按任何键,还会在 1 秒内选择默认操作系统)。

  • 请看图片(Gparted 说了一些关于 EFI 分区的事情)

  • 还有我的启动信息文件。

  • 我在 SSD 上安装了另外 2 个 Ubuntu 操作系统,但是我把它们删除了。

关于 EFI 分区的警告和 SSD 分区的信息:

1.关于 EFI 分区的警告和 SSD 分区的信息

旧 Windows HDD 分区:

2.旧 Windows HDD 分区

3. 启动修复启动信息摘要

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

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

sda1: __________________________________________________________________________

    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

sda2: __________________________________________________________________________

    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

sda3: __________________________________________________________________________

    File system:       ntfs
    Boot sector type:  Windows 7/2008: NTFS
    Boot sector info:  No errors found in the Boot Parameter Block.
    Operating System:  Windows 10 or 11
    Boot files:        /bootmgr /Boot/BCD /Windows/System32/winload.exe

sda4: __________________________________________________________________________

    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:        /BOOTMGR /BOOT/BCD

sda5: __________________________________________________________________________

    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:        /bootmgr /Boot/BCD

sdb1: __________________________________________________________________________

    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:        /bootmgr /Boot/BCD

sdb2: __________________________________________________________________________

    File system:       ntfs
    Boot sector type:  Windows 7/2008: NTFS
    Boot sector info:  No errors found in the Boot Parameter Block.
    Operating System:  Windows 10 or 11
    Boot files:        /bootmgr /Boot/BCD /Windows/System32/winload.exe

sdb3: __________________________________________________________________________

    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:        /BOOTMGR /BOOT/BCD

sdc1: __________________________________________________________________________

    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

sdc2: __________________________________________________________________________

    File system:       ext4
    Boot sector type:  -
    Boot sector info: 
    Operating System:  
    Boot files:        


================================ 3 OS detected =================================

OS#1:   Ubuntu 23.04 on sda2
OS#2:   Windows 10 or 11 on sdb2
OS#3:   Windows 10 or 11 on sda3

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

CPU architecture: 64-bit
Video: Juniper XT [Radeon HD 5770] from Advanced Micro Devices, Inc. [AMD/ATI]
BOOT_IMAGE of the installed session in use:
/boot/vmlinuz-6.2.0-35-generic root=UUID=7721dc66-670f-49d9-ada4-9bd9ed8ae9f0 ro quiet splash vt.handoff=7
df -Th / : /dev/sda2      ext4  272G  114G  147G  44% /

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

BIOS/UEFI firmware: A09(4.6) from Dell Inc.
The firmware is EFI-compatible, and is set in EFI-mode for this installed-session.
SecureBoot disabled (confirmed by mokutil).
BootCurrent: 0001
Timeout: 0 seconds
BootOrder: 0001,0005,0000
Boot0000* P0: CT500MX500SSD1                BBS(17,,0x0)
Boot0001* ubuntu    HD(1,GPT,0d500ce1-3caf-4777-9310-eb46b8c70070,0x800,0x100000)/File(\EFI\ubuntu\shimx64.efi)
Boot0005* UEFI: ST3400620AS PciRoot(0x0)/Pci(0x1f,0x2)/Sata(5,65535,0)/HD(1,GPT,ae2dc451-0ed4-4c63-90af-24462cd5c32b,0x800,0x100000)AMBO

85fa9d77b929ec4231aba29476574eb6   sdc1/BOOT/fbx64.efi
469e608783843a701d172242f016c79c   sdc1/BOOT/mmx64.efi
51cfb66bc06dfbc97be2a010ebef52f3   sdc1/ubuntu/grubx64.efi
469e608783843a701d172242f016c79c   sdc1/ubuntu/mmx64.efi
728124f6ec8e22fbdbe7034812c81b95   sdc1/ubuntu/shimx64.efi
728124f6ec8e22fbdbe7034812c81b95   sdc1/BOOT/BOOTX64.efi
0a832cd2c33c8a146b78778df8d33417   sda1/BOOT/fbx64.efi
abfc1dc97795531c0390328f9dd1a281   sda1/BOOT/mmx64.efi
3ad13dc8bad0a2342b6a3422e4187bfa   sda1/ubuntu/grubx64.efi
abfc1dc97795531c0390328f9dd1a281   sda1/ubuntu/mmx64.efi
64349b3622c65f495a99dbf6102496e3   sda1/ubuntu/shimx64.efi
64349b3622c65f495a99dbf6102496e3   sda1/BOOT/BOOTX64.efi

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

Disks info: ____________________________________________________________________

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

Partitions info (1/3): _________________________________________________________

sda2    : is-os,    64, apt-get,    signed grub-pc grub-efi ,   grub2,  grub-install,   grubenv-ok, update-grub,    farbios
sdb2    : is-os,    64, nopakmgr,   no-docgrub, nogrub, nogrubinstall,  no-grubenv, noupdategrub,   farbios
sdb3    : 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
sdc2    : no-os,    64, nopakmgr,   no-docgrub, nogrub, nogrubinstall,  no-grubenv, noupdategrub,   farbios
sdc1    : no-os,    64, nopakmgr,   no-docgrub, nogrub, nogrubinstall,  no-grubenv, noupdategrub,   not-far
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
sda3    : is-os,    64, nopakmgr,   no-docgrub, nogrub, nogrubinstall,  no-grubenv, noupdategrub,   farbios
sda1    : no-os,    64, nopakmgr,   no-docgrub, nogrub, nogrubinstall,  no-grubenv, noupdategrub,   not-far

Partitions info (2/3): _________________________________________________________

sda2    : isnotESP, fstab-has-goodEFI,  no-nt,  no-winload, no-recov-nor-hid,   no-bmgr,    notwinboot
sdb2    : isnotESP, part-has-no-fstab,  no-nt,  haswinload, no-recov-nor-hid,   bootmgr,    is-winboot
sdb3    : isnotESP, part-has-no-fstab,  no-nt,  no-winload, no-recov-nor-hid,   BOOTMGR,    is-winboot
sdb1    : isnotESP, part-has-no-fstab,  no-nt,  no-winload, no-recov-nor-hid,   bootmgr,    is-winboot
sdc2    : isnotESP, part-has-no-fstab,  no-nt,  no-winload, no-recov-nor-hid,   no-bmgr,    notwinboot
sdc1    : 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,   BOOTMGR,    is-winboot
sda5    : isnotESP, part-has-no-fstab,  no-nt,  no-winload, no-recov-nor-hid,   bootmgr,    is-winboot
sda3    : isnotESP, part-has-no-fstab,  no-nt,  haswinload, no-recov-nor-hid,   bootmgr,    is-winboot
sda1    : is---ESP, part-has-no-fstab,  no-nt,  no-winload, no-recov-nor-hid,   no-bmgr,    notwinboot

Partitions info (3/3): _________________________________________________________

sda2    : not--sepboot, with-boot,  fstab-without-boot, not-sep-usr,    with--usr,  fstab-without-usr,  std-grub.d, sda
sdb2    : 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
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
sdc1    : not--sepboot, no---boot,  part-has-no-fstab,  not-sep-usr,    no---usr,   part-has-no-fstab,  no--grub.d, sdc
sda4    : not--sepboot, no---boot,  part-has-no-fstab,  not-sep-usr,    no---usr,   part-has-no-fstab,  no--grub.d, sda
sda5    : 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
sda1    : not--sepboot, no---boot,  part-has-no-fstab,  not-sep-usr,    no---usr,   part-has-no-fstab,  no--grub.d, sda

fdisk -l (filtered): ___________________________________________________________

Disk sda: 465.76 GiB, 500107862016 bytes, 976773168 sectors
Disk identifier: 04EE2CC7-0B1E-456B-B582-9BD6F9001E50
          Start       End   Sectors   Size Type
sda1       2048   1050623   1048576   512M EFI System
sda2    1050624 580913151 579862528 276.5G Linux filesystem
sda3  651167744 976773119 325605376 155.3G Microsoft basic data
sda4  580913152 644124671  63211520  30.1G Microsoft basic data
sda5  644124672 647196671   3072000   1.5G Microsoft basic data
Partition table entries are not in disk order.
Disk sdb: 698.64 GiB, 750156374016 bytes, 1465149168 sectors
Disk identifier: 0x80166e8e
      Boot      Start        End   Sectors  Size Id Type
sdb1  *          2048    3074047   3072000  1.5G 27 Hidden NTFS WinRE
sdb2          3074048  326035455 322961408  154G  7 HPFS/NTFS/exFAT
sdb3       1401937920 1465149167  63211248 30.1G  7 HPFS/NTFS/exFAT
Disk sdc: 372.61 GiB, 400088457216 bytes, 781422768 sectors
Disk identifier: 32AC7E5D-E832-402F-A60D-D7CE1A6B2235
        Start       End   Sectors   Size Type
sdc1     2048   1050623   1048576   512M EFI System
sdc2  1050624 781422591 780371968 372.1G Linux filesystem

parted -lm (filtered): _________________________________________________________

sda:500GB:scsi:512:4096:gpt:ATA CT500MX500SSD1:;
1:1049kB:538MB:537MB:fat32:EFI System Partition:boot, esp;
2:538MB:297GB:297GB:ext4::;
4:297GB:330GB:32.4GB:ntfs::msftdata;
5:330GB:331GB:1573MB:ntfs::msftdata;
3:333GB:500GB:167GB:ntfs::msftdata;
sdb:750GB:scsi:512:512:msdos:ATA TOSHIBA MK7575GS:;
1:1049kB:1574MB:1573MB:ntfs::boot, msftres;
2:1574MB:167GB:165GB:ntfs::;
3:718GB:750GB:32.4GB:ntfs::;
sdc:400GB:scsi:512:512:gpt:ATA ST3400620AS:;
1:1049kB:538MB:537MB:fat32:EFI System Partition:boot, esp;
2:538MB:400GB:400GB:ext4::;

Free space >10MiB: ______________________________________________________________

sda: 316014MiB:317953MiB:1939MiB
sdb: 159197MiB:684540MiB:525343MiB

blkid (filtered): ______________________________________________________________

NAME   FSTYPE   UUID                                 PARTUUID                             LABEL            PARTLABEL
sda                                                                                                        
├─sda1 vfat     FEF5-4DCC                            0d500ce1-3caf-4777-9310-eb46b8c70070                  EFI System Partition
├─sda2 ext4     7721dc66-670f-49d9-ada4-9bd9ed8ae9f0 a62714f5-3c4a-47ad-a7b4-c81db85abe92                  
├─sda3 ntfs     1AA2CB52A2CB3155                     b87b2f97-ea37-42dc-ac62-2e11ce036e60 S3A9360D003      
├─sda4 ntfs     08DACB13DACAFBC6                     c5e49433-5b44-4578-b5ed-a0e45c4546db HDDRECOVERY      
└─sda5 ntfs     FAF2A25EF2A21F3F                     3906bfa4-5cc2-49c5-baf8-865680ad865f System           
sdb                                                                                                        
├─sdb1 ntfs     FAF2A25EF2A21F3F                     80166e8e-01                          System           
├─sdb2 ntfs     1AA2CB52A2CB3155                     80166e8e-02                          S3A9360D003      
└─sdb3 ntfs     08DACB13DACAFBC6                     80166e8e-03                          HDDRECOVERY      
sdc                                                                                                        
├─sdc1 vfat     824F-2C68                            ae2dc451-0ed4-4c63-90af-24462cd5c32b                  EFI System Partition
└─sdc2 ext4     16174ce1-6da6-4771-93b5-846542403699 03521d59-a3c5-46b1-b516-09438165d480 Backup.Ext4.Linu 
sdd                                                                                                        
sde                                                                                                        
sdf                                                                                                        
sdg                                                                                                        
sdh                                                                                                        
sdi                                                                                                        
sdj                                                                                                        
sdk                                                                                                        

Mount points (filtered): _______________________________________________________

                                Avail Use% Mounted on
/dev/sda1                      504.9M   1% /mnt/boot-sav/sda1
/dev/sda2                      146.3G  42% /
/dev/sda3                        127G  18% /mnt/boot-sav/sda3
/dev/sda4                       18.8G  38% /mnt/boot-sav/sda4
/dev/sda5                      899.9M  40% /mnt/boot-sav/sda5
/dev/sdb1                      899.9M  40% /mnt/boot-sav/sdb1
/dev/sdb2                      125.8G  18% /mnt/boot-sav/sdb2
/dev/sdb3                       18.8G  38% /mnt/boot-sav/sdb3
/dev/sdc1                      505.8M   1% /mnt/boot-sav/sdc1
/dev/sdc2                         13G  91% /mnt/boot-sav/sdc2

Mount options (filtered): ______________________________________________________


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

search.fs_uuid 7721dc66-670f-49d9-ada4-9bd9ed8ae9f0 root hd0,gpt2 
set prefix=($root)'/boot/grub'
configfile $prefix/grub.cfg

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

Ubuntu   7721dc66-670f-49d9-ada4-9bd9ed8ae9f0
Ubuntu, with Linux 6.2.0-35-generic   7721dc66-670f-49d9-ada4-9bd9ed8ae9f0
Ubuntu, with Linux 6.2.0-34-generic   7721dc66-670f-49d9-ada4-9bd9ed8ae9f0
### END /etc/grub.d/30_os-prober ###
UEFI Firmware Settings   uefi-firmware
### END /etc/grub.d/30_uefi-firmware ###

========================== sda2/etc/fstab (filtered) ===========================

# <file system> <mount point>   <type>  <options>       <dump>  <pass>
# / was on /dev/sda2 during installation
UUID=7721dc66-670f-49d9-ada4-9bd9ed8ae9f0 /               ext4    errors=remount-ro 0       1
# /boot/efi was on /dev/sda1 during installation
UUID=FEF5-4DCC  /boot/efi       vfat    umask=0077      0       1
/swapfile                                 none            swap    sw              0       0

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

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

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

           GiB - GB             File                                 Fragment(s)
 118.833667755 = 127.596679168  boot/grub/grub.cfg                             1
  84.110347748 = 90.312798208   boot/vmlinuz                                   2
  88.248229980 = 94.755815424   boot/vmlinuz-6.2.0-34-generic                  2
  84.110347748 = 90.312798208   boot/vmlinuz-6.2.0-35-generic                  2
  88.248229980 = 94.755815424   boot/vmlinuz.old                               2
 118.822532654 = 127.584722944  boot/initrd.img                                1
 114.360347748 = 122.793488384  boot/initrd.img-6.2.0-34-generic               2
 118.822532654 = 127.584722944  boot/initrd.img-6.2.0-35-generic               1
 114.360347748 = 122.793488384  boot/initrd.img.old                            2

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

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

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

search.fs_uuid 63cbe742-c384-4932-a1b8-46d4902d8451 root hd0,gpt2 
set prefix=($root)'/boot/grub'
configfile $prefix/grub.cfg



Suggested repair: ______________________________________________________________

The default repair of the Boot-Repair utility would reinstall the grub-efi of
sda2,
using the following options:  sda1/boot/efi
Additional repair would be performed: unhide-bootmenu-10s use-standard-efi-file

Blockers in case of suggested repair: __________________________________________

LegacyWindows detected. Please enable BIOS-compatibility/CSM/Legacy mode in your UEFI firmware, and use this software from a live-CD (or live-USB). 

Confirmation request before suggested repair: __________________________________

LegacyWindows detected. You may want to retry after deactivating the [Separate /boot/efi partition:] option.
Are you sure you want to continue anyway?

Final advice in case of suggested repair: ______________________________________

Please do not forget to make your UEFI firmware boot on the Ubuntu 23.04 entry (sda1/efi/****/grub****.efi (**** will be updated in the final message) file) !

4. 我的旧 grub.cfg 和我的新 grub.cfg

  • 我现在无法编辑 grub.cfg。我不知道为什么。我以前做过(不知怎么的。我不是这方面的专家)

我应该将 Windows 和 Ubuntu 放在不同的驱动器上吗?我听说 Windows 更新可以删除双启动中的其他操作系统。

相关内容