测试环境:Kali Linux (2022.2),Windows 10(19044),UEFI(GPT)
症状分析:先装Windows 10,Windows可正常启动,再装Kali,Kali提示装grub后照装。然而装完后重启发现无Windows选项(也就是没有Windows Boot Manager后面跟一大堆有的没的)。
解决方法:先进Linux,在终端下运行
sudo update-grub
得到反馈如下:
- Generating grub configuration file ...
- Found theme: /boot/grub/themes/kali/theme.txt
- Found background image: /usr/share/images/desktop-base/desktop-grub.png
- Found linux image: /boot/vmlinuz-5-18.0-kali5-amd64
- Found initrd image: /boot/initrd.img-5.18.0-kali5-amd64
- 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.
- Addming boot menu entry for UEFI Firmware Settings ...
- done
原因:os-prober未启用。
解决方法:
首先先打开grub的配置文件:
- sudo chmod 777 /etc/default/grub
- sudo vi /etc/default/grub
然后在文件中另起一行加上:
GRUB_DISABLE_OS_PROBER=false
保存后将文件改回只读,然后再update-grub即可。
- sudo chmod 644 /etc/default/grub
- sudo update-grub
如无误,输出将会如下:
- Generating grub configuration file ...
- Found theme: /boot/grub/themes/kali/theme.txt
- Found background image: /usr/share/images/desktop-base/desktop-grub.png
- Found linux image: /boot/vmlinuz-5-18.0-kali5-amd64
- Found initrd image: /boot/initrd.img-5.18.0-kali5-amd64
- Warning: os-prober will be executed to detect other bootable partitions.
- Its output will be used to detect bootable binaries on them and create new boot entries.
- Found Windows Boot Manager on /dev/nvme0n1p1@/EFI/Microsoft/Boot/bootmgfw.efi
- Addming boot menu entry for UEFI Firmware Settings ...
- done
重启机器即可从第三项(Windows Boot Manager on /dev/nvme0n1p1)启动Windows。
联系客服