我有 2 个硬盘。Windows 和 Ubuntu 都有单独的专用驱动器。但 Ubuntu Grub 菜单在启动时不会显示。我检查了磁盘,它清楚地表明有 Windows 启动文件和所有内容。
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0xa67451ca
Device Boot Start End Sectors Size Id Type
/dev/sda1 * 2048 1050623 1048576 512M b W95 FAT32
/dev/sda2 1050624 467521535 466470912 222.4G 7 HPFS/NTFS/exFAT
/dev/sda3 467521536 468856831 1335296 652M 27 Hidden NTFS WinRE
Disk /dev/sdb: 931.51 GiB, 1000204886016 bytes, 1953525168 sectors
Disk model: TOSHIBA DT01ACA1
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: C17AC212-7110-4A9F-B0A3-728932A315AE
Device Start End Sectors Size Type
/dev/sdb1 2048 1050623 1048576 512M EFI System
/dev/sdb2 1050624 1953523711 1952473088 931G Linux filesystem
我尝试更新 grub,但它没有显示 Windows 11。
~$ sudo update-grub
Sourcing file `/etc/default/grub'
Sourcing file `/etc/default/grub.d/init-select.cfg'
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-5.15.0-52-generic
Found initrd image: /boot/initrd.img-5.15.0-52-generic
Found linux image: /boot/vmlinuz-5.15.0-43-generic
Found initrd image: /boot/initrd.img-5.15.0-43-generic
Memtest86+ needs a 16-bit boot, that is not available on EFI, exiting
Warning: os-prober will not be executed to detect other bootable partitions.
Systems on them will not be added to the GRUB boot configuration.
Check GRUB_DISABLE_OS_PROBER documentation entry.
Adding boot menu entry for UEFI Firmware Settings ...
done
任何帮助都将非常感激。
答案1
Grub 无法看到您的 Windows 安装,因为 OS-prober 已禁用。
请参阅您发布的输出中的语句:
Warning: os-prober will not be executed to detect other bootable partitions.
Systems on them will not be added to the GRUB boot configuration.
Check GRUB_DISABLE_OS_PROBER documentation entry.
您可以在 中/etc/grub.d
找到一个名为的文件.script.sources.txt
,您可以在其中修复此问题。删除或类似内容的行disable 30_OS-prober
,然后添加行"proxifiedScripts/os-prober";"30_os-prober"
。最有可能的数字是 30。在同一个文件夹中,您有所有不同的脚本,因此您可以检查数字。您必须按 执行此操作root
。首先备份文件并调用它.script.sources.txt.bck
!!
OS_prober 脚本的功能是搜索其他可启动的操作系统。