当 Focal 安装和启动修复后丢失时,如何将 Windows 10 添加到 GRUB 菜单?

当 Focal 安装和启动修复后丢失时,如何将 Windows 10 添加到 GRUB 菜单?

我已经安装了 Focal(双启动,已安装 Windows 10),GRUB 菜单仅列出 Ubuntu,没有 Windows,这在我的 PC 上也是以前的 Ubuntu 版本中常见的情况。然而,对于以前的版本,运行boot-repair可以解决问题,但这次不行。

奇怪的是,当我看到 GRUB 菜单时:

  • 按 [Esc] 进入 GRUB CLI
  • 输入exit以退出 GRUB CLI

然后系统直接启动进入 Windows 10。

我也跑了,sudo grub-update但是没什么变化。

在 Windows 10 下,我运行了但没有变化。我注意到在 C:\Windows\Boot\EFI 下没有 ubuntu 目录,在那里bcdedit /set {bootmgr} path \EFI\ubuntu\shimx64.efi找不到。shimx64.efi

在主板 UEFI 中,我可以选择另外两个条目进行启动,但一个的行为相同,另一个直接启动到 Windows 10,没有 GRUB 菜单。

这是一份包含以下报告的 pastebin:boot-repair https://paste.ubuntu.com/p/6ZHvQqSfMN/

下面/etc/default/grub

我可以收集其他什么信息来解决问题吗?

# If you change this file, run 'update-grub' afterwards to update
# /boot/grub/grub.cfg.
# For full documentation of the options in this file, see:
#   info -f grub -n 'Simple configuration'

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

# Uncomment to enable BadRAM filtering, modify to suit your needs
# This works with Linux (no patch required) and with any kernel that obtains
# the memory map information from GRUB (GNU Mach, kernel of FreeBSD ...)
#GRUB_BADRAM="0x01234567,0xfefefefe,0x89abcdef,0xefefefef"

# Uncomment to disable graphical terminal (grub-pc only)
#GRUB_TERMINAL=console

# The resolution used on graphical terminal
# note that you can use only modes which your graphic card supports via VBE
# you can see them in real GRUB with the command `vbeinfo'
#GRUB_GFXMODE=640x480

# Uncomment if you don't want GRUB to pass "root=UUID=xxx" parameter to Linux
#GRUB_DISABLE_LINUX_UUID=true

# Uncomment to disable generation of recovery mode menu entries
#GRUB_DISABLE_RECOVERY="true"

# Uncomment to get a beep at grub start
#GRUB_INIT_TUNE="480 440 1"

[附加信息] 我有两个 SSD 配置为带有 Intel RST 的 RAID 0。在该 RAID 上,我同时安装了 Windows 10 和 Ubuntu 20.04。参见下图。在 UEFI BIOS 中,Sata 模式选择设置为 RAID,无 AHCI。 英特尔 RAID 配置

按照 oldfred 的建议(使用efibootmgr)删除启动项后,PC 直接启动到 Windows 10,不再显示 GRUB 菜单。从那里,我再次修改了启动项以重新获得对 Ubuntu 的访问权限;我还尝试boot-repair再次运行,这是当前状态:

$ sudo efibootmgr -v
BootCurrent: 000E
Timeout: 1 seconds
BootOrder: 000E,0000,0007,0004,0009,0001
Boot0000* Windows Boot Manager  HD(2,GPT,baeb537c-b470-48ab-ae4c-4663a62e8d2a,0x109000,0x32000)/File(\EFI\ubuntu\shimx64.efi)WINDOWS.........x...B.C.D.O.B.J.E.C.T.=.{.9.d.e.a.8.6.2.c.-.5.c.d.d.-.4.e.7.0.-.a.c.c.1.-.f.3.2.b.3.4.4.d.4.7.9.5.}...,................
Boot0001* CD/DVD Drive  BBS(CDROM,,0x0)AMGOAMNO........o.H.L.-.D.T.-.S.T. .D.V.D.R.A.M. .G.H.2.2.N.S.7.0....................A...........................>..Gd-.;.A..MQ..L.2.K.B.Z.9.8.5.8.2.5. .9. . . . . . . . ......AMBO
Boot0004* ST31000524AS  BBS(HD,,0x0)AMGOAMNO........m.A.0.S.0. .T.O.S.H.I.B.A. .H.D.W.D.1.2.0.........................rN.D+..,.\...........>..Gd-.;.A..MQ..L.A.0.S.0. .T.O.S.H.I.B.A. .H.D.W.D.1.2.0......AMBOAMNO........g.A.0.S.1. .S.T.3.1.0.0.0.5.2.4.A.S.........................rN.D+..,.\...........8..Gd-.;.A..MQ..L.A.0.S.1. .S.T.3.1.0.0.0.5.2.4.A.S......AMBOAMNO........_.I.n.t.e.l. .V.o.l.u.m.e.0.........................rN.D+..,.\...........0..Gd-.;.A..MQ..L.I.n.t.e.l. .V.o.l.u.m.e.0......AMBO
Boot0007* Windows Boot Manager  HD(2,GPT,baeb537c-b470-48ab-ae4c-4663a62e8d2a,0x109000,0x32000)/File(\EFI\Microsoft\Boot\bootmgfw.efi)
Boot0009* Removable Drive   BBS(Floppy,,0x0)AMGOAMNO..........G.e.n.e.r.i.c. .M.a.s.s.S.t.o.r.a.g.e.C.l.a.s.s.1.5.3.6....................A.....................................N..Gd-.;.A..MQ..L.G.e.n.e.r.i.c. .M.a.s.s.S.t.o.r.a.g.e.C.l.a.s.s.1.5.3.6......AMBOAMNO..........G.e.n.e.r.i.c. .M.a.s.s.S.t.o.r.a.g.e.C.l.a.s.s.1.5.3.6....................A.............................N..Gd-.;.A..MQ..L.G.e.n.e.r.i.c. .M.a.s.s.S.t.o.r.a.g.e.C.l.a.s.s.1.5.3.6......AMBO
Boot000E* ubuntu    HD(2,GPT,baeb537c-b470-48ab-ae4c-4663a62e8d2a,0x109000,0x32000)/File(EFI\Ubuntu\grubx64.efi)

答案1

即使在全新安装了 Win 10 和 Focal 后,我还是无法完成boot-repair这项工作,但我能够按照此处的说明手动将 Win 条目添加到 GRUB 菜单中:https://askubuntu.com/a/977251/528780

相关内容